From 89dab7ec8531ca4885e9f6725e0e8076abf2c60c Mon Sep 17 00:00:00 2001 From: Mini-Chiss Date: Tue, 11 Aug 2015 16:33:32 +0200 Subject: [PATCH] some little fixes --- .../mineplex/core/gadget/GadgetManager.java | 2 +- .../core/gadget/gadgets/ItemPaintballGun.java | 39 ------------------- .../gui/privateServer/page/MenuPage.java | 4 +- .../game/arcade/managers/GameChatManager.java | 4 +- .../game/arcade/managers/GameHostManager.java | 8 +++- 5 files changed, 11 insertions(+), 46 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 3c518f35a..54a3ea799 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -92,7 +92,7 @@ public class GadgetManager extends MiniPlugin addGadget(new ItemTNT(this)); addGadget(new ItemMelonLauncher(this)); addGadget(new ItemFleshHook(this)); - //addGadget(new ItemPaintballGun(this)); + addGadget(new ItemPaintballGun(this)); addGadget(new ItemBatGun(this)); addGadget(new ItemCoinBomb(this)); addGadget(new ItemPaintbrush(this)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java index 34d4ed557..e1b1b6c39 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java @@ -61,45 +61,6 @@ public class ItemPaintballGun extends ItemGadget Location loc = event.getEntity().getLocation().add(event.getEntity().getVelocity()); loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 49); - - byte color = 2; - double r = Math.random(); - if (r > 0.8) color = 4; - else if (r > 0.6) color = 5; - else if (r > 0.4) color = 9; - else if (r > 0.2) color = 14; - - for (Block block : UtilBlock.getInRadius(loc, 3d).keySet()) - { - if (block.getType() == Material.PORTAL) - return; - - if (block.getType() == Material.CACTUS) - return; - - if (block.getType() == Material.SUGAR_CANE_BLOCK) - return; - } - - List blocks = new ArrayList(); - blocks.addAll(UtilBlock.getInRadius(loc, 1.5d).keySet()); - - GadgetBlockEvent gadgetEvent = new GadgetBlockEvent(this, blocks); - Bukkit.getServer().getPluginManager().callEvent(gadgetEvent); - - if (gadgetEvent.isCancelled()) - return; - - for (Block block : gadgetEvent.getBlocks()) - { - if (!UtilBlock.solid(block)) - continue; - - if (block.getType() == Material.CARPET) - Manager.getBlockRestore().Add(block, 171, color, 4000); - else - Manager.getBlockRestore().Add(block, 35, color, 4000); - } } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/MenuPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/MenuPage.java index c24a31d78..26adc68ba 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/MenuPage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/MenuPage.java @@ -89,10 +89,10 @@ public class MenuPage extends BasePage if (host) { GiveAdminButton giveAdminButton = new GiveAdminButton(getPlugin(), getShop()); - addButton(4 + 9, new ShopItem(Material.DIAMOND_SWORD, "Give Admin", new String[]{}, 1, false), giveAdminButton); + addButton(4 + 9, new ShopItem(Material.DIAMOND_SWORD, "Give Co-Host", new String[]{}, 1, false), giveAdminButton); RemoveAdminButton removeAdminButton = new RemoveAdminButton(getPlugin(), getShop()); - addButton(4 + 18, new ShopItem(Material.GOLD_SWORD, "Remove Admin", new String[]{}, 1, false), removeAdminButton); + addButton(4 + 18, new ShopItem(Material.GOLD_SWORD, "Remove Co-Host", new String[]{}, 1, false), removeAdminButton); KillButton killButton = new KillButton(getPlugin()); addButton(8 + 18, new ShopItem(Material.TNT, "Kill Private Server", diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameChatManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameChatManager.java index 4aed91a8a..5f949845c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameChatManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameChatManager.java @@ -90,9 +90,9 @@ public class GameChatManager implements Listener else if (Manager.GetGameHostManager().isAdmin(event.getPlayer(), false)) { if (Manager.GetGameHostManager().isEventServer()) - rankStr = C.cDGreen + C.Bold + "Event Admin "; + rankStr = C.cDGreen + C.Bold + "Event Co-Host "; else - rankStr = C.cDGreen + C.Bold + "MPS Admin "; + rankStr = C.cDGreen + C.Bold + "MPS Co-Host "; } else { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java index 2dfc1c151..20a10ed71 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java @@ -230,6 +230,10 @@ public class GameHostManager implements Listener _hostRank = Manager.GetClients().Get(_host).GetRank(); System.out.println("Game Host Joined."); + //Limit player count! + if (Manager.GetServerConfig().MaxPlayers > getMaxPlayerCap()) + Manager.GetServerConfig().MaxPlayers = getMaxPlayerCap(); + if (isEventServer()) worldeditPermissionSet(event.getPlayer(), true); } @@ -642,7 +646,7 @@ public class GameHostManager implements Listener { _adminList.add(player.getName()); _onlineAdmins.add(player); - UtilPlayer.message(player, F.main("Server", "You were given admin privileges.")); + UtilPlayer.message(player, F.main("Server", "You were given Co-Host privileges.")); if (isEventServer()) worldeditPermissionSet(player, true); @@ -660,7 +664,7 @@ public class GameHostManager implements Listener { player.closeInventory(); } - UtilPlayer.message(player, F.main("Server", "Your admin privileges were removed.")); + UtilPlayer.message(player, F.main("Server", "Your Co-Host privileges were removed.")); player.setGameMode(GameMode.SURVIVAL);