mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16: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();
|
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;
|
||||||
|
@ -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() {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user