Added new events for mod developer
This commit is contained in:
parent
ad3dd74bd8
commit
a85f1f799c
BIN
src/main/java/java.zip
Normal file
BIN
src/main/java/java.zip
Normal file
Binary file not shown.
17
src/main/java/kcauldronx/events/ModInventoryMoveEvent.java
Normal file
17
src/main/java/kcauldronx/events/ModInventoryMoveEvent.java
Normal file
@ -0,0 +1,17 @@
|
||||
package kcauldronx.events;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Created by xjboss on 2017/7/3.
|
||||
*/
|
||||
public class ModInventoryMoveEvent extends InventoryMoveItemEvent {
|
||||
public ModInventoryMoveEvent(IInventory sourceInventory, net.minecraft.item.ItemStack itemStack, IInventory destinationInventory, boolean didSourceInitiate) {
|
||||
super(new CraftInventory(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 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user