mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-14 19:31:33 +01:00
Add meta at first break of it and after breaking
This commit is contained in:
parent
abd18fae7d
commit
a0f95b9108
@ -255,9 +255,12 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (block.getType() == Material.FURNACE && block.hasMetadata(this.furnaceOwnerMetadata))
|
if (block.getType() == Material.FURNACE && block.hasMetadata(this.furnaceOwnerMetadata))
|
||||||
block.removeMetadata(this.furnaceOwnerMetadata, this.plugin);
|
block.removeMetadata(this.furnaceOwnerMetadata, this.plugin);
|
||||||
|
|
||||||
if (Jobs.getGCManager().useBlockProtection)
|
if (Jobs.getGCManager().useBlockProtection) {
|
||||||
if (block.getState().hasMetadata(BlockMetadata))
|
if (block.getState().hasMetadata(BlockMetadata))
|
||||||
return;
|
return;
|
||||||
|
if (Jobs.getPistonProtectionListener().CheckBlock(block))
|
||||||
|
block.getState().setMetadata(BlockMetadata, new FixedMetadataValue(this.plugin, true));
|
||||||
|
}
|
||||||
|
|
||||||
if (Jobs.getGCManager().useBlockTimer)
|
if (Jobs.getGCManager().useBlockTimer)
|
||||||
if (Jobs.getPistonProtectionListener().checkVegybreak(block, event.getPlayer()))
|
if (Jobs.getPistonProtectionListener().checkVegybreak(block, event.getPlayer()))
|
||||||
@ -360,9 +363,12 @@ public class JobsPaymentListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Block place/break protection
|
// Block place/break protection
|
||||||
if (Jobs.getGCManager().useBlockProtection)
|
if (Jobs.getGCManager().useBlockProtection) {
|
||||||
|
if (block.getState().hasMetadata(BlockMetadata))
|
||||||
|
return;
|
||||||
if (Jobs.getPistonProtectionListener().CheckBlock(block))
|
if (Jobs.getPistonProtectionListener().CheckBlock(block))
|
||||||
block.getState().setMetadata(BlockMetadata, new FixedMetadataValue(this.plugin, true));
|
block.getState().setMetadata(BlockMetadata, new FixedMetadataValue(this.plugin, true));
|
||||||
|
}
|
||||||
|
|
||||||
if (Jobs.getGCManager().WaterBlockBreake)
|
if (Jobs.getGCManager().WaterBlockBreake)
|
||||||
block.getState().setMetadata(PlacedBlockMetadata, new FixedMetadataValue(this.plugin, true));
|
block.getState().setMetadata(PlacedBlockMetadata, new FixedMetadataValue(this.plugin, true));
|
||||||
|
Loading…
Reference in New Issue
Block a user