mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Minor code changes
This commit is contained in:
@ -28,7 +28,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class CommandContext {
|
||||
|
||||
|
||||
protected final String command;
|
||||
protected final List<String> parsedArgs;
|
||||
|
||||
@ -55,7 +55,7 @@ public class CommandContext {
|
||||
this(args.split(" ", -1), valueFlags);
|
||||
}
|
||||
|
||||
public CommandContext(String args, Set<Character> valueFlags, boolean allowHangingFlag)
|
||||
public CommandContext(String args, Set<Character> valueFlags, boolean allowHangingFlag)
|
||||
throws CommandException {
|
||||
this(args.split(" ", -1), valueFlags, allowHangingFlag, new CommandLocals());
|
||||
}
|
||||
@ -107,7 +107,7 @@ public class CommandContext {
|
||||
List<String> argList = new ArrayList<>(args.length);
|
||||
for (int i = 1; i < args.length; ++i) {
|
||||
isHanging = false;
|
||||
|
||||
|
||||
String arg = args[i];
|
||||
if (arg.isEmpty()) {
|
||||
isHanging = true;
|
||||
@ -216,7 +216,7 @@ public class CommandContext {
|
||||
parsedArgs.add(arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.suggestionContext = suggestionContext;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ public class CommandContext {
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
|
||||
public String getRemainingString(int start) {
|
||||
return getString(start, parsedArgs.size() - 1);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class CommandException extends Exception {
|
||||
|
||||
/**
|
||||
* Gets the command that was called, which will include the sub-command
|
||||
* (i.e., "/br sphere").
|
||||
* (i.e. "/br sphere").
|
||||
*
|
||||
* @param prefix the command shebang character (such as "/") -- may be empty
|
||||
* @param spacedSuffix a suffix to put at the end (optional) -- may be null
|
||||
|
@ -47,8 +47,4 @@ public class CommandLocals {
|
||||
return locals.put(key, value);
|
||||
}
|
||||
|
||||
public Object putIfAbsent(Object key, Object value) {
|
||||
return locals.putIfAbsent(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,6 +20,9 @@
|
||||
package com.sk89q.minecraft.util.commands;
|
||||
|
||||
import com.sk89q.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
@ -30,9 +33,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.enginehub.piston.inject.InjectedValueAccess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Manager for handling commands. This allows you to easily process commands,
|
||||
|
@ -50,4 +50,4 @@ public class SimpleInjector implements Injector {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,4 +22,4 @@
|
||||
* to Piston, Intake, ACF, or similar systems.
|
||||
*/
|
||||
@Deprecated
|
||||
package com.sk89q.minecraft.util.commands;
|
||||
package com.sk89q.minecraft.util.commands;
|
||||
|
Reference in New Issue
Block a user