mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
#778: Added get/set ItemStack methods to trident
By: Auxilor <will@willfp.com>
This commit is contained in:
parent
5868631388
commit
904d0ddd37
1 changed files with 12 additions and 0 deletions
|
@ -2,8 +2,10 @@ package org.bukkit.craftbukkit.entity;
|
|||
|
||||
import net.minecraft.server.EntityThrownTrident;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class CraftTrident extends CraftArrow implements Trident {
|
||||
|
||||
|
@ -16,6 +18,16 @@ public class CraftTrident extends CraftArrow implements Trident {
|
|||
return (EntityThrownTrident) super.getHandle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItem() {
|
||||
return CraftItemStack.asBukkitCopy(getHandle().trident);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItem(ItemStack itemStack) {
|
||||
getHandle().trident = CraftItemStack.asNMSCopy(itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftTrident";
|
||||
|
|
Loading…
Reference in a new issue