diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/ArcadeMainPage.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/ArcadeMainPage.java index 5ffbe3e88..da96e2cc1 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/ArcadeMainPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/ArcadeMainPage.java @@ -19,9 +19,6 @@ import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; import mineplex.core.stats.StatsManager; -/** - * Created by Shaun on 8/25/2014. - */ public class ArcadeMainPage extends AchievementMainPage { public ArcadeMainPage(AchievementManager plugin, StatsManager statsManager, AchievementShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, Player target) @@ -32,7 +29,7 @@ public class ArcadeMainPage extends AchievementMainPage @Override protected void buildPage() { - int slot = 10; + int slot = 9; for (AchievementCategory category : AchievementCategory.values()) { @@ -49,13 +46,10 @@ public class ArcadeMainPage extends AchievementMainPage lore.add(" "); lore.add(ChatColor.RESET + "Click for more details!"); - if (slot == 18 || slot == 27 || slot == 36) - slot++; - ShopItem shopItem = new ShopItem(category.getIcon(), category.getIconData(), C.Bold + category.getFriendlyName(), lore.toArray(new String[0]), 1, false, false); addButton(slot, shopItem, button); - slot += 2; + slot += ((slot + 1) % 9 == 0) ? 1 : 2; } addBackButton(); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 14436d0be..d2637c0b7 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -523,8 +523,6 @@ public class HubManager extends MiniClientPlugin else { event.setJoinMessage(C.cGreen + C.Bold + "Legend " + playerName + " has joined!"); - UtilFirework.playFirework(player.getEyeLocation(), org.bukkit.FireworkEffect.Type.BALL_LARGE, Color.LIME, true, true); - player.getWorld().playSound(player.getEyeLocation(), Sound.WITHER_SPAWN, 2f, 1f); } //Teleport diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 013ebce6e..c59880714 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -715,6 +715,11 @@ public class ServerManager extends MiniPlugin return _serverNpcShopMap.get("Beta Games"); } + public ServerNpcShop getUHCShop() + { + return _serverNpcShopMap.get("Ultra Hardcore"); + } + public ServerNpcShop getPlayerGamesShop() { return _serverNpcShopMap.get("Mineplex Player Servers"); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java index da19364e2..18734c897 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java @@ -27,6 +27,7 @@ import mineplex.hub.server.ui.button.SelectPLAYERButton; import mineplex.hub.server.ui.button.SelectSGButton; import mineplex.hub.server.ui.button.SelectSSMButton; import mineplex.hub.server.ui.button.SelectTDMButton; +import mineplex.hub.server.ui.button.SelectUHCButton; import mineplex.hub.server.ui.button.SelectWIZButton; public class ServerGameMenu extends ShopPageBase @@ -143,8 +144,18 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "", ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BH") + ChatColor.RESET + " other players!", })); + + setItem(36, ItemStackFactory.Instance.CreateStack(Material.GOLDEN_APPLE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "UHC " + C.cGray + "Ultra Hardcore Mode", new String[] + { + ChatColor.RESET + "", + ChatColor.RESET + "Extremely hard team-based survival ", + ChatColor.RESET + "Gather materials and fight your way", + ChatColor.RESET + "to become the last team standing!", + ChatColor.RESET + "", + ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("UHC") + ChatColor.RESET + " other players!", + })); - setItem(37, ItemStackFactory.Instance.CreateStack(Material.WOOD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Master Builders " + C.cGray + "Creative Build", new String[] + setItem(38, ItemStackFactory.Instance.CreateStack(Material.WOOD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Master Builders " + C.cGray + "Creative Build", new String[] { ChatColor.RESET + "", ChatColor.RESET + "Players are given a Build Theme and ", @@ -154,9 +165,9 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BLD") + ChatColor.RESET + " other players!", })); - setItem(39, _minigameCycle.get(_minigameIndex)); + setItem(40, _minigameCycle.get(_minigameIndex)); - setItem(41, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte) 3, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Player Servers " + C.cGray + "Player Hosted Games", new String[] + setItem(42, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte) 3, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Player Servers " + C.cGray + "Player Hosted Games", new String[] { ChatColor.RESET + "", ChatColor.RESET + "Join your friends in their own ", @@ -165,7 +176,7 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "", })); - setItem(43, ItemStackFactory.Instance.CreateStack(Material.ANVIL.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Beta Games " + C.cGray + "Play Unreleased Games", new String[] + setItem(44, ItemStackFactory.Instance.CreateStack(Material.ANVIL.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Beta Games " + C.cGray + "Play Unreleased Games", new String[] { ChatColor.RESET + "", ChatColor.RESET + "Help test and improve our ", @@ -185,10 +196,11 @@ public class ServerGameMenu extends ShopPageBase getButtonMap().put(22, new SelectDOMButton(this)); getButtonMap().put(24, new SelectTDMButton(this)); getButtonMap().put(26, new SelectBHButton(this)); - getButtonMap().put(37, new SelectBLDButton(this)); - getButtonMap().put(39, new SelectMINButton(this)); - getButtonMap().put(41, new SelectPLAYERButton(this)); - getButtonMap().put(43, new SelectBETAButton(this)); + getButtonMap().put(36, new SelectUHCButton(this)); + getButtonMap().put(38, new SelectBLDButton(this)); + getButtonMap().put(40, new SelectMINButton(this)); + getButtonMap().put(42, new SelectPLAYERButton(this)); + getButtonMap().put(44, new SelectBETAButton(this)); } @SuppressWarnings("deprecation") @@ -521,6 +533,11 @@ public class ServerGameMenu extends ShopPageBase getPlugin().getBetaShop().attemptShopOpen(player); } + public void openUHC(Player player) + { + getPlugin().getUHCShop().attemptShopOpen(player); + } + public void openPlayerGames(Player player) { getPlugin().getPlayerGamesShop().attemptShopOpen(player); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectUHCButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectUHCButton.java new file mode 100644 index 000000000..ce17cdd24 --- /dev/null +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectUHCButton.java @@ -0,0 +1,23 @@ +package mineplex.hub.server.ui.button; + +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.ClickType; + +import mineplex.core.shop.item.IButton; +import mineplex.hub.server.ui.ServerGameMenu; + +public class SelectUHCButton implements IButton +{ + private ServerGameMenu _menu; + + public SelectUHCButton(ServerGameMenu menu) + { + _menu = menu; + } + + @Override + public void onClick(Player player, ClickType clickType) + { + _menu.openUHC(player); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index d65ca56fb..340a24e22 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -1,10 +1,10 @@ package nautilus.game.arcade; import java.io.File; - import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; +import net.minecraft.server.v1_7_R4.BiomeBase; import net.minecraft.server.v1_7_R4.MinecraftServer; import mineplex.core.CustomTagFix; import mineplex.core.TablistFix; @@ -41,7 +41,6 @@ import mineplex.core.projectile.ProjectileManager; import mineplex.core.punish.Punish; import mineplex.core.recharge.Recharge; import mineplex.core.serverConfig.ServerConfiguration; -import mineplex.core.spawn.Spawn; import mineplex.core.status.ServerStatusManager; import mineplex.core.teleport.Teleport; import mineplex.core.updater.FileUpdater; @@ -141,6 +140,12 @@ public class Arcade extends JavaPlugin getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1); MinecraftServer.getServer().getPropertyManager().setProperty("debug", true); + + // Remove nasty biomes from natural terrain generation, used for UHC + BiomeBase.getBiomes()[BiomeBase.OCEAN.id] = BiomeBase.PLAINS; + BiomeBase.getBiomes()[BiomeBase.DEEP_OCEAN.id] = BiomeBase.PLAINS; + BiomeBase.getBiomes()[BiomeBase.SWAMPLAND.id] = BiomeBase.PLAINS; + BiomeBase.getBiomes()[BiomeBase.RIVER.id] = BiomeBase.PLAINS; } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java index 121ada7c7..9e5a9bc64 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java @@ -183,18 +183,18 @@ public class Build extends SoloGame "Cat", "Truck", "Bicycle", "Soda", "Music Instrument", "Statue", "Pot of Gold", "Shrek", "Fruit", "Breakfast", "Toaster", "Robot", "Camping", "Rocket", "Aliens", "Shipwreck", "Spongebob", "Car", "Potted Plant", "Weapons", "Christmas", "King", "Queen", "Angel", "Demon", "Halloween", "Tank", "Helicopter", "Knight", "Rabbit", - "Sandwich", "Snowman", "Basketball", "Ice Cream", "Sea Shell", "Lightbulb", "Rainbow", "iPad", "Crayon", - "Volcano", "Hot Tub", "Octopus", "Ghost", "Ant", "Cheese", "Kite", "Reptile", "Leaning Tower Pisa", - "Disney", "Space Ship", "Pixel Art", "Chicken", "Shoe", "Owl", "Bear", "Flowers", "Teapot", "Lighthouse", - "Lion", "Grandfather Clock", "Nintendo", "Television", "Batman", "Tiger", "Computer", "Castle", "House", - "Bed", "Party", "Volleyball", "Toys", "Hula Hooper", "Bow", "Library", "Love", "Seasons", "Skull", + "Sandwich", "Snowman", "Ice Cream", "Sea Shell", "Rainbow", + "Volcano", "Hot Tub", "Octopus", "Ghost", "Ant", "Cheese", "Kite Flying", "Reptile", + "Space Ship", "Pixel Art", "Chicken", "Shoe", "Owl", "Bear", "Flowers", "Lighthouse", + "Lion", "Television", "Batman", "Tiger", "Castle", "House", + "Bed", "Party", "Volleyball", "Toys", "Library", "Love", "Skull", "Hat", "Snake", "Vacation", "Umbrella", "Magic", "Tornado", "Candy", "Dentist", "Pizza", "Bird", - "Superhero", "Turtle", "Chicken", "School", "Build Anything!", "Cabin", "Coral Reef", "Food", "Picnic", - "Trophy", "Pool", "Telephone", "Cell Phone", "Hot Air Balloon", "Train", "Candyland", "Chocolate Bar", - "Mountain", "Potato", "Glasses", "Domino", "Clown", "River", "Mario", "Luigi", "Windmill", "Alligator", - "Police", "Igloo", "Puppy", "Gift", "Harry Potter", "Desk", "Bumblebee", "Jellyfish", "Speedboat", - "Fall", "Summer", "Autumn", "Winter", "Sunset", "Calculator", "Disco", "Giant", "Moose", "Salad", - "Water Gun", "Astronaut", "Kitchen", "Wither", "Meteor" + "Superhero", "Turtle", "Chicken", "Build Anything!", "Food", "Picnic", + "Trophy", "Pool Party", "Hot Air Balloon", "Train", "Chocolate Bar", + "Clown", "Windmill", "Alligator", + "Police", "Igloo", "Gift", "Bumblebee", "Jellyfish", "Speedboat", + "Fall", "Summer", "Autumn", "Winter", "Disco", "Moose", + "Water Gun", "Astronaut", "Wither", "Meteor" }; _mobShop = new MobShop(getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java index 36372ad48..1b906e4e7 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java @@ -313,6 +313,8 @@ public class Draw extends SoloGame if (++wordsInMessage >= 3) { UtilPlayer.message(player, F.main("Game", "Multiple guesses are not allowed!")); + + event.setCancelled(true); return; } } @@ -347,10 +349,10 @@ public class Draw extends SoloGame { UtilPlayer.message(player, F.main("Game", "You have already guessed the word!")); } - } - event.setCancelled(true); - return; + event.setCancelled(true); + return; + } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventGame.java index 1f34e2cbd..2cf41e397 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventGame.java @@ -824,7 +824,7 @@ public class EventGame extends SoloGame return; } - if (Manager.GetGameHostManager().isAdmin(target, false)) + if (!Manager.GetGameHostManager().isAdmin(target, false)) Manager.GetGameHostManager().giveAdmin(target); else Manager.GetGameHostManager().removeAdmin(target.getName()); 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 a1f29df6a..85a62be1d 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 @@ -43,7 +43,6 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerPortalEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; -import org.bukkit.event.world.ChunkLoadEvent; import org.bukkit.event.world.ChunkUnloadEvent; import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.ItemStack; @@ -83,10 +82,8 @@ import mineplex.serverdata.Utility; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; import nautilus.game.arcade.events.GameStateChangeEvent; -import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.TeamGame; -import nautilus.game.arcade.game.Game.GameState; import nautilus.game.arcade.kit.Kit; public class UHC extends TeamGame @@ -231,6 +228,23 @@ public class UHC extends TeamGame } } + @EventHandler + public void onDamage(CustomDamageEvent event) + { + if (!IsLive()) + return; + + if (UtilTime.elapsed(getGameLiveTime(), 20000)) + return; + + if (!(event.GetDamageeEntity() instanceof Player)) + return; + + event.SetCancelled("Spawn Invincibility"); + event.GetDamageeEntity().setFireTicks(0); + + } + @EventHandler public void onSecond(UpdateEvent event) { @@ -1710,6 +1724,9 @@ public class UHC extends TeamGame return; } + if (event.getPlayer().equals(target)) + return; + selectTeamMate(event.getPlayer(), target); } @@ -1738,11 +1755,11 @@ public class UHC extends TeamGame if (team == null) return; + team.setDisplayName(player.getName() + " & " + ally.getName()); + //Join Team SetPlayerTeam(player, team, true); - SetPlayerTeam(ally, team, true); - - team.setDisplayName(player.getName() + " & " + ally.getName()); + SetPlayerTeam(ally, team, true); } //Send Invite else diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java index ab5ccdb2c..1280ce912 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java @@ -54,10 +54,10 @@ public class ExperienceStatTracker extends StatTracker gemExp += (int)gem.Gems; } - gemExp = Math.min(gemExp, 250) * 3; + gemExp = Math.min(gemExp, 250) * 6; //Game Time = 1 Exp per 3 Seconds - double timeExp = (System.currentTimeMillis() - _startTime)/2000d; + double timeExp = (System.currentTimeMillis() - _startTime)/1500d; //Mult double mult = 1;