public class CommandDefaultGameMode extends CommandGameMode
CommandBase.CoordinateArg
Constructor and Description |
---|
CommandDefaultGameMode() |
Modifier and Type | Method and Description |
---|---|
void |
execute(MinecraftServer server,
ICommandSender sender,
java.lang.String[] args)
Callback for when the command is executed
|
java.lang.String |
getName()
Gets the name of the command
|
java.lang.String |
getUsage(ICommandSender sender)
Gets the usage string for the command.
|
protected void |
setDefaultGameType(GameType gameType,
MinecraftServer server)
Set the default game type for the server.
|
getGameModeFromCommand, getRequiredPermissionLevel, getTabCompletions, isUsernameIndex
buildString, checkPermission, compareTo, convertArgToBlockState, convertArgToBlockStatePredicate, doesStringStartWith, entityToNBT, getAliases, getBlockByText, getChatComponentFromNthArg, getChatComponentFromNthArg, getCommandSenderAsPlayer, getEntity, getEntity, getEntityList, getEntityName, getItemByText, getListOfStringsMatchingLastWord, getListOfStringsMatchingLastWord, getPlayer, getPlayerName, getTabCompletionCoordinate, getTabCompletionCoordinateXZ, join, joinNiceString, joinNiceStringFromCollection, notifyCommandListener, notifyCommandListener, parseBlockPos, parseBoolean, parseCoordinate, parseCoordinate, parseDouble, parseDouble, parseDouble, parseDouble, parseDouble, parseInt, parseInt, parseInt, parseLong, parseLong, setCommandListener, toSyntaxException
public java.lang.String getName()
getName
in interface ICommand
getName
in class CommandGameMode
public java.lang.String getUsage(ICommandSender sender)
getUsage
in interface ICommand
getUsage
in class CommandGameMode
sender
- The ICommandSender who is requesting usage detailspublic void execute(MinecraftServer server, ICommandSender sender, java.lang.String[] args) throws CommandException
execute
in interface ICommand
execute
in class CommandGameMode
server
- The server instancesender
- The sender who executed the commandargs
- The arguments that were passedCommandException
protected void setDefaultGameType(GameType gameType, MinecraftServer server)