1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

And lets include blast furnace to furnace and smoker group

This commit is contained in:
Zrips 2019-06-14 16:52:51 +03:00
parent 7f4c85a4ad
commit 642b1bc176
2 changed files with 11 additions and 7 deletions

View File

@ -398,9 +398,11 @@ public class JobsPaymentListener implements Listener {
CMIMaterial cmat = CMIMaterial.get(block);
if (cmat.equals(CMIMaterial.FURNACE) && block.hasMetadata(furnaceOwnerMetadata))
FurnaceBrewingHandling.removeFurnace(block);
if (cmat.equals(CMIMaterial.SMOKER) && block.hasMetadata(furnaceOwnerMetadata))
else if (cmat.equals(CMIMaterial.SMOKER) && block.hasMetadata(furnaceOwnerMetadata))
FurnaceBrewingHandling.removeFurnace(block);
if (cmat.equals(CMIMaterial.BREWING_STAND) && block.hasMetadata(brewingOwnerMetadata))
else if (cmat.equals(CMIMaterial.BLAST_FURNACE) && block.hasMetadata(furnaceOwnerMetadata))
FurnaceBrewingHandling.removeFurnace(block);
else if (cmat.equals(CMIMaterial.BREWING_STAND) && block.hasMetadata(brewingOwnerMetadata))
FurnaceBrewingHandling.removeBrewing(block);
if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
@ -1558,10 +1560,12 @@ public class JobsPaymentListener implements Listener {
if (cmat.equals(CMIMaterial.FURNACE) && block.hasMetadata(furnaceOwnerMetadata))
FurnaceBrewingHandling.removeFurnace(block);
if (cmat.equals(CMIMaterial.SMOKER) && block.hasMetadata(furnaceOwnerMetadata))
else if (cmat.equals(CMIMaterial.SMOKER) && block.hasMetadata(furnaceOwnerMetadata))
FurnaceBrewingHandling.removeFurnace(block);
else if (cmat.equals(CMIMaterial.BLAST_FURNACE) && block.hasMetadata(furnaceOwnerMetadata))
FurnaceBrewingHandling.removeFurnace(block);
if (cmat.equals(CMIMaterial.BREWING_STAND) && block.hasMetadata(brewingOwnerMetadata))
else if (cmat.equals(CMIMaterial.BREWING_STAND) && block.hasMetadata(brewingOwnerMetadata))
FurnaceBrewingHandling.removeBrewing(block);
if (Jobs.getGCManager().useBlockProtection)
@ -1585,7 +1589,7 @@ public class JobsPaymentListener implements Listener {
if (block == null)
return;
CMIMaterial cmat = CMIMaterial.get(block);
if (cmat.equals(CMIMaterial.FURNACE) || cmat.equals(CMIMaterial.LEGACY_BURNING_FURNACE) || cmat.equals(CMIMaterial.SMOKER)) {
if (cmat.equals(CMIMaterial.FURNACE) || cmat.equals(CMIMaterial.LEGACY_BURNING_FURNACE) || cmat.equals(CMIMaterial.SMOKER) || cmat.equals(CMIMaterial.BLAST_FURNACE)) {
if (!Jobs.getGCManager().isFurnacesReassign())
return;

View File

@ -241,7 +241,7 @@ public class FurnaceBrewingHandling {
public static ownershipFeedback registerFurnaces(Player player, Block block) {
CMIMaterial cmat = CMIMaterial.get(block);
if (!cmat.equals(CMIMaterial.FURNACE) && !cmat.equals(CMIMaterial.LEGACY_BURNING_FURNACE) && !cmat.equals(CMIMaterial.SMOKER))
if (!cmat.equals(CMIMaterial.FURNACE) && !cmat.equals(CMIMaterial.LEGACY_BURNING_FURNACE) && !cmat.equals(CMIMaterial.SMOKER) && !cmat.equals(CMIMaterial.BLAST_FURNACE))
return ownershipFeedback.invalid;
JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
@ -337,7 +337,7 @@ public class FurnaceBrewingHandling {
if (block == null)
continue;
CMIMaterial cmat = CMIMaterial.get(block);
if (!cmat.equals(CMIMaterial.FURNACE) && !cmat.equals(CMIMaterial.LEGACY_BURNING_FURNACE) && !cmat.equals(CMIMaterial.SMOKER))
if (!cmat.equals(CMIMaterial.FURNACE) && !cmat.equals(CMIMaterial.LEGACY_BURNING_FURNACE) && !cmat.equals(CMIMaterial.SMOKER) && !cmat.equals(CMIMaterial.BLAST_FURNACE))
continue;
block.removeMetadata(JobsPaymentListener.furnaceOwnerMetadata, Jobs.getInstance());
}