mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-21 15:41:19 +01:00
Fix for new stripped materials on 1.16.2
This commit is contained in:
parent
b776c5b4a8
commit
e560b9328f
@ -1581,7 +1581,7 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (!Jobs.getGCManager().canPerformActionInWorld(p.getWorld()))
|
if (!Jobs.getGCManager().canPerformActionInWorld(p.getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Block block = event.getClickedBlock();
|
final Block block = event.getClickedBlock();
|
||||||
if (block == null)
|
if (block == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1670,7 +1670,6 @@ public class JobsPaymentListener implements Listener {
|
|||||||
"[max]", jPlayer.getMaxBrewingStandsAllowed() == 0 ? "-" : jPlayer.getMaxBrewingStandsAllowed()));
|
"[max]", jPlayer.getMaxBrewingStandsAllowed() == 0 ? "-" : jPlayer.getMaxBrewingStandsAllowed()));
|
||||||
}
|
}
|
||||||
} else if (Version.isCurrentEqualOrHigher(Version.v1_13_R1) &&
|
} else if (Version.isCurrentEqualOrHigher(Version.v1_13_R1) &&
|
||||||
block.getType().toString().endsWith("_LOG") &&
|
|
||||||
!block.getType().toString().startsWith("STRIPPED_") &&
|
!block.getType().toString().startsWith("STRIPPED_") &&
|
||||||
event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||||
ItemStack iih = Jobs.getNms().getItemInMainHand(p);
|
ItemStack iih = Jobs.getNms().getItemInMainHand(p);
|
||||||
@ -1684,14 +1683,9 @@ public class JobsPaymentListener implements Listener {
|
|||||||
- Jobs.getNms().getDurability(iih) != iih.getType().getMaxDurability())
|
- Jobs.getNms().getDurability(iih) != iih.getType().getMaxDurability())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
final Location loc = block.getLocation();
|
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
if (block.getType().toString().startsWith("STRIPPED_") && jPlayer != null)
|
||||||
@Override
|
Jobs.action(jPlayer, new BlockActionInfo(block, ActionType.STRIPLOGS), block);
|
||||||
public void run() {
|
|
||||||
Block b = loc.getBlock();
|
|
||||||
if (b.getType().toString().startsWith("STRIPPED_") && jPlayer != null)
|
|
||||||
Jobs.action(jPlayer, new BlockActionInfo(b, ActionType.STRIPLOGS), b);
|
|
||||||
}
|
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user