geforkt von Mirrors/Paper
Add missing getOwner method for container minecarts.
Dieser Commit ist enthalten in:
Ursprung
737e8c5127
Commit
6f68fc4ba4
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory {
|
public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory {
|
||||||
@ -32,6 +33,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
|||||||
return transaction;
|
return transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InventoryHolder getOwner() {
|
||||||
|
org.bukkit.entity.Entity cart = getBukkitEntity();
|
||||||
|
if(cart instanceof InventoryHolder) return (InventoryHolder) cart;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public void setMaxStackSize(int size) {
|
public void setMaxStackSize(int size) {
|
||||||
maxStack = size;
|
maxStack = size;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren