mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-08 08:21:41 +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))
|
||||
block.removeMetadata(this.furnaceOwnerMetadata, this.plugin);
|
||||
|
||||
if (Jobs.getGCManager().useBlockProtection)
|
||||
if (Jobs.getGCManager().useBlockProtection) {
|
||||
if (block.getState().hasMetadata(BlockMetadata))
|
||||
return;
|
||||
if (Jobs.getPistonProtectionListener().CheckBlock(block))
|
||||
block.getState().setMetadata(BlockMetadata, new FixedMetadataValue(this.plugin, true));
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().useBlockTimer)
|
||||
if (Jobs.getPistonProtectionListener().checkVegybreak(block, event.getPlayer()))
|
||||
@ -360,9 +363,12 @@ public class JobsPaymentListener implements Listener {
|
||||
return;
|
||||
|
||||
// Block place/break protection
|
||||
if (Jobs.getGCManager().useBlockProtection)
|
||||
if (Jobs.getGCManager().useBlockProtection) {
|
||||
if (block.getState().hasMetadata(BlockMetadata))
|
||||
return;
|
||||
if (Jobs.getPistonProtectionListener().CheckBlock(block))
|
||||
block.getState().setMetadata(BlockMetadata, new FixedMetadataValue(this.plugin, true));
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().WaterBlockBreake)
|
||||
block.getState().setMetadata(PlacedBlockMetadata, new FixedMetadataValue(this.plugin, true));
|
||||
|
Loading…
Reference in New Issue
Block a user