Merge branch 'clans/alpha' of ssh://184.154.0.242:7999/min/Mineplex into clans/beta
This commit is contained in:
commit
fde5a5af28
@ -14,8 +14,8 @@ public enum Rank
|
||||
DEVELOPER("Dev", ChatColor.GOLD, "Developers make new games,\nand new features for you to enjoy"),
|
||||
ADMIN("Admin", ChatColor.GOLD, "Administrators have their own\nSenior Moderator team that they lead!"),
|
||||
JNR_DEV("Jr.Dev", ChatColor.GOLD, "Junior Developers make new games,\nand new features for you to enjoy"),
|
||||
SUPPORT("Support", ChatColor.BLUE, "Support Agents take care of all the tickets\nthat get sent to mineplex.com/support"),
|
||||
CMOD("C.Mod", ChatColor.GOLD, "Clan Moderators are Senior Moderators in\nthe Clans Management team.\nThey mainly moderate only the Clans servers.\nThey are around to help you with any problems on Clans servers."),
|
||||
SUPPORT("Support", ChatColor.BLUE, "Support Agents take care of all the tickets\nthat get sent to mineplex.com/support"),
|
||||
SNR_MODERATOR("Sr.Mod", ChatColor.GOLD, "Senior Moderators are in a special\nSenior Moderator team where they have to fulfill team tasks.\nThey are similar to Moderators who you can always ask for help!\nIf you have any questions, just message them using /a"),
|
||||
MODERATOR("Mod", ChatColor.GOLD, "Moderators are here to moderate\nand help players with any concerns they have.\nIf you have any questions, just message them using /a"),
|
||||
HELPER("Trainee", ChatColor.DARK_AQUA, "Trainees are staff in training,\nand are here to help players and moderate!\nIf you have any questions, just message them using /a"),
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.account.ILoginProcessor;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.portal.Portal;
|
||||
@ -26,6 +27,8 @@ public class ClansLoginManager extends MiniPlugin implements ILoginProcessor
|
||||
private String _serverName;
|
||||
private ConcurrentLinkedQueue<String> _queue;
|
||||
|
||||
private CoreClientManager _clientManager;
|
||||
|
||||
public ClansLoginManager(JavaPlugin plugin, CoreClientManager clientManager, String serverName)
|
||||
{
|
||||
super("Clans Login Manager", plugin);
|
||||
@ -34,12 +37,13 @@ public class ClansLoginManager extends MiniPlugin implements ILoginProcessor
|
||||
_enabled = true;
|
||||
_queue = new ConcurrentLinkedQueue<String>();
|
||||
clientManager.addStoredProcedureLoginProcessor(this);
|
||||
_clientManager = clientManager;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerLoginEvent event)
|
||||
{
|
||||
if (_queue.contains(event.getPlayer().getName()) && !event.getPlayer().isOp())
|
||||
if (_queue.contains(event.getPlayer().getName()) && !event.getPlayer().isOp() && _clientManager.hasRank(event.getPlayer(), Rank.CMOD))
|
||||
{
|
||||
event.setKickMessage("This is not your Clans home server");
|
||||
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
||||
|
Loading…
Reference in New Issue
Block a user