geforkt von Mirrors/Paper
Don't call event if getOwner is null. Fixes BUKKIT-1545
Dieser Commit ist enthalten in:
Ursprung
3e382034e9
Commit
53ed0dad48
@ -127,9 +127,13 @@ public class TileEntityBrewingStand extends TileEntity implements IInventory {
|
|||||||
ItemStack itemstack = this.items[3];
|
ItemStack itemstack = this.items[3];
|
||||||
|
|
||||||
// CraftBukkit start - fire BREW event
|
// CraftBukkit start - fire BREW event
|
||||||
BrewEvent event = new BrewEvent(world.getWorld().getBlockAt(x, y, z), (BrewerInventory) this.getOwner().getInventory());
|
if (getOwner() != null) {
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
BrewEvent event = new BrewEvent(world.getWorld().getBlockAt(x, y, z), (BrewerInventory) this.getOwner().getInventory());
|
||||||
if(event.isCancelled()) return;
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
if(event.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren