Missing commands
This commit is contained in:
parent
8d47e80066
commit
3d64319180
@ -1,4 +1,4 @@
|
||||
package mineplex.core.portal.Commands;
|
||||
package mineplex.core.portal.commands;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package mineplex.core.portal.Commands;
|
||||
package mineplex.core.portal.commands;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -8,6 +8,7 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.portal.Intent;
|
||||
import mineplex.core.portal.Portal;
|
||||
|
||||
public class ServerCommand extends CommandBase<Portal>
|
||||
@ -27,7 +28,6 @@ public class ServerCommand extends CommandBase<Portal>
|
||||
{
|
||||
UtilPlayer.message(player,
|
||||
F.main(Plugin.getName(), C.cGray + "You are currently on server: " + C.cGold + serverName));
|
||||
return;
|
||||
}
|
||||
else if (args.length == 1)
|
||||
{
|
||||
@ -58,28 +58,21 @@ public class ServerCommand extends CommandBase<Portal>
|
||||
|
||||
if (servUp.contains("STAFF"))
|
||||
{
|
||||
if (playerRank.has(Rank.HELPER))
|
||||
Plugin.sendPlayerToServer(player, args[0]);
|
||||
else
|
||||
if (!playerRank.has(Rank.HELPER))
|
||||
deniedAccess = true;
|
||||
}
|
||||
else if (servUp.contains("TEST"))
|
||||
{
|
||||
if (playerRank.has(Rank.MODERATOR))
|
||||
Plugin.sendPlayerToServer(player, args[0]);
|
||||
else
|
||||
if (!playerRank.has(Rank.MODERATOR))
|
||||
deniedAccess = true;
|
||||
}
|
||||
else if (servUp.startsWith("CLANS-"))
|
||||
{
|
||||
if (playerRank.has(Rank.HELPER))
|
||||
Plugin.sendPlayerToServer(player, args[0]);
|
||||
else
|
||||
if (!playerRank.has(Rank.HELPER))
|
||||
{
|
||||
UtilPlayer.message(player, F.main(Plugin.getName(), "Clans servers can only be joined via the Clans Hub!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Plugin.sendPlayerToServer(player, args[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (deniedAccess)
|
||||
@ -88,6 +81,10 @@ public class ServerCommand extends CommandBase<Portal>
|
||||
player,
|
||||
F.main(Plugin.getName(), C.cRed + "You don't have permission to join " + C.cGold + args[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
Plugin.sendPlayerToServer(player, args[0], Intent.PLAYER_REQUEST);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -96,7 +93,6 @@ public class ServerCommand extends CommandBase<Portal>
|
||||
{
|
||||
UtilPlayer.message(player,
|
||||
F.main(Plugin.getName(), C.cRed + "Your arguments are inappropriate for this command!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user