diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index fcde478..aa562a4 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index 2fe4fe5..2772411 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.8.6b +version: 3.8.6c commands: money: description: Tells the player the amount of money they are holding. diff --git a/src/sig/plugin/TwosideKeeper/AwakenedArtifact.java b/src/sig/plugin/TwosideKeeper/AwakenedArtifact.java index 26c11f6..eaefa1a 100644 --- a/src/sig/plugin/TwosideKeeper/AwakenedArtifact.java +++ b/src/sig/plugin/TwosideKeeper/AwakenedArtifact.java @@ -40,7 +40,7 @@ public class AwakenedArtifact { artifact.hasItemMeta() && artifact.getItemMeta().hasLore() && Artifact.isArtifact(artifact)) { - String expline = artifact.getItemMeta().getLore().get(4); + String expline = artifact.getItemMeta().getLore().get(findPotentialLine(artifact.getItemMeta().getLore())); String exp = (expline.split("\\(")[1]).split("/")[0]; int expval = Integer.parseInt(exp); return expval; @@ -57,8 +57,8 @@ public class AwakenedArtifact { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); DecimalFormat df = new DecimalFormat("00"); - lore.set(3, ChatColor.YELLOW+"EXP"+ChatColor.RESET+" ["+drawEXPMeter(amt)+"] "+df.format((((double)amt/1000)*100))+"%"); //Update the EXP bar. - lore.set(4, ChatColor.BLUE+" ("+amt+"/1000) "+"Potential: "+drawPotential(artifact,getPotential(artifact))); + lore.set(findEXPBarLine(lore), ChatColor.YELLOW+"EXP"+ChatColor.RESET+" ["+drawEXPMeter(amt)+"] "+df.format((((double)amt/1000)*100))+"%"); //Update the EXP bar. + lore.set(findPotentialLine(lore), ChatColor.BLUE+" ("+amt+"/1000) "+"Potential: "+drawPotential(artifact,getPotential(artifact))); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -66,6 +66,24 @@ public class AwakenedArtifact { //TwosideKeeper.log("Could not set the EXP value for artifact "+artifact.toString(), 1); return artifact; } + private static int findPotentialLine(List lore) { + for (int i=0;i lore) { + for (int i=0;i=1000) { @@ -108,7 +126,7 @@ public class AwakenedArtifact { artifact.hasItemMeta() && artifact.getItemMeta().hasLore() && Artifact.isArtifact(artifact)) { - String lvline = artifact.getItemMeta().getLore().get(5); + String lvline = artifact.getItemMeta().getLore().get(findLVLine(artifact.getItemMeta().getLore())); String lv = lvline.split(" ")[1]; int LV = Integer.parseInt(lv); return LV; @@ -116,6 +134,15 @@ public class AwakenedArtifact { //TwosideKeeper.log("Could not retrieve LV value for artifact "+artifact.toString(), 1); return -1; //If we got here, something bad happened. } + private static int findLVLine(List lore) { + for (int i=0;i lore = m.getLore(); DecimalFormat df = new DecimalFormat("000"); - lore.set(5, ChatColor.GRAY+"Level "+df.format(amt)); - lore.set(6, ChatColor.GOLD+"Ability Points: "+getAP(artifact)+"/"+amt); + lore.set(findLVLine(lore), ChatColor.GRAY+"Level "+df.format(amt)); + lore.set(findAPLine(lore), ChatColor.GOLD+"Ability Points: "+getAP(artifact)+"/"+amt); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -134,6 +161,15 @@ public class AwakenedArtifact { //TwosideKeeper.log("Could not set the LV value for artifact "+artifact.toString(), 1); return artifact; } + public static int findAPLine(List lore) { + for (int i=0;i lore = m.getLore(); int currentAP = getAP(artifact); - lore.set(6, ChatColor.GOLD+"Ability Points: "+(currentAP+amt)+"/"+getMaxAP(artifact)); + lore.set(findAPLine(lore), ChatColor.GOLD+"Ability Points: "+(currentAP+amt)+"/"+getMaxAP(artifact)); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -159,7 +195,7 @@ public class AwakenedArtifact { Artifact.isArtifact(artifact)) { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); - lore.set(6, ChatColor.GOLD+"Ability Points: "+(newamt)+"/"+getMaxAP(artifact)); + lore.set(findAPLine(lore), ChatColor.GOLD+"Ability Points: "+(newamt)+"/"+getMaxAP(artifact)); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -175,7 +211,7 @@ public class AwakenedArtifact { Artifact.isArtifact(artifact)) { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); - String apline = lore.get(6); + String apline = lore.get(findAPLine(lore)); /*int level = getLV(artifact); //This is how many total we have. int apused = 0; HashMap enchants = ArtifactAbility.getEnchantments(artifact); @@ -197,7 +233,7 @@ public class AwakenedArtifact { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); int currentMaxAP = getMaxAP(artifact); - lore.set(6, ChatColor.GOLD+"Ability Points: "+getAP(artifact)+"/"+(currentMaxAP+amt)); + lore.set(findAPLine(lore), ChatColor.GOLD+"Ability Points: "+getAP(artifact)+"/"+(currentMaxAP+amt)); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -213,7 +249,7 @@ public class AwakenedArtifact { Artifact.isArtifact(artifact)) { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); - lore.set(6, ChatColor.GOLD+"Ability Points: "+getAP(artifact)+"/"+(newamt)); + lore.set(findAPLine(lore), ChatColor.GOLD+"Ability Points: "+getAP(artifact)+"/"+(newamt)); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -229,7 +265,7 @@ public class AwakenedArtifact { Artifact.isArtifact(artifact)) { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); - String apline = lore.get(6); + String apline = lore.get(findAPLine(lore)); /*int level = getLV(artifact); //This is how many total we have. int apused = 0; HashMap enchants = ArtifactAbility.getEnchantments(artifact); @@ -249,7 +285,7 @@ public class AwakenedArtifact { if (GenericFunctions.isArtifactEquip(artifact)) { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); - String potentialline = lore.get(4); + String potentialline = lore.get(findPotentialLine(lore)); return Integer.parseInt(ChatColor.stripColor(potentialline.split("Potential: ")[1].replace("%", ""))); } else { //TwosideKeeper.log("Could not get the Potential value for artifact "+artifact.toString(), 1); @@ -261,8 +297,8 @@ public class AwakenedArtifact { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); int potential = amt; - String potentialline = lore.get(4).split("Potential: ")[0]+"Potential: "+drawPotential(artifact,potential); - lore.set(4, potentialline); + String potentialline = lore.get(findPotentialLine(lore)).split("Potential: ")[0]+"Potential: "+drawPotential(artifact,potential); + lore.set(findPotentialLine(lore), potentialline); m.setLore(lore); artifact.setItemMeta(m); return artifact; @@ -276,8 +312,8 @@ public class AwakenedArtifact { ItemMeta m = artifact.getItemMeta(); List lore = m.getLore(); int potential = getPotential(artifact)+amt; - String potentialline = lore.get(4).split("Potential: ")[0]+"Potential: "+drawPotential(artifact,potential); - lore.set(4, potentialline); + String potentialline = lore.get(findPotentialLine(lore)).split("Potential: ")[0]+"Potential: "+drawPotential(artifact,potential); + lore.set(findPotentialLine(lore), potentialline); m.setLore(lore); artifact.setItemMeta(m); return artifact; diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index 4e66a88..b640f4d 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -321,8 +321,12 @@ public class CustomDamage { if (PlayerMode.isDefender(p)) { GenericFunctions.addStackingPotionEffect(p, PotionEffectType.DAMAGE_RESISTANCE, 20*5, 4); if (p.isBlocking() && ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL)) { - pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*pd.lastrawdamage)*0.3; - GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+"Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+" dmg stored"); + pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*pd.lastrawdamage)*0.25; + if (TwosideKeeper.getMaxThornsLevelOnEquipment(target)>0) { + pd.thorns_amt+=((1-CalculateDamageReduction(1,target,damager))*pd.lastrawdamage)*0.01; + } + DecimalFormat df = new DecimalFormat("0.00"); + GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+"Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+((pd.thorns_amt>0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored"); } } if (getDamagerEntity(damager) instanceof Enderman) { @@ -365,6 +369,8 @@ public class CustomDamage { pd.slayermegahit=false; pd.lastcombat=TwosideKeeper.getServerTickTime(); + damage = calculateDefenderAbsorption(p, damager, damage); + if (GenericFunctions.AttemptRevive(p, damage, reason)) { damage=0; } @@ -906,8 +912,12 @@ public class CustomDamage { double rawdmg = CalculateDamage(0,damager,target,null,null,TRUEDMG)*(1d/CalculateDamageReduction(1,target,damager)); if (p.isBlocking() && ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL)) { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); - pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*rawdmg); - GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+"Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+" dmg stored"); + pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*(rawdmg*0.95)); + if (TwosideKeeper.getMaxThornsLevelOnEquipment(target)>0) { + pd.thorns_amt+=((1-CalculateDamageReduction(1,target,damager))*(rawdmg*0.01)); + } + DecimalFormat df = new DecimalFormat("0.00"); + GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+"Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+((pd.thorns_amt>0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored"); } return true; } @@ -1565,10 +1575,11 @@ public class CustomDamage { return mult; } - public static double calculateDefenderAbsorption(LivingEntity entity, double dmg) { + public static double calculateDefenderAbsorption(LivingEntity entity, Entity damager, double dmg) { //See if we're in a party with a defender. if (entity instanceof Player) { Player p = (Player)entity; + LivingEntity shooter = getDamagerEntity(damager); List partymembers = TwosideKeeperAPI.getPartyMembers(p); for (int i=0;i=36) { - if (pd.deathinventory.get(i).getType().toString().contains("BOOTS")) { - p.getInventory().setBoots(pd.deathinventory.get(i)); - } else - if (pd.deathinventory.get(i).getType().toString().contains("SHIELD")) { - p.getInventory().setItemInOffHand(pd.deathinventory.get(i)); - } else - if (pd.deathinventory.get(i).getType().toString().contains("LEGGINGS")) { - p.getInventory().setLeggings(pd.deathinventory.get(i)); - } else - if (pd.deathinventory.get(i).getType().toString().contains("CHESTPLATE")) { - p.getInventory().setChestplate(pd.deathinventory.get(i)); - } else - if (pd.deathinventory.get(i).getType().toString().contains("HELMET")) { - p.getInventory().setHelmet(pd.deathinventory.get(i)); - } else { - //What is this? Just drop it. - p.getLocation().getWorld().dropItem(p.getLocation(), pd.deathinventory.get(i)); - } - } else { - p.getInventory().addItem(pd.deathinventory.get(i)); - }*/ - if (structure.deathinventory.get(i)!=null && - structure.deathinventory.get(i).getType()!=Material.AIR) { - deathinv.addItem(structure.deathinventory.get(i)); - } - } + GenericFunctions.TransferItemsToInventory(p.getInventory(), deathinv); double totalmoney = TwosideKeeper.getPlayerMoney(Bukkit.getPlayer(p.getName()))+TwosideKeeper.getPlayerBankMoney(Bukkit.getPlayer(p.getName())); int price = 1; if (structure.deathloc.getBlockY()<=60) { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java index 4a43731..6b4ce1b 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java @@ -222,7 +222,7 @@ public enum ArtifactAbility { if (GenericFunctions.isArtifactEquip(item)) { List lore = item.getItemMeta().getLore(); //From Element 7 and onwards, we know these are abilities added to the item. Retrieve them. - for (int i=7;i map = item.getEnchantments().keySet(); + ItemMeta m = item.getItemMeta(); + List lore = m.getLore(); + int artifact_lv = item.getEnchantmentLevel(Enchantment.LUCK); + for (Enchantment e : map) { + int lv = item.getEnchantments().get(e); + if (!e.getName().equalsIgnoreCase("luck")) { + lore.add(0," "+ChatColor.BLACK+ChatColor.WHITE+ChatColor.GRAY+WorldShop.getRealName(e)+" "+WorldShop.toRomanNumeral(lv)); + } + } + lore.add(0,ChatColor.GOLD+""+ChatColor.BLACK+ChatColor.GOLD+"Tier "+artifact_lv+ChatColor.RESET+ChatColor.GOLD+" "+GenericFunctions.UserFriendlyMaterialName(item.getType())+" Artifact"); + m.setLore(lore); + item.setItemMeta(m); + } + + private static List ClearAllPreviousEnchantmentLines(List lore) { + for (int i=0;i0) { aPlugin.API.sendActionBarMessage(p, message+" "+prefix); } else { - if (message.length()>0) { + if (message.length()>0) { aPlugin.API.sendActionBarMessage(p, message); } } @@ -4197,4 +4235,21 @@ public class GenericFunctions { return ent.getCustomName().split(ChatColor.RESET+" ")[0]; } } + + public static void TransferItemsToInventory(Inventory from, Inventory to) { + List inventory = new ArrayList(); + for (int i=0;i items = to.addItem(list); + for (int i=0;i deathinventory; + //public List deathinventory; public Location deathloc; public String p; public DeathStructure(List di, Location dl, Player p) { - this.deathinventory=di; + //this.deathinventory=di; this.deathloc=dl; this.p=p.getName(); } public String toString() { - return "Death Inventory: "+deathinventory.size()+" items, belongs to Player "+p+". Death location is "+deathloc.toString(); + return "Belongs to Player "+p+". Death location is "+deathloc.toString(); } } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java index 8bfd9b6..e5ffb6d 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java @@ -294,9 +294,10 @@ public enum ItemSet { lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Absorption Health (30 seconds)"); lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Damage Reduction"); lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Vendetta"); - lore.add(ChatColor.GRAY+" Blocking stores 30% of mitigation damage."); - lore.add(ChatColor.GRAY+" Attacking with a shield unleashes all stored"); - lore.add(ChatColor.GRAY+" mitigation damage."); + lore.add(ChatColor.GRAY+" Blocking stores 25% of mitigation damage."); + lore.add(ChatColor.GRAY+" 1% of damage is stored as thorns true damage."); + lore.add(ChatColor.GRAY+" Shift+Left-Click with a shield to unleash"); + lore.add(ChatColor.GRAY+" all of your stored mitigation damage."); }break; case DAWNTRACKER:{ lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:"); diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/WorldShop.java b/src/sig/plugin/TwosideKeeper/HelperStructures/WorldShop.java index 4ecbcdb..ceb05a6 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/WorldShop.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/WorldShop.java @@ -108,13 +108,13 @@ public class WorldShop { public static String GetItemInfo(ItemStack item) { //Gets all the info about this item in one gigantic string. (Separated by new lines. Useful for tellraw()). String message = ""; - if (GenericFunctions.isArtifactEquip(item)) { + if (GenericFunctions.isArtifactEquip(item) && !GenericFunctions.isArtifactArmor(item) /*Artifact armor already has this info displayed.*/) { if (item.hasItemMeta() && item.getItemMeta().hasDisplayName()) { message+="\n"+ChatColor.GOLD+ChatColor.BOLD+"T"+item.getEnchantmentLevel(Enchantment.LUCK)+ChatColor.RESET+ChatColor.GOLD+" "+GenericFunctions.UserFriendlyMaterialName(item.getType())+" Artifact \n"; } } else - if (item.hasItemMeta() && + if (!GenericFunctions.isArtifactArmor(item) && item.hasItemMeta() && item.getItemMeta().hasDisplayName()) { message+="\n"+ChatColor.DARK_GRAY+"Item Type: "+ChatColor.ITALIC+ChatColor.GRAY+GenericFunctions.UserFriendlyMaterialName(item.getType())+"\n"; } @@ -531,7 +531,7 @@ public class WorldShop { } } - static String getRealName(Enchantment enchant) { + public static String getRealName(Enchantment enchant) { if (enchant.getName().equalsIgnoreCase("arrow_damage")) {return "Power";} if (enchant.getName().equalsIgnoreCase("arrow_fire")) {return "Flame";} if (enchant.getName().equalsIgnoreCase("arrow_infinite")) {return "Infinity";} diff --git a/src/sig/plugin/TwosideKeeper/PlayerStructure.java b/src/sig/plugin/TwosideKeeper/PlayerStructure.java index c6987ae..392acbf 100644 --- a/src/sig/plugin/TwosideKeeper/PlayerStructure.java +++ b/src/sig/plugin/TwosideKeeper/PlayerStructure.java @@ -109,6 +109,7 @@ public class PlayerStructure { public long lastassassinatetime=0; public long lastlifesavertime=0; public boolean slayermegahit=false; + public double thorns_amt = 0.0; public long iframetime = 0; @@ -257,18 +258,18 @@ public class PlayerStructure { workable.set("spleef_wins", spleef_wins); workable.set("sounds_enabled", sounds_enabled); workable.set("hasDied", hasDied); - ConfigurationSection deathlootlist = workable.createSection("deathloot"); + //ConfigurationSection deathlootlist = workable.createSection("deathloot"); if (DeathManager.deathStructureExists(Bukkit.getPlayer(name))) { DeathStructure ds = DeathManager.getDeathStructure(Bukkit.getPlayer(name)); deathloc_x = ds.deathloc.getX(); deathloc_y = ds.deathloc.getY(); deathloc_z = ds.deathloc.getZ(); deathloc_world = ds.deathloc.getWorld().getName(); - for (int i=0;i0) { Location rand_node=getRandomNode(); @@ -177,20 +177,20 @@ public class RecyclingCenter { if (b.getState()!=null) { Chest c = (Chest) b.getState(); for (int j=0;j<27;j++) { - if (c.getBlockInventory().getItem(j)!=null && c.getBlockInventory().getItem(j).getType()==i.getItemStack().getType()) { + if (c.getBlockInventory().getItem(j)!=null && c.getBlockInventory().getItem(j).getType()==i.getType()) { } } int itemslot = (int)Math.floor(Math.random()*27); ItemStack oldItem = c.getBlockInventory().getItem(itemslot); //There is also a chance to move this item to another random spot. - if (!isCommon(i.getItemStack().getType())) { + if (!isCommon(i.getType())) { if (oldItem!=null && Math.random()*100<=TwosideKeeper.RECYCLECHANCE) { int itemslot2 = (int)Math.floor(Math.random()*27); c.getBlockInventory().setItem(itemslot2, oldItem); } - c.getBlockInventory().setItem(itemslot, i.getItemStack()); - populateItemList(i.getItemStack()); - TwosideKeeper.log("Sent "+ChatColor.AQUA+GenericFunctions.UserFriendlyMaterialName(i.getItemStack())+((i.getItemStack().getAmount()>1)?ChatColor.YELLOW+" x"+i.getItemStack().getAmount():"")+ChatColor.RESET+" to Recycling Center Node "+rand_node.toString(),2); + c.getBlockInventory().setItem(itemslot, i); + populateItemList(i); + TwosideKeeper.log("Sent "+ChatColor.AQUA+GenericFunctions.UserFriendlyMaterialName(i)+((i.getAmount()>1)?ChatColor.YELLOW+" x"+i.getAmount():"")+ChatColor.RESET+" to Recycling Center Node "+rand_node.toString(),2); } } } diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index 33ed514..4477fb6 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -2723,7 +2723,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener { pd = PlayerStructure.GetPlayerStructure(p); pd.hasDied=true; pd.vendetta_amt=0.0; - p.getInventory().clear(); + //p.getInventory().clear(); } for (int i=0;i0.0) { //Deal Vendetta damage instead. + if (PlayerMode.isDefender(p) && p.isSneaking() && ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL,5) && pd.vendetta_amt>0.0) { //Deal Vendetta damage instead. p.playSound(p.getLocation(), Sound.BLOCK_GLASS_BREAK, 1.0f, 0.5f); GenericFunctions.removeNoDamageTick((LivingEntity)ev.getEntity(), ev.getDamager()); CustomDamage.ApplyDamage(pd.vendetta_amt, ev.getDamager(), (LivingEntity)ev.getEntity(), null, "Vendetta"); diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java index dc221fc..100939d 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java @@ -348,6 +348,9 @@ public final class TwosideKeeperAPI { public static boolean isRecyclingCenter(Block b) { return RecyclingCenter.isRecyclingCenter(b); } + public static void addItemToRecyclingCenter(ItemStack item) { + TwosideKeeper.TwosideRecyclingCenter.AddItemToRecyclingCenter(item); + } //Item Set COMMANDS. public static boolean isSetItem(ItemStack item) { @@ -433,7 +436,7 @@ public final class TwosideKeeperAPI { * @param p * @return */ - public double getCooldownReduction(Player p) { + public static double getCooldownReduction(Player p) { return CustomDamage.calculateCooldownReduction(p); } } diff --git a/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java b/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java index 02b2158..0f260fd 100644 --- a/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java +++ b/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java @@ -118,6 +118,9 @@ final class runServerHeartbeat implements Runnable { PlayerStructure pd = (PlayerStructure)TwosideKeeper.playerdata.get(p.getUniqueId()); GenericFunctions.RemoveNewDebuffs(p); + ItemStack[] equips2 = GenericFunctions.getEquipment(p); + for (int i=0;i