This commit is contained in:
Jesse Boyd 2016-06-28 20:21:50 +10:00
parent 06682b18a5
commit f4fe762135
4 changed files with 19 additions and 17 deletions

View File

@ -108,7 +108,7 @@ public class ChunkListener implements Listener {
} }
Object c = this.methodGetHandleChunk.of(chunk).call(); Object c = this.methodGetHandleChunk.of(chunk).call();
RefField.RefExecutor field = this.mustSave.of(c); RefField.RefExecutor field = this.mustSave.of(c);
if (field.get() == true) { if ((Boolean) field.get() == true) {
field.set(false); field.set(false);
if (chunk.isLoaded()) { if (chunk.isLoaded()) {
ignoreUnload = true; ignoreUnload = true;

View File

@ -122,7 +122,7 @@ public class Visit extends Command {
if (plot.teleportPlayer(player)) { if (plot.teleportPlayer(player)) {
whenDone.run(Visit.this, CommandResult.SUCCESS); whenDone.run(Visit.this, CommandResult.SUCCESS);
} else { } else {
whenDone.run(Visit.this, CommandResult.SUCCESS); whenDone.run(Visit.this, CommandResult.FAILURE);
} }
} }
}, new Runnable() { }, new Runnable() {

View File

@ -265,7 +265,7 @@ public class StringMan {
return sb.toString(); return sb.toString();
} }
public Collection match(Collection col, String startsWith) { public <T> Collection<T> match(Collection<T> col, String startsWith) {
if (col == null) { if (col == null) {
return null; return null;
} }

View File

@ -485,20 +485,22 @@ public abstract class Command {
} }
public Collection<Command> tabOf(PlotPlayer player, String[] input, boolean space, String... args) { public Collection<Command> tabOf(PlotPlayer player, String[] input, boolean space, String... args) {
/* if (!space) {
<player> return null;
<alias> }
<world> List<Command> result = new ArrayList<>();
<id> int index = input.length - (space ? 0 : 1);
<#> for (String arg : args) {
*/ arg = arg.replace(getCommandString() + " ", "");
// int index = input.length - (space ? 0 : 1); String[] split = arg.split(" ");
// List<Command> result = new ArrayList<>(); if (split.length <= index) {
// for (String arg : args) { continue;
// String[] split = arg.split(" "); }
// } arg = StringMan.join(Arrays.copyOfRange(split, index, split.length), " ");
// TODO Command cmd = new Command(null, false, arg, getPermission(), getRequiredType(), null) {};
return new ArrayList<>(); result.add(cmd);
}
return result;
} }
public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) { public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) {