1
0
mirror of https://e.coding.net/circlecloud/AuthMe.git synced 2025-11-24 21:26:20 +00:00

init project...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092
2015-10-12 15:26:15 +08:00
commit a1176afa15
165 changed files with 19619 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
package fr.xephi.authme.events;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
/**
*
* This event is call just after store inventory into cache and will empty the
* player inventory.
*
* @author Xephi59
*/
public class ProtectInventoryEvent extends CustomEvent {
private ItemStack[] emptyArmor = null;
private ItemStack[] emptyInventory = null;
private Player player;
private ItemStack[] storedarmor;
private ItemStack[] storedinventory;
public ProtectInventoryEvent(Player player) {
super(true);
this.player = player;
this.storedinventory = player.getInventory().getContents();
this.storedarmor = player.getInventory().getArmorContents();
this.emptyInventory = new ItemStack[36];
this.emptyArmor = new ItemStack[4];
}
public ItemStack[] getEmptyArmor() {
return this.emptyArmor;
}
public ItemStack[] getEmptyInventory() {
return this.emptyInventory;
}
public Player getPlayer() {
return this.player;
}
public ItemStack[] getStoredArmor() {
return this.storedarmor;
}
public ItemStack[] getStoredInventory() {
return this.storedinventory;
}
public void setNewArmor(ItemStack[] emptyArmor) {
this.emptyArmor = emptyArmor;
}
public void setNewInventory(ItemStack[] emptyInventory) {
this.emptyInventory = emptyInventory;
}
}