mirror of
https://github.com/songoda/EpicFurnaces.git
synced 2024-12-11 03:03:27 +01:00
Merge branch 'development'
This commit is contained in:
commit
a1defd76cc
@ -53,7 +53,7 @@ public class Furnace {
|
||||
|
||||
public void plus(FurnaceSmeltEvent e) {
|
||||
Block block = location.getBlock();
|
||||
if (!block.getType().name().contains("FURNACE")) return;
|
||||
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) return;
|
||||
|
||||
this.uses++;
|
||||
this.tolevel++;
|
||||
@ -180,7 +180,7 @@ public class Furnace {
|
||||
|
||||
public void updateCook() {
|
||||
Block block = location.getBlock();
|
||||
if (!block.getType().name().contains("FURNACE")) return;
|
||||
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) return;
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
||||
int num = getPerformanceTotal();
|
||||
|
@ -48,7 +48,7 @@ public class BlockListeners implements Listener {
|
||||
public void onBlockPlace(BlockPlaceEvent event) {
|
||||
|
||||
if (plugin.getBlacklistHandler().isBlacklisted(event.getPlayer().getWorld())
|
||||
|| !event.getBlock().getType().name().contains("FURNACE"))
|
||||
|| !event.getBlock().getType().name().contains("FURNACE") && !event.getBlock().getType().name().contains("SMOKER"))
|
||||
return;
|
||||
|
||||
ItemStack item = event.getItemInHand();
|
||||
@ -73,7 +73,7 @@ public class BlockListeners implements Listener {
|
||||
return;
|
||||
}
|
||||
Block block = event.getBlock();
|
||||
if (!block.getType().name().contains("FURNACE")
|
||||
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")
|
||||
|| plugin.getBlacklistHandler().isBlacklisted(event.getPlayer().getWorld()))
|
||||
return;
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class InteractListeners implements Listener {
|
||||
}
|
||||
Player player = event.getPlayer();
|
||||
if (event.getAction() != Action.LEFT_CLICK_BLOCK
|
||||
|| (!block.getType().name().contains("FURNACE"))
|
||||
|| !block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")
|
||||
|| player.isSneaking()
|
||||
|| player.getInventory().getItemInHand().getType().name().contains("PICKAXE")
|
||||
|| !player.hasPermission("EpicFurnaces.overview")) {
|
||||
|
@ -38,7 +38,7 @@ public class InventoryListeners implements Listener {
|
||||
if (event.getAction() != InventoryAction.NOTHING) {
|
||||
if (event.getCurrentItem().getType() != Material.AIR) {
|
||||
ItemStack item = event.getCurrentItem();
|
||||
if (item.getType().name().contains("FURNACE")) {
|
||||
if (item.getType().name().contains("FURNACE") && !item.getType().name().contains("SMOKER")) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class FurnaceTask extends BukkitRunnable {
|
||||
|
||||
Block block = location.getBlock();
|
||||
|
||||
if (!block.getType().name().contains("FURNACE")) continue;
|
||||
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) continue;
|
||||
Furnace furnace1 = plugin.getFurnaceManager().getFurnace(block);
|
||||
if (furnace == furnace1) continue;
|
||||
org.bukkit.block.Furnace furnaceBlock = ((org.bukkit.block.Furnace) block.getState());
|
||||
|
Loading…
Reference in New Issue
Block a user