mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Use PlexCommand instead of PlexUtils
This commit is contained in:
parent
f3f7daaafb
commit
76952e33b8
@ -29,7 +29,7 @@ public class AdventureCMD extends PlexCommand
|
|||||||
{
|
{
|
||||||
if (isConsole(sender))
|
if (isConsole(sender))
|
||||||
{
|
{
|
||||||
throw new CommandFailException(PlexUtils.messageString("consoleMustDefinePlayer"));
|
throw new CommandFailException(messageString("consoleMustDefinePlayer"));
|
||||||
}
|
}
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new GameModeUpdateEvent(sender, playerSender, GameMode.ADVENTURE));
|
Bukkit.getServer().getPluginManager().callEvent(new GameModeUpdateEvent(sender, playerSender, GameMode.ADVENTURE));
|
||||||
return null;
|
return null;
|
||||||
|
@ -29,7 +29,7 @@ public class CreativeCMD extends PlexCommand
|
|||||||
{
|
{
|
||||||
if (isConsole(sender))
|
if (isConsole(sender))
|
||||||
{
|
{
|
||||||
throw new CommandFailException(PlexUtils.messageString("consoleMustDefinePlayer"));
|
throw new CommandFailException(messageString("consoleMustDefinePlayer"));
|
||||||
}
|
}
|
||||||
if (!(playerSender == null))
|
if (!(playerSender == null))
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ public class SpectatorCMD extends PlexCommand
|
|||||||
{
|
{
|
||||||
if (isConsole(sender))
|
if (isConsole(sender))
|
||||||
{
|
{
|
||||||
throw new CommandFailException(PlexUtils.messageString("consoleMustDefinePlayer"));
|
throw new CommandFailException(messageString("consoleMustDefinePlayer"));
|
||||||
}
|
}
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new GameModeUpdateEvent(sender, playerSender, GameMode.SPECTATOR));
|
Bukkit.getServer().getPluginManager().callEvent(new GameModeUpdateEvent(sender, playerSender, GameMode.SPECTATOR));
|
||||||
return null;
|
return null;
|
||||||
|
@ -29,7 +29,7 @@ public class SurvivalCMD extends PlexCommand
|
|||||||
{
|
{
|
||||||
if (isConsole(sender))
|
if (isConsole(sender))
|
||||||
{
|
{
|
||||||
throw new CommandFailException(PlexUtils.messageString("consoleMustDefinePlayer"));
|
throw new CommandFailException(messageString("consoleMustDefinePlayer"));
|
||||||
}
|
}
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new GameModeUpdateEvent(sender, playerSender, GameMode.SURVIVAL));
|
Bukkit.getServer().getPluginManager().callEvent(new GameModeUpdateEvent(sender, playerSender, GameMode.SURVIVAL));
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user