diff --git a/src/main/java/kcauldronx/events/ModInventoryMoveFromPlayerEvent.java b/src/main/java/kcauldronx/events/ModInventoryMoveFromPlayerEvent.java index 274a4e3..4ee62cf 100644 --- a/src/main/java/kcauldronx/events/ModInventoryMoveFromPlayerEvent.java +++ b/src/main/java/kcauldronx/events/ModInventoryMoveFromPlayerEvent.java @@ -6,13 +6,13 @@ import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.event.inventory.InventoryMoveItemEvent; -import org.bukkit.inventory.PlayerInventory; +import org.bukkit.inventory.Inventory; /** * Created by xjboss on 2017/7/3. */ public class ModInventoryMoveFromPlayerEvent extends InventoryMoveItemEvent { - public ModInventoryMoveFromPlayerEvent(IInventory sourceInventory, net.minecraft.item.ItemStack itemStack, PlayerInventory destinationInventory, boolean didSourceInitiate) { - super(new CraftInventory(sourceInventory), CraftItemStack.asCraftMirror(itemStack), new CraftInventoryPlayer((InventoryPlayer)destinationInventory), didSourceInitiate); + public ModInventoryMoveFromPlayerEvent(InventoryPlayer sourceInventory, net.minecraft.item.ItemStack itemStack, IInventory destinationInventory, boolean didSourceInitiate) { + super(new CraftInventoryPlayer(sourceInventory), CraftItemStack.asCraftMirror(itemStack),new CraftInventory(destinationInventory) , didSourceInitiate); } } diff --git a/src/main/java/kcauldronx/events/ModInventoryMoveToPlayerEvent.java b/src/main/java/kcauldronx/events/ModInventoryMoveToPlayerEvent.java new file mode 100644 index 0000000..76101cf --- /dev/null +++ b/src/main/java/kcauldronx/events/ModInventoryMoveToPlayerEvent.java @@ -0,0 +1,18 @@ +package kcauldronx.events; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import org.bukkit.craftbukkit.inventory.CraftInventory; +import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer; +import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.bukkit.event.inventory.InventoryMoveItemEvent; +import org.bukkit.inventory.PlayerInventory; + +/** + * Created by xjboss on 2017/7/3. + */ +public class ModInventoryMoveToPlayerEvent extends InventoryMoveItemEvent { + public ModInventoryMoveToPlayerEvent(IInventory sourceInventory, net.minecraft.item.ItemStack itemStack, PlayerInventory destinationInventory, boolean didSourceInitiate) { + super(new CraftInventory(sourceInventory), CraftItemStack.asCraftMirror(itemStack), new CraftInventoryPlayer((InventoryPlayer)destinationInventory), didSourceInitiate); + } +}