diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java index 01925be94..4f474f52c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java @@ -15,6 +15,13 @@ public enum Achievement new String[]{"+1 for every Gem earned in any game."}, new int[]{10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000}, AchievementCategory.GLOBAL), + + GLOBAL_PUMPKIN_SMASHER_2015("2015 Pumpkin Smasher", 4000, + new String[]{"Global.Halloween Pumpkins 2015"}, + new String[]{"Smash 200 Flaming Pumpkins,", + "during Halloween 2015!"}, + new int[]{200}, + AchievementCategory.HOLIDAY), //Bridges BRIDGES_WINS("Bridge Champion", 600, diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementCategory.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementCategory.java index 636176b02..c28c8ef17 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementCategory.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementCategory.java @@ -20,6 +20,10 @@ public enum AchievementCategory new StatDisplay[] { StatDisplay.GEMS_EARNED, null, new StatDisplay("Games Played", "GamesPlayed"), StatDisplay.TIME_IN_GAME, null, new StatDisplay("Daily Rewards", "DailyReward"), new StatDisplay("Times Voted", "DailyVote"), null, new StatDisplay("Chests Opened", "Treasure.Old", "Treasure.Ancient", "Treasure.Mythical") }, Material.EMERALD, 0, GameCategory.GLOBAL, "None"), + + HOLIDAY("Holiday Achievements", null, + new StatDisplay[] {}, + Material.PUMPKIN_PIE, 0, GameCategory.HOLIDAY, "None"), BRIDGES("The Bridges", null, new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED }, @@ -257,6 +261,6 @@ public enum AchievementCategory public enum GameCategory { - GLOBAL, SURVIVAL, CLASSICS, CHAMPIONS, ARCADE + GLOBAL, HOLIDAY, SURVIVAL, CLASSICS, CHAMPIONS, ARCADE } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementMainPage.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementMainPage.java index 68d43a09e..66966b828 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementMainPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementMainPage.java @@ -41,7 +41,7 @@ public class AchievementMainPage extends ShopPageBase pageLayout = new ItemLayout( - "XXXXOXXXX", + "XXXXOXXXO", "OXOXOXOXO", "OXOXOXOXO", "XXOXOXOXX").getItemSlots(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 76e4c2e9d..e009134fa 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -1583,4 +1583,24 @@ public class ArcadeManager extends MiniPlugin implements IRelation event.GetBlocks().clear(); } } + + @EventHandler + public void spawnDebug(PlayerCommandPreprocessEvent event) + { + if (event.getPlayer().isOp() && event.getMessage().contains("setmax")) + { + try + { + int i = Integer.parseInt(event.getMessage().split(" ")[1]); + + _serverConfig.MaxPlayers = i; + } + catch (Exception e) + { + + } + + event.setCancelled(true); + } + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java index eb0edb352..1c5d2233f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java @@ -195,10 +195,13 @@ public class GameGemManager implements Listener double hoursOnline = timeOnline/3600000d; - if (hoursOnline > 5) - hoursOnline = 5; - - total += (int)(earned * (hoursOnline * 0.2)); + if (hoursOnline < 24) + { + if (hoursOnline > 5) + hoursOnline = 5; + + total += (int)(earned * (hoursOnline * 0.2)); + } } if (DoubleGem && game.GemDoubleEnabled) @@ -313,17 +316,20 @@ public class GameGemManager implements Listener double hoursOnline = timeOnline/3600000d; - if (hoursOnline > 5) - hoursOnline = 5; - - int extraGems = (int)(earnedGems * (hoursOnline * 0.2)); - - if (extraGems > 0) + if (hoursOnline < 24) { - UtilPlayer.message(player, F.elem(C.cGreen + "+" + extraGems + " Gems") + " for " + - F.elem("Online for " + UtilTime.MakeStr(timeOnline) + C.cGreen + " +" + (int)(hoursOnline * 20) + "%")); - - totalGems += extraGems; + if (hoursOnline > 5) + hoursOnline = 5; + + int extraGems = (int)(earnedGems * (hoursOnline * 0.2)); + + if (extraGems > 0) + { + UtilPlayer.message(player, F.elem(C.cGreen + "+" + extraGems + " Gems") + " for " + + F.elem("Online for " + UtilTime.MakeStr(timeOnline) + C.cGreen + " +" + (int)(hoursOnline * 20) + "%")); + + totalGems += extraGems; + } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java index 25e5ca003..d26c941c9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java @@ -41,6 +41,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockDamageEvent; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.inventory.ItemStack; @@ -82,6 +83,7 @@ public class HolidayManager implements Listener } private HolidayType type = HolidayType.Halloween; + private String _statName = "Halloween Pumpkins 2015"; ArcadeManager Manager; private TitanGiveawayManager _titanManager; @@ -153,7 +155,7 @@ public class HolidayManager implements Listener { UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, block.getLocation().add(0.5, 0.2, 0.5), 0.3f, 0.2f, 0.3f, 0, 1, ViewDist.LONG, UtilServer.getPlayers()); - + if (Math.random() > 0.90) { Item egg = block.getWorld().dropItem(block.getLocation().add(0.5, 0.8, 0.5), @@ -164,7 +166,7 @@ public class HolidayManager implements Listener block.getWorld().playSound(block.getLocation(), Sound.CHICKEN_EGG_POP, 0.25f + (float)Math.random() * 0.75f, 0.75f + (float)Math.random() * 0.5f); } - + if (Math.random() > 0.95) { sendChestPackets(block); @@ -184,7 +186,7 @@ public class HolidayManager implements Listener if (Manager.GetGameHostManager().isPrivateServer()) return; - + Game game = Manager.GetGame(); int requirement = (int)((double)Manager.GetPlayerFull() * 0.5d); @@ -243,7 +245,7 @@ public class HolidayManager implements Listener for (Player other : UtilServer.getPlayers()) ((CraftPlayer) other).getHandle().playerConnection.sendPacket(packet); } - + private Block findSpecialBlockLocation(Game game) { Block block = null; @@ -282,43 +284,20 @@ public class HolidayManager implements Listener } return null; - } +} - @EventHandler - public void specialBlockInteract(PlayerInteractEvent event) - { - if (UtilPlayer.isSpectator(event.getPlayer())) - return; - - if (!UtilEvent.isAction(event, ActionType.R_BLOCK)) - return; - - if (event.getClickedBlock() == null) - return; - - if (event.getClickedBlock().getType() != Material.CHEST) - return; - - if (!_active.contains(event.getClickedBlock())) - return; - - event.setCancelled(true); - - specialBlockBreak(event.getPlayer(), event.getClickedBlock()); - } - @EventHandler public void specialBlockDamage(BlockDamageEvent event) { if (UtilPlayer.isSpectator(event.getPlayer())) return; - + if (Manager.GetGame() != null && !Manager.GetGame().IsAlive(event.getPlayer())) return; if (!_active.contains(event.getBlock())) return; - + specialBlockBreak(event.getPlayer(), event.getBlock()); } @@ -327,6 +306,12 @@ public class HolidayManager implements Listener block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, type.getBlockType()); block.setType(Material.AIR); + if (player != null && Manager.GetGame() != null) + { + Manager.GetGame().AddStat(player, _statName, 1, false, true); + System.out.println("Recording Pumpkin Break for " + player.getName()); + } + //Coins for (int i=0 ; i < 4 + Math.random()*8 ; i++) { @@ -386,7 +371,7 @@ public class HolidayManager implements Listener { if (UtilPlayer.isSpectator(event.getPlayer())) return; - + if (_coins.contains(event.getItem())) { event.setCancelled(true); @@ -411,7 +396,7 @@ public class HolidayManager implements Listener event.setCancelled(true); } } - + @EventHandler public void itemClean(UpdateEvent event) { @@ -457,4 +442,13 @@ public class HolidayManager implements Listener } } } + + @EventHandler + public void spawnDebug(PlayerCommandPreprocessEvent event) + { + if (event.getPlayer().isOp() && event.getPlayer().getName().equals("Chiss") && event.getMessage().contains("pumpkin")) + { + spawnSpecialBlock(event.getPlayer().getLocation().getBlock()); + } + } }