Created
December 13, 2016 21:51
-
-
Save Signifies/9fd6a7216093ea8ea206f873fc73803a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if args.length() == 0 | |
{ | |
player.sendMessage("Incorrect Arguments. Specify gamemode.") | |
}else { | |
switch(args[0].toLowerCase()) | |
{ | |
case "creative": | |
case "1": | |
player.setGameMode(Gamemode.CREATIVE); | |
break; | |
case "survival": | |
case "0": | |
player.setGameMode(GameMode.SURVIVAL); | |
break; | |
case "adventure": | |
case "2": | |
player.setGameMode(GameMode.ADVENTURE); | |
break; | |
case "spectator": | |
case "3": | |
player.setGameMode(GameMode.SPECTATOR); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment