From 5f36c8e424e2c116d8c1255f020f4a5651a4866d Mon Sep 17 00:00:00 2001 From: Chiss Date: Tue, 30 Dec 2014 08:50:37 +1100 Subject: [PATCH 1/5] minor scoreboard changes legend loot bonus --- .../core/cosmetic/ui/page/PetPage.java | 7 +- .../src/mineplex/hub/HubManager.java | 70 +++++++++---------- .../arcade/managers/GameLobbyManager.java | 10 ++- .../game/arcade/managers/GameLootManager.java | 9 ++- 4 files changed, 56 insertions(+), 40 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java index 5a0dad0d8..8e4760c50 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java @@ -73,7 +73,12 @@ public class PetPage extends ShopPageBase itemLore.add(C.cBlack); itemLore.add(ChatColor.RESET + C.cYellow + "Earned by defeating the Pumpkin King"); itemLore.add(ChatColor.RESET + C.cYellow + "in the 2014 Christmas Chaos Event."); - } + } + if (pet.GetPetType() == EntityType.WITHER) + { + itemLore.add(C.cBlack); + itemLore.add(ChatColor.RESET + C.cYellow + "Unlocked with Legend Rank"); + } } //Owned diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 51ac080b3..dddd537ff 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -737,38 +737,38 @@ public class HubManager extends MiniClientPlugin if (_scoreboardTick != 0) return; - int bestPig = 0; - for (Player player : UtilServer.getPlayers()) - { - if (player.getVehicle() != null) - continue; - - int count = 0; - - Entity ent = player; - while (ent.getPassenger() != null) - { - ent = ent.getPassenger(); - count++; - } - - if (count > bestPig) - { - _pigStacker = player.getName(); - bestPig = count; - } - } - if (bestPig == 0) - { - _pigStacker = "0 - Nobody"; - } - else - { - _pigStacker = bestPig + " - " + _pigStacker; - - if (_pigStacker.length() > 16) - _pigStacker = _pigStacker.substring(0, 16); - } +// int bestPig = 0; +// for (Player player : UtilServer.getPlayers()) +// { +// if (player.getVehicle() != null) +// continue; +// +// int count = 0; +// +// Entity ent = player; +// while (ent.getPassenger() != null) +// { +// ent = ent.getPassenger(); +// count++; +// } +// +// if (count > bestPig) +// { +// _pigStacker = player.getName(); +// bestPig = count; +// } +// } +// if (bestPig == 0) +// { +// _pigStacker = "0 - Nobody"; +// } +// else +// { +// _pigStacker = bestPig + " - " + _pigStacker; +// +// if (_pigStacker.length() > 16) +// _pigStacker = _pigStacker.substring(0, 16); +// } for (Player player : UtilServer.getPlayers()) { @@ -789,10 +789,8 @@ public class HubManager extends MiniClientPlugin int line = 15; //Stacker - obj.getScore(C.cAqua + C.Bold + "Stacker").setScore(line--); - player.getScoreboard().resetScores(Get(player).BestPig); - Get(player).BestPig = _pigStacker; - obj.getScore(Get(player).BestPig).setScore(line--); + obj.getScore(C.cAqua + C.Bold + "Server").setScore(line--); + obj.getScore(GetPlugin().getConfig().getString("serverstatus.name")).setScore(line--); //Space obj.getScore(" ").setScore(line--); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index f63c1d54c..5ada44ded 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -964,7 +964,7 @@ public class GameLobbyManager implements Listener, IPacketHandler objective.getScore(" ").setScore(line--); - objective.getScore(C.cYellow + "Players").setScore(line--); + objective.getScore(C.cYellow + C.Bold + "Players").setScore(line--); // Remove Old entry.getValue().resetScores(_oldPlayerCount + "/" + _oldMaxPlayerCount); @@ -1014,10 +1014,16 @@ public class GameLobbyManager implements Listener, IPacketHandler _gemMap.put(entry.getKey(), Manager.GetDonation().Get(entry.getKey().getName()).GetGems()); + //Server + objective.getScore(" ").setScore(line--); + objective.getScore(C.cAqua + C.Bold + "Server").setScore(line--); + objective.getScore(Manager.GetPlugin().getConfig().getString("serverstatus.name")).setScore(line--); + + //ELO if (Manager.GetGame() != null && Manager.GetGame().EloRanking) { objective.getScore(" ").setScore(line--); - objective.getScore(C.cYellow + C.Bold + "Elo").setScore(line--); + objective.getScore(C.cPurple + C.Bold + "Elo").setScore(line--); // Remove old entry.getValue().resetScores(_eloMap.get(entry.getKey()) + " "); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java index b23bd3e13..93892ffd5 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java @@ -144,7 +144,14 @@ public class GameLootManager implements Listener { if (Manager.GetClients().Get(player).GetRank().Has(Rank.HERO)) { - chance *= 1.4; + if (Manager.GetClients().Get(player).GetRank().Has(Rank.LEGEND)) + { + chance *= 1.6; + } + else + { + chance *= 1.4; + } } else { From 9daee9733ff74eda93c6b021a591e3160ef5b54a Mon Sep 17 00:00:00 2001 From: Chiss Date: Thu, 8 Jan 2015 13:08:15 +1100 Subject: [PATCH 2/5] Fixed UHC height limit fixed UHC rejoin health bug --- .../src/nautilus/game/arcade/game/TeamGame.java | 7 +++++++ .../src/nautilus/game/arcade/game/games/uhc/UHC.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java index b2e31d788..d6b07639c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java @@ -24,6 +24,7 @@ public abstract class TeamGame extends Game private NautHashMap _rejoinTime = new NautHashMap(); protected NautHashMap RejoinTeam = new NautHashMap(); protected NautHashMap RejoinKit = new NautHashMap(); + protected NautHashMap RejoinHealth = new NautHashMap(); protected long RejoinTime = 120000; @@ -79,6 +80,8 @@ public abstract class TeamGame extends Game if (GetKit(player) != null) RejoinKit.put(player.getName(), GetKit(player)); + + RejoinHealth.put(player.getName(), player.getHealth()); GetLocationStore().put(player.getName(), player.getLocation()); @@ -104,6 +107,9 @@ public abstract class TeamGame extends Game Kit kit = RejoinKit.remove(event.getPlayer().getName()); if (kit != null) _playerKit.put(event.getPlayer(), kit); + + if (RejoinHealth.containsKey(event.getPlayer().getName())) + event.getPlayer().setHealth(RejoinHealth.remove(event.getPlayer().getName())); return; } @@ -142,6 +148,7 @@ public abstract class TeamGame extends Game Announce(team.GetColor() + C.Bold + name + " did not reconnect in time!", false); RejoinKit.remove(name); + RejoinHealth.remove(name); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java index 991d16df0..fb1578829 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java @@ -461,7 +461,7 @@ public class UHC extends TeamGame if (event.getBlock().getX() >= -16 && event.getBlock().getX() <= 16 && event.getBlock().getZ() >= -16 && - event.getBlock().getZ() >= 16 && + event.getBlock().getZ() <= 16 && event.getBlock().getY() >= _yMax) { UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot build this high up.")); From 9863b701d88704ce98f58a9cf66bf834a92444c6 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 10 Jan 2015 08:54:00 +1300 Subject: [PATCH 3/5] Fixed typos in descriptions of SSM kits Wolf and WitherSkele --- .../game/arcade/game/games/smash/kits/KitWitherSkeleton.java | 4 ++-- .../src/nautilus/game/arcade/kit/perks/PerkWolf.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWitherSkeleton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWitherSkeleton.java index d52632673..e1fa8b258 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWitherSkeleton.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWitherSkeleton.java @@ -49,8 +49,8 @@ public class KitWitherSkeleton extends SmashKit new String[] { ChatColor.RESET + "Launch a Wither Skull forwards, hold", - ChatColor.RESET + "block to guide the missile! Release", - ChatColor.RESET + "block to detonate it midair.", + ChatColor.RESET + "block to guide the missile!", + ChatColor.RESET + "Detonates on collision.", })); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java index 15f3f4d2c..f1e6e6338 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java @@ -56,7 +56,7 @@ public class PerkWolf extends Perk C.cGray + "Attacks give +1 Damage for 3 seconds. Stacks.", C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Cub Tackle", C.cYellow + "Right-Click" + C.cGray + " with Spade to use " + C.cGreen + "Wolf Strike", - C.cGray + "Wolf Strike deals 200% Knockback to tackled opponents.", + C.cGray + "Wolf Strike deals 300% Knockback to tackled opponents.", }); } From 6343a00b537d3fff30ff2d57c352cbb21fc781cf Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 10 Jan 2015 09:08:35 +1300 Subject: [PATCH 4/5] Instead of removing the shot arrow, cancel the event instead. Fixes kit Shredder being usable during buildtime --- .../nautilus/game/arcade/game/games/turfforts/TurfForts.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java index d650df897..1e22d7524 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java @@ -274,7 +274,7 @@ public class TurfForts extends TeamGame if (!_fight) { UtilPlayer.message(event.getEntity(), F.main("Game", "You cannot attack during Build Time!")); - event.getProjectile().remove(); + event.setCancelled(true); } } From fa59ed52b98bcfdaa5b1f7d588a01417f8410a52 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 11 Jan 2015 09:49:46 +1300 Subject: [PATCH 5/5] Fixed arrow count not updating on shoot cancel Spectators are now permitted to walk on enemy turf --- .../game/arcade/game/games/turfforts/TurfForts.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java index 1e22d7524..f817a328a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java @@ -13,6 +13,7 @@ import org.bukkit.Sound; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -24,9 +25,9 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityShootBowEvent; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.ProjectileHitEvent; + import net.minecraft.server.v1_7_R4.EntityArrow; import net.minecraft.server.v1_7_R4.Item; - import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.MapUtil; @@ -275,6 +276,8 @@ public class TurfForts extends TeamGame { UtilPlayer.message(event.getEntity(), F.main("Game", "You cannot attack during Build Time!")); event.setCancelled(true); + + ((Player) event.getEntity()).updateInventory(); } } @@ -599,6 +602,9 @@ public class TurfForts extends TeamGame { for (Player player : team.GetPlayers(true)) { + if (((CraftPlayer) player).getHandle().spectating) + continue; + Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN); while (block.getTypeId() != 159 && block.getY() > 0) block = block.getRelative(BlockFace.DOWN);