diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java index 97a474c8a..8106f9e47 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java @@ -70,7 +70,6 @@ public abstract class Skywars extends Game private static final long CRUMBLE_TIME = TimeUnit.SECONDS.toMillis(100); - private MapCrumbleModule _mapCrumbleModule; private GeneratorModule _generatorModule; private final OreHider _oreHider; @@ -150,7 +149,7 @@ public abstract class Skywars extends Game @Override public void ParseData() { - _mapCrumbleModule = new MapCrumbleModule() + new MapCrumbleModule() .setEnableAfter(CRUMBLE_TIME, () -> { Announce(C.cGreenB + "The world begins to crumble...", false); @@ -159,8 +158,8 @@ public abstract class Skywars extends Game { player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1, 1); } - }); - _mapCrumbleModule.register(this); + }) + .register(this); new ZombieGuardianModule() .addSpawns(WorldData.GetDataLocs("RED")) @@ -295,7 +294,7 @@ public abstract class Skywars extends Game .addItem(new ItemStack(Material.LAVA_BUCKET), 80) .addItem(new ItemStack(Material.WATER_BUCKET)) .addItem(new ItemStack(Material.ENDER_PEARL), 1, 2) - .setProbability(0.8), + , new ChestLootPool() .addItem(createEnchantedBook(Enchantment.DAMAGE_ALL)) @@ -351,6 +350,7 @@ public abstract class Skywars extends Game new ChestLootPool() .addItem(new ItemStack(Material.COOKED_BEEF), 1, 3) .addItem(new ItemStack(Material.COOKED_CHICKEN), 1, 3) + .addItem(new ItemStack(Material.COOKED_FISH), 1, 3) .setAmountsPerChest(1, 2) .setProbability(0.8) , @@ -371,7 +371,7 @@ public abstract class Skywars extends Game .addItem(new ItemStack(Material.ENDER_PEARL), 1, 2) .addItem(new ItemStack(Material.MUSHROOM_SOUP)) .setAmountsPerChest(1, 2) - .setProbability(0.8), + , new ChestLootPool() .addItem(createEnchantedBook(Enchantment.DAMAGE_ALL)) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java index 12b874af1..9ceea1590 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java @@ -1,5 +1,6 @@ package nautilus.game.arcade.game.games.skywars.kits.perks; +import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -11,6 +12,7 @@ import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilInv; @@ -41,8 +43,9 @@ public abstract class SkywarsPerk extends Perk Player player = event.getPlayer(); ItemStack itemStack = player.getItemInHand(); + Block block = event.getClickedBlock(); - if (!hasPerk(player) || itemStack == null || !itemStack.isSimilar(_itemStack)) + if (!hasPerk(player) || itemStack == null || !itemStack.isSimilar(_itemStack) || UtilBlock.usable(block)) { return; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootPool.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootPool.java index 682485b6c..cbff2a886 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootPool.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootPool.java @@ -33,7 +33,7 @@ public class ChestLootPool public ChestLootPool addItem(ItemStack itemStack) { - return addItem(itemStack, itemStack.getAmount(), itemStack.getAmount(), 1); + return addItem(itemStack, itemStack.getAmount(), itemStack.getAmount(), DEFAULT_RARITY); } public ChestLootPool addItem(ItemStack itemStack, int rarity)