SPIGOT-5311: Add API to get/set item associated with throwable projectiles

By: Lars Dormans <lars.dormans@live.nl>
This commit is contained in:
CraftBukkit/Spigot
2020-02-21 09:53:51 +11:00
parent 38b42f0479
commit 2a55fc03dd
10 changed files with 97 additions and 7 deletions

View File

@@ -11,3 +11,18 @@
}));
}
@@ -27,7 +27,13 @@
protected abstract Item i();
- protected ItemStack getItem() {
+ // CraftBukkit start
+ public Item getDefaultItem() {
+ return i();
+ }
+ // CraftBukkit end
+
+ public ItemStack getItem() { // PAIL protected -> public
return (ItemStack) this.getDataWatcher().get(EntityProjectileThrowable.e);
}