diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/safezone/SafezoneModule.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/safezone/SafezoneModule.java index 0673dadb9..795dcaaa3 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/safezone/SafezoneModule.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/safezone/SafezoneModule.java @@ -138,7 +138,7 @@ public class SafezoneModule extends MiniPlugin Player player = (Player) event.getEntity(); - if (isInSafeZone(player)) + if (isInSafeZone(player) && _playerStatus.Get(player).getStatusType() != PlayerStatusType.COMBAT) { event.setCancelled(true); } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java index f5eb8b845..f40a2605b 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java @@ -14,16 +14,12 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.block.BlockBurnEvent; -import org.bukkit.event.block.BlockFadeEvent; -import org.bukkit.event.block.BlockIgniteEvent; +import org.bukkit.event.block.*; import org.bukkit.event.block.BlockIgniteEvent.IgniteCause; -import org.bukkit.event.block.BlockPlaceEvent; -import org.bukkit.event.block.LeavesDecayEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.event.hanging.HangingBreakEvent; +import org.bukkit.event.inventory.FurnaceSmeltEvent; import org.bukkit.event.player.*; import org.bukkit.event.weather.WeatherChangeEvent; import org.bukkit.event.world.ChunkUnloadEvent; @@ -216,6 +212,23 @@ public class WorldListeners implements Listener event.setCancelled(true); } + @EventHandler + public void fishingExpRemove(PlayerFishEvent event) + { + event.setExpToDrop(0); + } + + @EventHandler + public void smelt(BlockExpEvent event) + { + Material material = event.getBlock().getType(); + + if (material == Material.FURNACE || material == Material.BURNING_FURNACE) + { + event.setExpToDrop(0); + } + } + public boolean shouldBlock(Player player) { return player.getGameMode() != GameMode.CREATIVE; diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/blizzard/BlizzardWorldEvent.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/blizzard/BlizzardWorldEvent.java index 776e17506..031abd340 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/blizzard/BlizzardWorldEvent.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/blizzard/BlizzardWorldEvent.java @@ -37,7 +37,6 @@ public class BlizzardWorldEvent extends WorldEvent private static final double START_CHANCE = 0.01; private static final long MAX_TIME = TimeUnit.MINUTES.toMillis(10); private static final long GRACE_TIME = TimeUnit.SECONDS.toMillis(60); - private static final long WARM_TIME = TimeUnit.SECONDS.toMillis(5); private static final int DAMAGE = 2; private static final String TIP = "EQUIP LEATHER ARMOUR OR GET NEAR A FIRE"; @@ -108,8 +107,13 @@ public class BlizzardWorldEvent extends WorldEvent { if (shouldDamage(player)) { + _playerStatus.setStatus(player, PlayerStatusType.COLD); _damage.NewDamageEvent(player, null, null, DamageCause.CUSTOM, DAMAGE, false, true, true, "Hurricane", "Frostbite"); } + else + { + _playerStatus.setStatus(player, PlayerStatusType.WARM); + } } } } @@ -141,30 +145,8 @@ public class BlizzardWorldEvent extends WorldEvent } } - _playerStatus.setStatus(player, PlayerStatusType.WARM, WARM_TIME); return false; } - - @EventHandler - public void updatePlayerStatus(UpdateEvent event) - { - if (event.getType() != UpdateType.SLOW || !isLive()) - { - return; - } - - for (Player player : Bukkit.getOnlinePlayers()) - { - PlayerStatus status = _playerStatus.Get(player); - - if (status.getStatusType() == PlayerStatusType.COLD) - { - continue; - } - - _playerStatus.setStatus(player, PlayerStatusType.COLD, true); - } - } @Override public void onStart() diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/giant/GiantWorldEvent.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/giant/GiantWorldEvent.java index 1461add88..213b9a1aa 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/giant/GiantWorldEvent.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/worldevent/giant/GiantWorldEvent.java @@ -73,7 +73,7 @@ public class GiantWorldEvent extends WorldEvent public void onEnd() { ItemStack itemStack = SkinData.OMEGA_CHEST.getSkull(C.cAqua + "Omega Chest", new ArrayList<>()); - LootChestReward reward = new LootChestReward(CASH_OUT_DELAY, SkinData.OMEGA_CHEST.getSkull(C.cAqua + "Omega Chest", null), "Omega", 1); + LootChestReward reward = new LootChestReward(CASH_OUT_DELAY, itemStack, "Omega", 1); _worldData.World.dropItemNaturally(getEventLocations()[0], itemStack);