mirror of
				https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
				synced 2025-10-31 16:49:20 +00:00 
			
		
		
		
	[Bleeding] Add a check for illegal blocks. Addresses BUKKIT-1278. Needs more investigation.
This commit is contained in:
		
							parent
							
								
									724b82626a
								
							
						
					
					
						commit
						52ecd60e61
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -514,6 +514,9 @@ public class CraftEventFactory { | |||
| 
 | ||||
|     public static boolean callBlockBreakEvent(World world, int x, int y, int z, int id, int data, boolean creative, EntityHuman player) { | ||||
|         net.minecraft.server.Block blockType = net.minecraft.server.Block.byId[id]; | ||||
|         if (blockType == null) { // Illegal block ID | ||||
|             return true; | ||||
|         } | ||||
|         Block block = world.getWorld().getBlockAt(x, y, z); | ||||
| 
 | ||||
|         // Tell client the block is gone immediately then process events | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 feildmaster
						feildmaster