override essentials

This commit is contained in:
Telesphoreo 2022-04-24 00:58:36 -05:00
parent bfdce97271
commit 07bc28fc48
No known key found for this signature in database
GPG Key ID: B5CDDEBA526C0130
5 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandPermissions(level = Rank.OP, permission = "plex.gamemode.adventure", source = RequiredCommandSource.ANY) @CommandPermissions(level = Rank.OP, permission = "plex.gamemode.adventure", source = RequiredCommandSource.ANY)
@CommandParameters(name = "adventure", aliases = "gma", description = "Set your own or another player's gamemode to adventure mode") @CommandParameters(name = "adventure", aliases = "gma,eadventure,adventuremode,eadventuremode", description = "Set your own or another player's gamemode to adventure mode")
public class AdventureCMD extends PlexCommand public class AdventureCMD extends PlexCommand
{ {
@Override @Override

View File

@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandPermissions(level = Rank.OP, permission = "plex.gamemode.creative", source = RequiredCommandSource.ANY) @CommandPermissions(level = Rank.OP, permission = "plex.gamemode.creative", source = RequiredCommandSource.ANY)
@CommandParameters(name = "creative", aliases = "gmc", description = "Set your own or another player's gamemode to creative mode") @CommandParameters(name = "creative", aliases = "gmc,ecreative,eecreative,creativemode,ecreativemode", description = "Set your own or another player's gamemode to creative mode")
public class CreativeCMD extends PlexCommand public class CreativeCMD extends PlexCommand
{ {
@Override @Override

View File

@ -19,7 +19,7 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandParameters(name = "gamemode", usage = "/<command> <creative | survival | adventure | default | spectator> [player]", description = "Change your gamemode", aliases = "gm, egamemode, egamemode") @CommandParameters(name = "gamemode", usage = "/<command> <creative | survival | adventure | default | spectator> [player]", description = "Change your gamemode", aliases = "gm,egamemode,gmt,egmt")
@CommandPermissions(level = Rank.OP, permission = "plex.gamemode", source = RequiredCommandSource.ANY) @CommandPermissions(level = Rank.OP, permission = "plex.gamemode", source = RequiredCommandSource.ANY)
public class GamemodeCMD extends PlexCommand public class GamemodeCMD extends PlexCommand
{ {
@ -34,18 +34,18 @@ public class GamemodeCMD extends PlexCommand
} }
switch (args[0].toLowerCase()) switch (args[0].toLowerCase())
{ {
case "creative", "c", "1" ->
{
gamemode = GameMode.CREATIVE;
update(sender, playerSender, GameMode.CREATIVE);
return null;
}
case "survival", "s", "0" -> case "survival", "s", "0" ->
{ {
gamemode = GameMode.SURVIVAL; gamemode = GameMode.SURVIVAL;
update(sender, playerSender, GameMode.SURVIVAL); update(sender, playerSender, GameMode.SURVIVAL);
return null; return null;
} }
case "creative", "c", "1" ->
{
gamemode = GameMode.CREATIVE;
update(sender, playerSender, GameMode.CREATIVE);
return null;
}
case "adventure", "a", "2" -> case "adventure", "a", "2" ->
{ {
gamemode = GameMode.ADVENTURE; gamemode = GameMode.ADVENTURE;

View File

@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandPermissions(level = Rank.ADMIN, permission = "plex.gamemode.spectator", source = RequiredCommandSource.ANY) @CommandPermissions(level = Rank.ADMIN, permission = "plex.gamemode.spectator", source = RequiredCommandSource.ANY)
@CommandParameters(name = "spectator", aliases = "gmsp", description = "Set your own or another player's gamemode to spectator mode") @CommandParameters(name = "spectator", aliases = "gmsp,egmsp,spec", description = "Set your own or another player's gamemode to spectator mode")
public class SpectatorCMD extends PlexCommand public class SpectatorCMD extends PlexCommand
{ {
@Override @Override

View File

@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandPermissions(level = Rank.OP, permission = "plex.gamemode.survival", source = RequiredCommandSource.ANY) @CommandPermissions(level = Rank.OP, permission = "plex.gamemode.survival", source = RequiredCommandSource.ANY)
@CommandParameters(name = "survival", aliases = "gms", description = "Set your own or another player's gamemode to survival mode") @CommandParameters(name = "survival", aliases = "gms,egms,esurvival,survivalmode,esurvivalmode", description = "Set your own or another player's gamemode to survival mode")
public class SurvivalCMD extends PlexCommand public class SurvivalCMD extends PlexCommand
{ {
@Override @Override