Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex into alex-ctf

This commit is contained in:
AlexTheCoder 2015-08-31 04:48:43 -04:00
commit e93db405d0
3 changed files with 34 additions and 17 deletions

View File

@ -120,7 +120,15 @@ public class CoreClientManager extends MiniPlugin
if(client.getDisguisedAs().equalsIgnoreCase(name))
return client;
}
return _clientList.get(name);
CoreClient client = _clientList.get(name);
if (client == null)
{
client = new CoreClient(name);
client.SetRank(Rank.ALL);
}
return client;
}
}

View File

@ -62,7 +62,6 @@ public class GadgetManager extends MiniPlugin
private boolean _hideParticles = false;
private int _activeItemSlot = 3;
private int _meows = 0;
public GadgetManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager,
MountManager mountManager, PetManager petManager, PreferencesManager preferencesManager,
@ -456,19 +455,16 @@ public class GadgetManager extends MiniPlugin
@EventHandler
public void chissMeow(PlayerToggleSneakEvent event)
{
if (event.getPlayer().getName().equals("Chiss"))
{
if (!event.getPlayer().isSneaking())
{
if (_meows > 3)
{
event.getPlayer().kickPlayer("You meow too much!");
return;
}
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.CAT_MEOW, 1f, 1f);
_meows++;
}
}
if (event.getPlayer().isSneaking())
return;
if (event.getPlayer().getName().equalsIgnoreCase("Chiss"))
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.CAT_MEOW, 1f, 1f);
if (event.getPlayer().getName().equalsIgnoreCase("defek7"))
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.WOLF_BARK, 1f, 1f);
if (event.getPlayer().getName().equalsIgnoreCase("sterling_"))
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.PIG_IDLE, 1f, 1f);
}
}

View File

@ -43,7 +43,7 @@ public class ServerCommand extends CommandBase<Portal>
Plugin.doesServerExist(args[0], new Callback<Boolean>()
{
public void run(final Boolean serverExists)
{
{
if (!serverExists)
{
UtilPlayer.message(
@ -84,6 +84,19 @@ public class ServerCommand extends CommandBase<Portal>
else
deniedAccess = true;
}
else if (servUp.contains("CLANS-"))
{
if (playerRank.has(Rank.MODERATOR))
{
Plugin.sendPlayerToServer(player, args[0]);
}
else
{
UtilPlayer.message(player,
F.main(Plugin.getName(), C.cRed + "You must join clans through the hub! Join " + C.cGold + "ClansHub-1"
+ C.cRed + "!"));
}
}
else
{
Plugin.sendPlayerToServer(player, args[0]);