mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2024-11-22 02:08:32 +01:00
signs: instead of cancelling indirect break, remove the sign to prevent lagg
This commit is contained in:
parent
b4f33589a1
commit
5b327db316
@ -112,8 +112,8 @@ public class SignsFeature extends RegionFeature {
|
||||
if(Materials.isSign(event.getBlock().getType())) {
|
||||
// Check if the rent sign is really the same as a saved rent
|
||||
if(SignsFeature.getSignByLocation(event.getBlock().getLocation()) != null) {
|
||||
// Cancel the sign breaking, will create a floating sign but at least it is not disconnected/gone
|
||||
event.setCancelled(true);
|
||||
// Remove the sign so that it does not fall on the floor as an item (next region update will place it back)
|
||||
event.getBlock().setType(Material.AIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user