This commit is contained in:
William Burns 2015-08-03 12:48:17 +01:00
parent 5b598009b9
commit 0c5cc25634
5 changed files with 19 additions and 3 deletions

View File

@ -26,7 +26,6 @@
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="true" />
<module name="bungee" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="1.7">

View File

@ -11,6 +11,7 @@
<module fileurl="file://$PROJECT_DIR$/Mineplex.Game.Clans/Mineplex.Game.Clans.iml" filepath="$PROJECT_DIR$/Mineplex.Game.Clans/Mineplex.Game.Clans.iml" group="Game" />
<module fileurl="file://$PROJECT_DIR$/Mineplex.Hub/Mineplex.Hub.iml" filepath="$PROJECT_DIR$/Mineplex.Hub/Mineplex.Hub.iml" />
<module fileurl="file://$PROJECT_DIR$/Mineplex.MapParser/Mineplex.MapParser.iml" filepath="$PROJECT_DIR$/Mineplex.MapParser/Mineplex.MapParser.iml" />
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.BungeeSigns/Mineplex.Minecraft.BungeeSigns.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.BungeeSigns/Mineplex.Minecraft.BungeeSigns.iml" group="Bungee" />
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" group="Game" />
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" group="Game" />
<module fileurl="file://$PROJECT_DIR$/Mineplex.PlayerCache/Mineplex.PlayerCache.iml" filepath="$PROJECT_DIR$/Mineplex.PlayerCache/Mineplex.PlayerCache.iml" />

View File

@ -7,6 +7,7 @@ import java.util.LinkedList;
import java.util.List;
import mineplex.core.MiniPlugin;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.NautHashMap;
@ -78,7 +79,7 @@ public class EventModule extends MiniPlugin
@EventHandler
public void setHostDebug(PlayerCommandPreprocessEvent event)
{
if (!event.getPlayer().isOp())
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.JNR_DEV, true))
return;
if (!event.getMessage().toLowerCase().startsWith("/sethost "))

View File

@ -34,6 +34,7 @@ public class ChooseMapButton implements IButton
public void onClick(Player player, ClickType clickType)
{
_arcadeManager.GetGameCreationManager().MapPref = _map;
_arcadeManager.GetGameCreationManager().MapSource = _gameType.GetName();
_arcadeManager.GetGame().setGame(_gameType, player, true);
player.closeInventory();
return;

View File

@ -210,7 +210,7 @@ public class GameHostManager implements Listener
if (!getWhitelist().contains(p.getName())){
if (_host == p)
return;
Manager.GetPortal().sendToHub(p, "You aren't on the whitelist of this Mineplex Private Server.");
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "This MPS is whitelisted.");
}
}
}
@ -360,6 +360,20 @@ public class GameHostManager implements Listener
return _adminList;
}
@EventHandler
public void getAdmin(PlayerCommandPreprocessEvent event)
{
if (!event.getMessage().equalsIgnoreCase("/getadmin"))
return;
event.setCancelled(true);
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.JNR_DEV, true))
return;
giveAdmin(event.getPlayer());
}
@EventHandler
public void broadcastCommand(PlayerCommandPreprocessEvent event)
{