mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-09 06:50:32 +08:00
Don't call event if getOwner is null. Fixes BUKKIT-1545
This commit is contained in:
parent
3e382034e9
commit
53ed0dad48
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user