mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Little changes in the new loot inventory system
This commit is contained in:
parent
15e9db2216
commit
0e940816e0
@ -4,7 +4,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -21,7 +20,7 @@ public class DLootInventory {
|
|||||||
public DLootInventory(Player player, ItemStack[] istacks){
|
public DLootInventory(Player player, ItemStack[] istacks){
|
||||||
LootInventorys.add(this);
|
LootInventorys.add(this);
|
||||||
|
|
||||||
this.inventory = Bukkit.createInventory(player, InventoryType.CHEST);
|
this.inventory = Bukkit.createInventory(player, 54);
|
||||||
for(ItemStack istack:istacks){
|
for(ItemStack istack:istacks){
|
||||||
if(istack!=null){
|
if(istack!=null){
|
||||||
this.inventory.addItem(istack);
|
this.inventory.addItem(istack);
|
||||||
|
@ -335,7 +335,6 @@ public class PlayerListener implements Listener{
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClose(InventoryCloseEvent event){
|
public void onInventoryClose(InventoryCloseEvent event){
|
||||||
p.log("CLOSE!!!");
|
|
||||||
Player player =(Player) event.getPlayer();
|
Player player =(Player) event.getPlayer();
|
||||||
for(DLootInventory inventory:DLootInventory.LootInventorys){
|
for(DLootInventory inventory:DLootInventory.LootInventorys){
|
||||||
if(event.getView()==inventory.inventoryView){
|
if(event.getView()==inventory.inventoryView){
|
||||||
|
Loading…
Reference in New Issue
Block a user