mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Generic code cleanup
This commit is contained in:
1 parent
332d9c4f18
commit
09aa37fe4a
57 files changed
+415
-344
No files matched your search
@@ -22,8 +22,7 @@ public class ItemBlock extends Item {
|
||||
}
|
||||
|
||||
public boolean a(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l) {
|
||||
// CraftBukkit start
|
||||
// Bail if we have nothing of the item in hand
|
||||
// CraftBukkit start -- Bail if we have nothing of the item in hand
|
||||
if (itemstack.count == 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -101,7 +100,8 @@ public class ItemBlock extends Item {
|
||||
|
||||
int distanceFromSpawn = (int) Math.max(Math.abs(i - spawnX), Math.abs(k - spawnZ));
|
||||
|
||||
boolean canBuild = distanceFromSpawn > ((WorldServer) world).x.spawnProtection || thePlayer.isOp(); // CraftBukkit Configurable spawn protection start
|
||||
// CraftBukkit Configurable spawn protection start
|
||||
boolean canBuild = distanceFromSpawn > ((WorldServer) world).x.spawnProtection || thePlayer.isOp();
|
||||
|
||||
BlockPlaceEvent event = new BlockPlaceEvent(eventType, placedBlock, replacedBlockState, blockClicked, itemInHand, thePlayer, canBuild);
|
||||
server.getPluginManager().callEvent(event);
|
||||
|
||||
Reference in new issue
Block a user