mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
*
This commit is contained in:
parent
06682b18a5
commit
f4fe762135
@ -108,7 +108,7 @@ public class ChunkListener implements Listener {
|
||||
}
|
||||
Object c = this.methodGetHandleChunk.of(chunk).call();
|
||||
RefField.RefExecutor field = this.mustSave.of(c);
|
||||
if (field.get() == true) {
|
||||
if ((Boolean) field.get() == true) {
|
||||
field.set(false);
|
||||
if (chunk.isLoaded()) {
|
||||
ignoreUnload = true;
|
||||
|
@ -122,7 +122,7 @@ public class Visit extends Command {
|
||||
if (plot.teleportPlayer(player)) {
|
||||
whenDone.run(Visit.this, CommandResult.SUCCESS);
|
||||
} else {
|
||||
whenDone.run(Visit.this, CommandResult.SUCCESS);
|
||||
whenDone.run(Visit.this, CommandResult.FAILURE);
|
||||
}
|
||||
}
|
||||
}, new Runnable() {
|
||||
|
@ -265,7 +265,7 @@ public class StringMan {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Collection match(Collection col, String startsWith) {
|
||||
public <T> Collection<T> match(Collection<T> col, String startsWith) {
|
||||
if (col == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -485,20 +485,22 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
public Collection<Command> tabOf(PlotPlayer player, String[] input, boolean space, String... args) {
|
||||
/*
|
||||
<player>
|
||||
<alias>
|
||||
<world>
|
||||
<id>
|
||||
<#>
|
||||
*/
|
||||
// int index = input.length - (space ? 0 : 1);
|
||||
// List<Command> result = new ArrayList<>();
|
||||
// for (String arg : args) {
|
||||
// String[] split = arg.split(" ");
|
||||
// }
|
||||
// TODO
|
||||
return new ArrayList<>();
|
||||
if (!space) {
|
||||
return null;
|
||||
}
|
||||
List<Command> result = new ArrayList<>();
|
||||
int index = input.length - (space ? 0 : 1);
|
||||
for (String arg : args) {
|
||||
arg = arg.replace(getCommandString() + " ", "");
|
||||
String[] split = arg.split(" ");
|
||||
if (split.length <= index) {
|
||||
continue;
|
||||
}
|
||||
arg = StringMan.join(Arrays.copyOfRange(split, index, split.length), " ");
|
||||
Command cmd = new Command(null, false, arg, getPermission(), getRequiredType(), null) {};
|
||||
result.add(cmd);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) {
|
||||
|
Loading…
Reference in New Issue
Block a user