Fix up more issues from testing

This commit is contained in:
Sam 2018-01-10 13:55:10 +00:00 committed by Alexander Meech
parent 35c932048f
commit f11f95a3d7
5 changed files with 27 additions and 12 deletions

View File

@ -205,15 +205,20 @@ public abstract class Skywars extends Game
.addItem(new ItemStack(Material.GOLD_CHESTPLATE)) .addItem(new ItemStack(Material.GOLD_CHESTPLATE))
.addItem(new ItemStack(Material.GOLD_LEGGINGS)) .addItem(new ItemStack(Material.GOLD_LEGGINGS))
.addItem(new ItemStack(Material.GOLD_BOOTS)) .addItem(new ItemStack(Material.GOLD_BOOTS))
.setAmountsPerChest(1, 2) .setAmountsPerChest(2, 3)
, ,
new ChestLootPool() new ChestLootPool()
.addItem(new ItemStack(Material.WOOD_SWORD)) .addItem(new ItemStack(Material.WOOD_SWORD))
.addItem(new ItemStack(Material.STONE_SWORD)) .addItem(new ItemStack(Material.STONE_SWORD))
.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1)
.addEnchantment(Enchantment.PROTECTION_PROJECTILE, 1)
.setEnchantmentRarity(0.5)
,
new ChestLootPool()
.addItem(new ItemStack(Material.STONE_AXE)) .addItem(new ItemStack(Material.STONE_AXE))
.addItem(new ItemStack(Material.STONE_SPADE)) .addItem(new ItemStack(Material.STONE_SPADE))
.setAmountsPerChest(1, 2)
.setProbability(0.8) .setProbability(0.8)
, ,
@ -294,6 +299,7 @@ public abstract class Skywars extends Game
.addItem(new ItemStack(Material.LAVA_BUCKET), 80) .addItem(new ItemStack(Material.LAVA_BUCKET), 80)
.addItem(new ItemStack(Material.WATER_BUCKET)) .addItem(new ItemStack(Material.WATER_BUCKET))
.addItem(new ItemStack(Material.ENDER_PEARL), 1, 2) .addItem(new ItemStack(Material.ENDER_PEARL), 1, 2)
.setAmountsPerChest(1, 2)
, ,
new ChestLootPool() new ChestLootPool()
@ -312,10 +318,10 @@ public abstract class Skywars extends Game
.addItem(new ItemStack(Material.IRON_CHESTPLATE)) .addItem(new ItemStack(Material.IRON_CHESTPLATE))
.addItem(new ItemStack(Material.IRON_LEGGINGS)) .addItem(new ItemStack(Material.IRON_LEGGINGS))
.addItem(new ItemStack(Material.IRON_BOOTS)) .addItem(new ItemStack(Material.IRON_BOOTS))
.addItem(new ItemStack(Material.DIAMOND_HELMET), 30) .addItem(new ItemStack(Material.DIAMOND_HELMET), 20)
.addItem(new ItemStack(Material.DIAMOND_CHESTPLATE), 30) .addItem(new ItemStack(Material.DIAMOND_CHESTPLATE), 20)
.addItem(new ItemStack(Material.DIAMOND_LEGGINGS), 30) .addItem(new ItemStack(Material.DIAMOND_LEGGINGS), 20)
.addItem(new ItemStack(Material.DIAMOND_BOOTS), 30) .addItem(new ItemStack(Material.DIAMOND_BOOTS), 20)
.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2) .addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2)
.addEnchantment(Enchantment.PROTECTION_PROJECTILE, 2) .addEnchantment(Enchantment.PROTECTION_PROJECTILE, 2)
.setAmountsPerChest(1, 2) .setAmountsPerChest(1, 2)
@ -329,7 +335,7 @@ public abstract class Skywars extends Game
, ,
new ChestLootPool() new ChestLootPool()
.addItem(new ItemStack(Material.DIAMOND_SWORD)) .addItem(new ItemStack(Material.DIAMOND_SWORD), 30)
.addItem(new ItemStack(Material.DIAMOND), 1, 3) .addItem(new ItemStack(Material.DIAMOND), 1, 3)
.addItem(new ItemStack(Material.STICK), 1, 3) .addItem(new ItemStack(Material.STICK), 1, 3)
.setProbability(0.4) .setProbability(0.4)
@ -370,7 +376,7 @@ public abstract class Skywars extends Game
.addItem(new ItemStack(Material.WATER_BUCKET)) .addItem(new ItemStack(Material.WATER_BUCKET))
.addItem(new ItemStack(Material.ENDER_PEARL), 1, 2) .addItem(new ItemStack(Material.ENDER_PEARL), 1, 2)
.addItem(new ItemStack(Material.MUSHROOM_SOUP)) .addItem(new ItemStack(Material.MUSHROOM_SOUP))
.setAmountsPerChest(1, 2) .setAmountsPerChest(1, 3)
, ,
new ChestLootPool() new ChestLootPool()
@ -444,7 +450,7 @@ public abstract class Skywars extends Game
} }
// Store which chests are closest to which spawn // Store which chests are closest to which spawn
NautHashMap<Location, ArrayList<Location>> islandOres = new NautHashMap<Location, ArrayList<Location>>(); NautHashMap<Location, ArrayList<Location>> islandOres = new NautHashMap<>();
// Allocate chests to their nearest spawn point // Allocate chests to their nearest spawn point
for (Location oreLoc : WorldData.GetCustomLocs("56")) for (Location oreLoc : WorldData.GetCustomLocs("56"))
@ -553,7 +559,7 @@ public abstract class Skywars extends Game
} }
} }
@EventHandler(priority = EventPriority.MONITOR) @EventHandler(priority = EventPriority.HIGHEST)
public void blockBreakBonusDrops(BlockBreakEvent event) public void blockBreakBonusDrops(BlockBreakEvent event)
{ {
event.setExpToDrop(0); event.setExpToDrop(0);
@ -577,7 +583,8 @@ public abstract class Skywars extends Game
if (toDrop != null) if (toDrop != null)
{ {
event.setCancelled(true); event.setCancelled(true);
block.breakNaturally(toDrop); block.setType(Material.AIR);
block.getWorld().dropItemNaturally(block.getLocation().add(0.5, 0.5, 0.5), toDrop);
} }
} }

View File

@ -41,6 +41,7 @@ public class PerkVoidSaver extends SkywarsPerk
return; return;
} }
player.setItemInHand(null);
player.teleport(location.add(0, 2, 0)); player.teleport(location.add(0, 2, 0));
player.setFallDistance(0); player.setFallDistance(0);
player.getInventory().remove(Material.EYE_OF_ENDER); player.getInventory().remove(Material.EYE_OF_ENDER);

View File

@ -50,6 +50,7 @@ public abstract class SkywarsPerk extends Perk
return; return;
} }
event.setCancelled(true);
onUseItem(player); onUseItem(player);
} }

View File

@ -50,6 +50,12 @@ public class MapCrumbleModule extends Module
@Override @Override
public void run() public void run()
{ {
if (!getGame().equals(getGame().getArcadeManager().GetGame()))
{
cancel();
return;
}
World world = worldData.World; World world = worldData.World;
for (int x = worldData.MinX; x < worldData.MaxX; x++) for (int x = worldData.MinX; x < worldData.MaxX; x++)

View File

@ -9,7 +9,7 @@ public class ChestLootItem
private ItemStack _item; private ItemStack _item;
private int _lowestAmount, _highestAmount; private int _lowestAmount, _highestAmount;
public ChestLootItem(ItemStack item, int lowestAmount, int highestAmount) ChestLootItem(ItemStack item, int lowestAmount, int highestAmount)
{ {
_item = item; _item = item;
_lowestAmount = lowestAmount; _lowestAmount = lowestAmount;