mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-08-04 05:25:28 +02:00
Fix compile
Recover on unknown command error Fixes #1224 Close #1213 (fixed elsewhere) Fixes #1212
This commit is contained in:
@@ -484,6 +484,23 @@ public abstract class Command {
|
||||
return getCommandString() + " " + args + "]";
|
||||
}
|
||||
|
||||
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<>();
|
||||
}
|
||||
|
||||
public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) {
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
|
@@ -75,11 +75,11 @@ public class PlotListener {
|
||||
Optional<Boolean> flyFlag = plot.getFlag(Flags.FLY);
|
||||
if (flyFlag.isPresent()) {
|
||||
boolean flight = player.getFlight();
|
||||
PlotGameMode gamemode = player.getGameMode();
|
||||
if (flight != (gamemode == PlotGameMode.CREATIVE || gamemode == PlotGameMode.SPECTATOR)) {
|
||||
player.setPersistentMeta("flight", ByteArrayUtilities.booleanToBytes(player.getFlight()));
|
||||
}
|
||||
if (flyFlag.get() != player.getFlight()) {
|
||||
PlotGameMode gamemode = player.getGameMode();
|
||||
if (flight != (gamemode == PlotGameMode.CREATIVE || gamemode == PlotGameMode.SPECTATOR)) {
|
||||
player.setPersistentMeta("flight", ByteArrayUtilities.booleanToBytes(player.getFlight()));
|
||||
}
|
||||
player.setFlight(flyFlag.get());
|
||||
}
|
||||
}
|
||||
@@ -209,6 +209,8 @@ public class PlotListener {
|
||||
PlotGameMode gameMode = player.getGameMode();
|
||||
if (gameMode == PlotGameMode.SURVIVAL || gameMode == PlotGameMode.ADVENTURE) {
|
||||
player.setFlight(false);
|
||||
} else if (player.getFlight() != true) {
|
||||
player.setFlight(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user