From adbfe1e218cb64d332b3fad5189e21c79f6bb60d Mon Sep 17 00:00:00 2001 From: Grafe Date: Mon, 21 Jan 2013 00:40:18 +0100 Subject: [PATCH] Removed not working unlimited durability of class items --- src/com/dre/dungeonsxl/DPlayer.java | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/com/dre/dungeonsxl/DPlayer.java b/src/com/dre/dungeonsxl/DPlayer.java index 54f3d79f..b83d43e6 100644 --- a/src/com/dre/dungeonsxl/DPlayer.java +++ b/src/com/dre/dungeonsxl/DPlayer.java @@ -9,7 +9,6 @@ import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; -import org.bukkit.configuration.Configuration; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.EntityType; @@ -51,11 +50,9 @@ public class DPlayer { public DClass dclass; public GameCheckpoint checkpoint; - public CopyOnWriteArrayList classItems=new CopyOnWriteArrayList(); public Wolf wolf; public int wolfRespawnTime=30; public int offlineTime; - public int invItemInHand; public CopyOnWriteArrayList respawnInventory=new CopyOnWriteArrayList(); public Inventory treasureInv = P.p.getServer().createInventory(player, 45, "Belohnungen"); @@ -316,7 +313,6 @@ public class DPlayer { } /* Delete Inventory */ - this.classItems.clear(); this.player.getInventory().clear(); this.player.getInventory().setArmorContents(null); player.getInventory().setItemInHand(new ItemStack(0)); @@ -365,13 +361,6 @@ public class DPlayer { this.player.getInventory().addItem(istack); } } - - for(int i=0;i<36;i++){ - ItemStack istack=this.player.getInventory().getItem(i); - if(istack!=null){ - this.classItems.add(i); - } - } /* Spout Skin */ if(p.isSpoutEnabled){ @@ -526,23 +515,6 @@ public class DPlayer { } } - - //Update ClassItems - for(Integer istackplace:dplayer.classItems){ - ItemStack istack=dplayer.player.getInventory().getItem(istackplace); - - if(istack!=null){ - if(istack.getTypeId()!=0){ - if(istack.getTypeId()>255 && istack.getTypeId()<318){ - istack.setDurability((short) 0); - } - }else{ - dplayer.classItems.remove(istackplace); - } - }else{ - dplayer.classItems.remove(istackplace); - } - } } }