Piston heads, donkeys/mules, biomes in 1.9 fixes

This commit is contained in:
Esophose 2019-03-10 16:21:05 -06:00
parent f1ad953644
commit a73ed51bb1
4 changed files with 15 additions and 4 deletions

View File

@ -46,7 +46,7 @@ public class BiomeManager {
for (Player all : skyblock.getIslandManager().getPlayersAtIsland(island, IslandWorld.Normal)) {
try {
if (NMSUtil.getVersionNumber() < 10) {
if (NMSUtil.getVersionNumber() < 9) {
NMSUtil.sendPacket(all,
packetPlayOutMapChunkClass.getConstructor(chunkClass, boolean.class, int.class)
.newInstance(all.getLocation().getChunk().getClass().getMethod("getHandle")

View File

@ -30,7 +30,7 @@ public class BankCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration().getBoolean("Island.Bank.Disabled")) {
if (!fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration().getBoolean("Island.Bank.Enable")) {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Disabled.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
return;

View File

@ -351,6 +351,13 @@ public class Block implements Listener {
}
}
}
// Check piston head
if (configLoad.getBoolean("Island.Spawn.Protection")) {
if (LocationUtil.isLocationAffectingLocation(event.getBlock().getRelative(event.getDirection()).getLocation(), island.getLocation(world, IslandEnvironment.Main))) {
event.setCancelled(true);
}
}
}
@EventHandler

View File

@ -556,6 +556,11 @@ public class Entity implements Listener {
livingEntity instanceof Horse) {
return;
}
if (NMSUtil.getVersionNumber() > 8) {
if (livingEntity instanceof Donkey || livingEntity instanceof Mule)
return;
}
if (livingEntity.hasMetadata("SkyBlock")) {
return;
@ -574,8 +579,7 @@ public class Entity implements Listener {
List<ItemStack> entityDrops = event.getDrops();
if (entityDrops != null) {
for (int i = 0; i < entityDrops.size(); i++) {
ItemStack is = entityDrops.get(i);
for (ItemStack is : entityDrops) {
is.setAmount(is.getAmount() * 2);
}
}