3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +01:00

Don't call event if getOwner is null. Fixes BUKKIT-1545

Dieser Commit ist enthalten in:
Travis Watkins 2012-04-25 16:37:17 -05:00 committet von EvilSeph
Ursprung 3e382034e9
Commit 53ed0dad48

Datei anzeigen

@ -127,9 +127,13 @@ public class TileEntityBrewingStand extends TileEntity implements IInventory {
ItemStack itemstack = this.items[3];
// CraftBukkit start - fire BREW event
BrewEvent event = new BrewEvent(world.getWorld().getBlockAt(x, y, z), (BrewerInventory) this.getOwner().getInventory());
Bukkit.getPluginManager().callEvent(event);
if(event.isCancelled()) return;
if (getOwner() != null) {
BrewEvent event = new BrewEvent(world.getWorld().getBlockAt(x, y, z), (BrewerInventory) this.getOwner().getInventory());
Bukkit.getPluginManager().callEvent(event);
if(event.isCancelled()) {
return;
}
}
// CraftBukkit end
for (int i = 0; i < 3; ++i) {