|
@@ -3,9 +3,7 @@ package me.kcm.command;
|
|
|
import java.util.Collections;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
import javax.annotation.Nullable;
|
|
|
-import net.minecraft.command.CommandBase;
|
|
|
import net.minecraft.command.ICommand;
|
|
|
import net.minecraft.command.ICommandSender;
|
|
|
import net.minecraft.command.ServerCommandManager;
|
|
@@ -100,13 +98,14 @@ public class ModServerCommandManager extends ServerCommandManager
|
|
|
String command = args[0].toLowerCase();
|
|
|
args = dropFirstString(args);
|
|
|
|
|
|
+ if(manager.executeCustomCommand(sender, command, args))
|
|
|
+ {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
ICommand icommand = this.getCommands().get(command);
|
|
|
if(icommand == null)
|
|
|
{
|
|
|
- if(manager.executeCustomCommand(sender, command, args))
|
|
|
- {
|
|
|
- return 1;
|
|
|
- }
|
|
|
manager.printMissingCommand(sender, command);
|
|
|
return 0;
|
|
|
}
|
|
@@ -142,11 +141,12 @@ public class ModServerCommandManager extends ServerCommandManager
|
|
|
String command = astring[0];
|
|
|
if(astring.length == 1)
|
|
|
{
|
|
|
- return this.getCommands().entrySet().stream()
|
|
|
+ return Collections.<String>emptyList();
|
|
|
+ /*return this.getCommands().entrySet().stream()
|
|
|
.filter(e -> (CommandBase.doesStringStartWith(command, e.getKey()) &&
|
|
|
manager.hasPermission(sender, e.getKey())))
|
|
|
.map(e -> e.getKey())
|
|
|
- .collect(Collectors.toList());
|
|
|
+ .collect(Collectors.toList());*/
|
|
|
}
|
|
|
else if(astring.length > 1)
|
|
|
{
|
|
@@ -162,10 +162,11 @@ public class ModServerCommandManager extends ServerCommandManager
|
|
|
@Override
|
|
|
public List<ICommand> getPossibleCommands(ICommandSender sender)
|
|
|
{
|
|
|
- return this.getCommands().entrySet().stream()
|
|
|
+ return Collections.<ICommand>emptyList();
|
|
|
+ /*return this.getCommands().entrySet().stream()
|
|
|
.filter(e -> manager.hasPermission(sender, e.getKey()))
|
|
|
.map(e -> e.getValue())
|
|
|
- .collect(Collectors.toList());
|
|
|
+ .collect(Collectors.toList());*/
|
|
|
}
|
|
|
|
|
|
@Override
|