forked from xjboss/KCauldronX
Fix...new event and add one of new
This commit is contained in:
parent
da0a711d36
commit
cbf80d0a8e
@ -6,13 +6,13 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
|
|||||||
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by xjboss on 2017/7/3.
|
* Created by xjboss on 2017/7/3.
|
||||||
*/
|
*/
|
||||||
public class ModInventoryMoveFromPlayerEvent extends InventoryMoveItemEvent {
|
public class ModInventoryMoveFromPlayerEvent extends InventoryMoveItemEvent {
|
||||||
public ModInventoryMoveFromPlayerEvent(IInventory sourceInventory, net.minecraft.item.ItemStack itemStack, PlayerInventory destinationInventory, boolean didSourceInitiate) {
|
public ModInventoryMoveFromPlayerEvent(InventoryPlayer sourceInventory, net.minecraft.item.ItemStack itemStack, IInventory destinationInventory, boolean didSourceInitiate) {
|
||||||
super(new CraftInventory(sourceInventory), CraftItemStack.asCraftMirror(itemStack), new CraftInventoryPlayer((InventoryPlayer)destinationInventory), didSourceInitiate);
|
super(new CraftInventoryPlayer(sourceInventory), CraftItemStack.asCraftMirror(itemStack),new CraftInventory(destinationInventory) , didSourceInitiate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user