mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
From f087f08da35e91e5def285585eddaf53c3cd0a63 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sun, 20 Apr 2014 11:16:54 +1000
|
|
Subject: [PATCH] Log null TileEntity Owner
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
|
index befe9a9..ccea0b3 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
|
@@ -177,7 +177,14 @@ public class TileEntity {
|
|
|
|
// CraftBukkit start - add method
|
|
public InventoryHolder getOwner() {
|
|
- org.bukkit.block.BlockState state = world.getWorld().getBlockAt(x, y, z).getState();
|
|
+ // Spigot start
|
|
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(x, y, z);
|
|
+ if (block == null) {
|
|
+ org.bukkit.Bukkit.getLogger().log(java.util.logging.Level.WARNING, "No block for owner at %s %d %d %d", new Object[]{world.getWorld(), x, y, z});
|
|
+ return null;
|
|
+ }
|
|
+ // Spigot end
|
|
+ org.bukkit.block.BlockState state = block.getState();
|
|
if (state instanceof InventoryHolder) return (InventoryHolder) state;
|
|
return null;
|
|
}
|
|
--
|
|
1.9.1
|
|
|