This commit is contained in:
Telesphoreo 2020-08-21 21:52:20 -05:00
commit a60c05fec5
4 changed files with 9 additions and 3 deletions

View file

@ -26,7 +26,7 @@ public class Commandgamemode extends EssentialsLoopCommand {
} else if (args.length == 1) { } else if (args.length == 1) {
loopOnlinePlayersConsumer(server, sender, false, true, args[0], user -> setUserGamemode(sender, matchGameMode(commandLabel), user)); loopOnlinePlayersConsumer(server, sender, false, true, args[0], user -> setUserGamemode(sender, matchGameMode(commandLabel), user));
} else if (args.length == 2) { } else if (args.length == 2) {
loopOnlinePlayersConsumer(server, sender, false, true, args[1], user -> setUserGamemode(sender, matchGameMode(commandLabel), user)); loopOnlinePlayersConsumer(server, sender, false, true, args[1], user -> setUserGamemode(sender, matchGameMode(args[0]), user));
} }
} }
@ -85,6 +85,7 @@ public class Commandgamemode extends EssentialsLoopCommand {
private GameMode matchGameMode(String modeString) throws NotEnoughArgumentsException { private GameMode matchGameMode(String modeString) throws NotEnoughArgumentsException {
GameMode mode = null; GameMode mode = null;
modeString = modeString.toLowerCase();
if (modeString.equalsIgnoreCase("gmc") || modeString.equalsIgnoreCase("egmc") || modeString.contains("creat") || modeString.equalsIgnoreCase("1") || modeString.equalsIgnoreCase("c")) { if (modeString.equalsIgnoreCase("gmc") || modeString.equalsIgnoreCase("egmc") || modeString.contains("creat") || modeString.equalsIgnoreCase("1") || modeString.equalsIgnoreCase("c")) {
mode = GameMode.CREATIVE; mode = GameMode.CREATIVE;
} else if (modeString.equalsIgnoreCase("gms") || modeString.equalsIgnoreCase("egms") || modeString.contains("survi") || modeString.equalsIgnoreCase("0") || modeString.equalsIgnoreCase("s")) { } else if (modeString.equalsIgnoreCase("gms") || modeString.equalsIgnoreCase("egms") || modeString.contains("survi") || modeString.equalsIgnoreCase("0") || modeString.equalsIgnoreCase("s")) {

View file

@ -276,6 +276,11 @@ public class FakeWorld implements World {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public boolean setSpawnLocation(int i, int i1, int i2, float v) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override @Override
public boolean setSpawnLocation(int i, int i1, int i2) { public boolean setSpawnLocation(int i, int i1, int i2) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");

View file

@ -992,7 +992,7 @@ protect:
# Which blocks should people be prevented from breaking? # Which blocks should people be prevented from breaking?
break: break:
# Which blocks should not be pushed by pistons? # Which blocks should not be moved by pistons?
piston: piston:
# Which blocks should not be dispensed by dispensers # Which blocks should not be dispensed by dispensers

View file

@ -28,7 +28,7 @@
<dependency> <dependency>
<groupId>com.destroystokyo.paper</groupId> <groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId> <artifactId>paper-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>