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