From 06c18a0fa3fa15352cbe402f42392c8d7bc61004 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 13 Jul 2018 17:40:07 +0100 Subject: [PATCH] Fixed some issues that came up --- .../src/mineplex/hub/server/ServerManager.java | 1 + .../arcade/game/games/milkcow/MilkCow.java | 11 +++-------- .../games/milkcow/kits/perk/PerkCharge.java | 4 ---- .../game/arcade/game/games/tug/TugOfWool.java | 18 +----------------- 4 files changed, 5 insertions(+), 29 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 9ea28b591..6942336d9 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -123,6 +123,7 @@ public class ServerManager extends MiniPlugin .put("Super Smash Mobs", new String[] {"SSM", "SSM2"}) .put("Champions", new String[] {"DOM", "CTF"}) .put("Clans", new String[] {"ClansHub", "Clans"}) + .put("Retro", new String[] {"RETRO"}) .build(); private final QuickShop _quickShop; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java index e161bc3d9..694f24e52 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java @@ -63,14 +63,14 @@ public class MilkCow extends SoloGame { private static final int SCORE_TO_WIN = 15; - private static final int SCORE_DEATH = 5; + private static final int SCORE_DEATH = 2; private static final String[] DESCRIPTION = { C.cGreen + "Farmers" + C.Reset + " get " + C.cYellow + "1" + C.Reset + " point for drinking milk.", C.cRed + "Cows" + C.Reset + " defend your herd from the farmers.", "", C.cYellow + "Everyone" + C.Reset + " loses " + C.cYellow + SCORE_DEATH + C.Reset + " points for dying.", - "First player to " + C.cYellow + "15" + C.Reset + " points wins!" + "First player to " + C.cYellow + SCORE_TO_WIN + C.Reset + " points wins!" }; private GameTeam _farmers; @@ -157,7 +157,7 @@ public class MilkCow extends SoloGame _cows = new GameTeam(this, "Cow", ChatColor.RED, _farmers.GetSpawns()); AddTeam(_cows); - _teamSelector = new RatioSelector(_cows, 0.25); + _teamSelector = new RatioSelector(_cows, 0.2); RestrictKits(); } @@ -229,11 +229,6 @@ public class MilkCow extends SoloGame Cow cow = target.getWorld().spawn(target, Cow.class); - if (Math.random() > 0.5) - { - cow.setBaby(); - } - _herd.add(cow); CreatureAllowOverride = false; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/kits/perk/PerkCharge.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/kits/perk/PerkCharge.java index 85581a0a2..73597653a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/kits/perk/PerkCharge.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/kits/perk/PerkCharge.java @@ -15,12 +15,10 @@ import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilPlayer; -import mineplex.core.common.util.UtilServer; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import nautilus.game.arcade.game.games.milkcow.MilkRemoveEvent; import nautilus.game.arcade.kit.Perk; public class PerkCharge extends Perk @@ -72,8 +70,6 @@ public class PerkCharge extends Perk return; } - UtilServer.CallEvent(new MilkRemoveEvent(hit, 1)); - for (ItemStack itemStack : hit.getInventory().getContents()) { if (itemStack == null || itemStack.getType() != Material.MILK_BUCKET) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/tug/TugOfWool.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/tug/TugOfWool.java index 086d5fe99..4c87459d3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/tug/TugOfWool.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/tug/TugOfWool.java @@ -24,7 +24,6 @@ import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityInteractEvent; import org.bukkit.event.entity.EntityTargetEvent; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.inventory.ItemStack; @@ -78,7 +77,7 @@ public class TugOfWool extends TeamGame private static final long PURCHASE_COOLDOWN = TimeUnit.SECONDS.toMillis(5); private static final int GOLD_SLOT = 8; private static final int MAX_GOLD = 50; - private static final double GOLD_PER_ANIMAL = 0.2, GOLD_PER_PLAYER = 0.3, GOLD_PER_SEC = 0.05, GOLD_PER_CROP_LOST = 3, GOLD_LOST_DEATH = 0.5; + private static final double GOLD_PER_ANIMAL = 0.2, GOLD_PER_PLAYER = 0.3, GOLD_PER_SEC = 0.05, GOLD_PER_CROP_LOST = 3, GOLD_LOST_DEATH = 2; private final Set _teams; private final List _items; @@ -658,19 +657,4 @@ public class TugOfWool extends TeamGame { return (int) Math.floor(_gold.getOrDefault(player, 0D)); } - - @EventHandler - public void command(PlayerCommandPreprocessEvent event) - { - if (event.getMessage().startsWith("/speed")) - { - String[] args = event.getMessage().split(" "); - _speed = Float.parseFloat(args[1]); - } - else if (event.getMessage().startsWith("/gold")) - { - String[] args = event.getMessage().split(" "); - incrementGold(event.getPlayer(), Integer.parseInt(args[1])); - } - } }