diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 73de963..4f8086f 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/AutoUpdatePlugin.java b/src/sig/plugin/TwosideKeeper/AutoUpdatePlugin.java index c218c7a..0225741 100644 --- a/src/sig/plugin/TwosideKeeper/AutoUpdatePlugin.java +++ b/src/sig/plugin/TwosideKeeper/AutoUpdatePlugin.java @@ -34,7 +34,6 @@ public class AutoUpdatePlugin implements Runnable { try { FileUtils.copyURLToFile(new URL(plugins.get(i).url), new File(TwosideKeeper.filesave,"updates/"+plugins.get(i).name)); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } @@ -43,20 +42,17 @@ public class AutoUpdatePlugin implements Runnable { try { file = new FileInputStream(new File(TwosideKeeper.filesave,"updates/"+plugins.get(i).name)); } catch (FileNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); } String md5 = null; try { md5 = org.apache.commons.codec.digest.DigestUtils.md5Hex(file); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } try { file.close(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } @@ -95,7 +91,6 @@ public class AutoUpdatePlugin implements Runnable { FileUtils.copyFile(new File(TwosideKeeper.filesave,"updates/"+plugins.get(i).name), new File(TwosideKeeper.filesave,"../"+plugins.get(i).name+".jar")); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); }*/ } @@ -119,7 +114,6 @@ public class AutoUpdatePlugin implements Runnable { try { workable.save(config); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -132,7 +126,6 @@ public class AutoUpdatePlugin implements Runnable { try { workable.save(config); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } diff --git a/src/sig/plugin/TwosideKeeper/Boss/EliteZombie.java b/src/sig/plugin/TwosideKeeper/Boss/EliteZombie.java index aa821d2..c1530c8 100644 --- a/src/sig/plugin/TwosideKeeper/Boss/EliteZombie.java +++ b/src/sig/plugin/TwosideKeeper/Boss/EliteZombie.java @@ -1,7 +1,5 @@ package sig.plugin.TwosideKeeper.Boss; -import java.text.DecimalFormat; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -15,8 +13,6 @@ import org.bukkit.Sound; import org.bukkit.attribute.Attribute; import org.bukkit.block.Block; import org.bukkit.boss.BarColor; -import org.bukkit.boss.BarFlag; -import org.bukkit.boss.BarStyle; import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.Creeper; import org.bukkit.entity.EntityType; @@ -31,9 +27,7 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; import org.bukkit.util.Vector; -import org.inventivetalent.glow.GlowAPI; -import sig.plugin.TwosideKeeper.ChargeZombie; import sig.plugin.TwosideKeeper.CustomDamage; import sig.plugin.TwosideKeeper.EliteMonster; import sig.plugin.TwosideKeeper.MonsterController; @@ -91,7 +85,7 @@ public class EliteZombie extends EliteMonster{ } } - private void createBossHealthbar() { + protected void createBossHealthbar() { List currentplayers = bar.getPlayers(); for (int i=0;i0) { p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_BREAK_DOOR_WOOD, 1.0f, 1.0f); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.CONFUSION,20*4,0,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.CONFUSION,20*4,0,p); TwosideKeeper.log("Got hit for "+storingenergy_hit+" damage!", 2); GenericFunctions.removeNoDamageTick(p, m); if (CustomDamage.ApplyDamage(storingenergy_hit, m, p, null, "Stored Energy", CustomDamage.IGNOREDODGE)) { diff --git a/src/sig/plugin/TwosideKeeper/Boss/MegaWither.java b/src/sig/plugin/TwosideKeeper/Boss/MegaWither.java index a936470..d621b10 100644 --- a/src/sig/plugin/TwosideKeeper/Boss/MegaWither.java +++ b/src/sig/plugin/TwosideKeeper/Boss/MegaWither.java @@ -1,20 +1,58 @@ package sig.plugin.TwosideKeeper.Boss; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; +import org.bukkit.potion.PotionEffectType; +import sig.plugin.TwosideKeeper.ChargeZombie; import sig.plugin.TwosideKeeper.EliteMonster; +import sig.plugin.TwosideKeeper.TwosideKeeper; +import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions; public class MegaWither extends EliteMonster{ + static int DROPDOWN_DURATION = 40; + static int DROPDOWN_COOLDOWN = 20*5; + long last_dropdowntime=0; public MegaWither(Monster m) { super(m); + m.setAI(false); } public void runTick() { increaseBarTextScroll(); regenerateHealth(); + createBossHealthbar(); resetToSpawn(); ignoreAllOtherTargets(); + randomlyDropDown(); + destroyNearbyBlocks(); + } + + private void destroyNearbyBlocks() { + if (targetlist.size()>0) { + ChargeZombie.BreakBlocksAroundArea(m, 2); + } + } + + private void randomlyDropDown() { + if (last_dropdowntime+DROPDOWN_COOLDOWN0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored"); + 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",true); } } if (getDamagerEntity(damager) instanceof Enderman) { @@ -364,10 +366,13 @@ public class CustomDamage { GenericFunctions.SubtractSlayerModeHealth(p, damage); //p.setHealth(pd.slayermodehp); //damage=0; - GenericFunctions.removeStealth(p); + if (GenericFunctions.hasStealth(p)) { + GenericFunctions.removeStealth(p); + } } pd.slayermegahit=false; pd.lastcombat=TwosideKeeper.getServerTickTime(); + pd.lasthitdesc=reason; damage = calculateDefenderAbsorption(p, damager, damage); @@ -385,7 +390,7 @@ public class CustomDamage { //Create an explosion. TwosideKeeper.log("In here", 5); Location hitloc = aPlugin.API.getArrowHitLocation(target, a); - GenericFunctions.DealExplosionDamageToEntities(hitloc, getBaseWeaponDamage(weapon,damager,target)+40, 6); + GenericFunctions.DealExplosionDamageToEntities(hitloc, getBaseWeaponDamage(weapon,damager,target)+80, 6); p.playSound(hitloc, Sound.ENTITY_ENDERDRAGON_FIREBALL_EXPLODE, 0.5f, 1.0f); aPlugin.API.sendSoundlessExplosion(hitloc, 2); } @@ -459,7 +464,7 @@ public class CustomDamage { } performMegaKnockback(damager,target); removePermEnchantments(p,weapon); - GenericFunctions.knockOffGreed(p); + //GenericFunctions.knockOffGreed(p); castEruption(p,target,weapon); addHealthFromLifesteal(p,damage,weapon); triggerEliteHitEvent(p,target,damage); @@ -473,13 +478,24 @@ public class CustomDamage { if (isFlagSet(pd.lasthitproperties,IS_CRIT)) { GenericFunctions.addSuppressionTime(target, 15); } + if (isFlagSet(pd.lasthitproperties,IS_PREEMPTIVE)) { + if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getHotbarItems(p), p, ItemSet.WOLFSBANE, 7)) { + if (pd.slayermodehp+20) { - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE, Math.max(resistance_duration,20*20), resistancelv-1, p, true); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.DAMAGE_RESISTANCE, Math.max(resistance_duration,20*20), resistancelv-1, p, true); } else { - GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.DAMAGE_RESISTANCE,p); + GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.DAMAGE_RESISTANCE,p); } pd.swiftaegisamt--; TwosideKeeper.log(pd.swiftaegisamt+" stacks of Aegis remaining.", 5); @@ -920,7 +936,7 @@ public class CustomDamage { 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"); + 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",true); } return true; } @@ -1203,8 +1219,8 @@ public class CustomDamage { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); if (pd.iframetime=0.01) { p_loc.setY(0); p.teleport(p_loc); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.SLOW,20*2,10,p); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.REGENERATION,20*16,6,p); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.LEVITATION,20*18,6,p); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,20*26,50,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.SLOW,20*2,10,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.REGENERATION,20*16,6,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION,20*18,6,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.DAMAGE_RESISTANCE,20*26,50,p); DecimalFormat df = new DecimalFormat("0.00"); double rand_amt = 0.0; if (totalmoney>5) { diff --git a/src/sig/plugin/TwosideKeeper/DeathManager.java b/src/sig/plugin/TwosideKeeper/DeathManager.java index b67a8cd..7784512 100644 --- a/src/sig/plugin/TwosideKeeper/DeathManager.java +++ b/src/sig/plugin/TwosideKeeper/DeathManager.java @@ -33,8 +33,8 @@ public class DeathManager { Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, new Runnable() { @Override public void run() { - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.LEVITATION,15,-2,p,true); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.JUMP,15,100,p,true); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION,15,-2,p,true); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.JUMP,15,100,p,true); p.setVelocity(new Vector(0,0,0)); CustomDamage.removeIframe(p); Location loc = p.getLocation(); diff --git a/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java b/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java index f3b855f..e95f92f 100644 --- a/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java +++ b/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java @@ -10,6 +10,7 @@ import sig.plugin.TwosideKeeper.HelperStructures.ItemSet; import sig.plugin.TwosideKeeper.HelperStructures.Loot; import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty; import sig.plugin.TwosideKeeper.HelperStructures.PlayerMode; +import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions; public class SigDrop extends Drop{ @@ -26,7 +27,13 @@ public class SigDrop extends Drop{ MonsterDifficulty diff; public SigDrop(int amount, int weight, String description, boolean isHardened, boolean isSet, int isWeapon, MonsterDifficulty diff) { - super(amount, weight, description); + super(amount, weight, + "["+GenericFunctions.CapitalizeFirstLetters(diff.name().replace("_", " "))+"]"+ + ((isHardened)?" Hardened":"")+ + " Mega"+ + (isSet?" Set":"")+ + (isWeapon==0?" Armor":isWeapon==1?" Weapon":" Tool") + ); this.isHardened=isHardened; this.isSet=isSet; this.isWeapon=isWeapon; diff --git a/src/sig/plugin/TwosideKeeper/EliteMonster.java b/src/sig/plugin/TwosideKeeper/EliteMonster.java index edce96f..c43794e 100644 --- a/src/sig/plugin/TwosideKeeper/EliteMonster.java +++ b/src/sig/plugin/TwosideKeeper/EliteMonster.java @@ -7,10 +7,8 @@ import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.Particle; import org.bukkit.Sound; import org.bukkit.attribute.Attribute; import org.bukkit.block.Block; @@ -18,25 +16,15 @@ import org.bukkit.boss.BarColor; import org.bukkit.boss.BarFlag; import org.bukkit.boss.BarStyle; import org.bukkit.boss.BossBar; -import org.bukkit.entity.AreaEffectCloud; -import org.bukkit.entity.Creeper; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.FallingBlock; +import org.bukkit.entity.EnderDragon; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.metadata.FixedMetadataValue; -import org.bukkit.potion.PotionData; -import org.bukkit.potion.PotionEffect; +import org.bukkit.entity.Wither; import org.bukkit.potion.PotionEffectType; -import org.bukkit.potion.PotionType; import org.bukkit.util.Vector; import org.inventivetalent.glow.GlowAPI; -import sig.plugin.TwosideKeeper.HelperStructures.Loot; -import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty; -import sig.plugin.TwosideKeeper.HelperStructures.PlayerMode; import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions; public class EliteMonster { @@ -120,7 +108,12 @@ public class EliteMonster { } } - private void createBossHealthbar() { + protected void createBossHealthbar() { + if (m instanceof Wither || m instanceof EnderDragon) { + bar.removeAll(); + willpower_bar.removeAll(); + return; + } List currentplayers = bar.getPlayers(); for (int i=0;i0) { Player p = targetlist.get((int)(Math.random() * targetlist.size())); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.BLINDNESS,20*1,7,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.BLINDNESS,20*1,7,p); m.setTarget(p); TwosideKeeper.log("Set new target to "+p.getName(), 2); return p; diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java index 6b4ce1b..cc3c9a3 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java @@ -110,7 +110,7 @@ public enum ArtifactAbility { //General abilities AUTOREPAIR("Auto Repair","1% chance every second to repair [VAL] durability to the artifact item\n\nThe item must be sitting in your hotbar or must be equipped for this ability to work. This ability is less effective with no sunlight!",new double[]{3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,10,15}, new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},10,1,UpgradePath.ALL), - GREED("Greed","Increases Drop rate by [VAL]% . Health is halved, health regeneration is halved. Each hit has a [GREEDCHANCE]% chance to consume the Greed buff."+TemporarySkill(),new double[]{1,2,3,4,5,7,9,11,13,15,17,19,25,35,50}, + GREED("Greed","Increases Drop rate by [VAL]% . Health is halved, health regeneration is halved. Each kill has a [GREEDCHANCE]% chance to consume the Greed buff."+TemporarySkill(),new double[]{1,2,3,4,5,7,9,11,13,15,17,19,25,35,50}, new double[]{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0},10,10,UpgradePath.ALL), /*GROWTH("Growth",ChatColor.GRAY+"[Unimplemented] Increases artifact EXP gained by [VAL]% . Health is halved, health regeneration is halved, and damage reduction is halved. Consumes one level of Growth per level up.",new double[]{100,100,100,100,100,100,100,100,100,100}, new double[]{2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0},100,1000,UpgradePath.ALL),*/ @@ -627,7 +627,7 @@ public enum ArtifactAbility { msg=msg.replace("[FATALDMG]", DisplayChangedValue(df.format(120-fromlv),df.format(120-tolv))); msg=msg.replace("[REPAIRCHANCE]", df.format(tier/3)); msg=msg.replace("[DODGEVAL]", df.format(tier)); - msg=msg.replace("[GREEDCHANCE]", ChatColor.BLUE+df.format((16-tier)*0.1d)+ChatColor.RESET); + msg=msg.replace("[GREEDCHANCE]", ChatColor.BLUE+df.format((100d/tier))+ChatColor.RESET); return msg; } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index 4c8b362..4f5ff8f 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -1,5 +1,9 @@ package sig.plugin.TwosideKeeper.HelperStructures.Common; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -12,6 +16,7 @@ import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Sound; +import org.bukkit.attribute.Attribute; import org.bukkit.block.Block; import org.bukkit.block.Sign; import org.bukkit.command.CommandSender; @@ -2647,12 +2652,13 @@ public class GenericFunctions { ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, item)) { TwosideKeeper.log("Found one.",5); int tier = item.getEnchantmentLevel(Enchantment.LUCK); - if (Math.random()<=((16-tier)*0.1d)/100d) { - item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item))); + if (Math.random()<=(100d/tier)/100d) { + item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED); + p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item))); //AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-1, p); AwakenedArtifact.setMaxAP(item, AwakenedArtifact.getMaxAP(item)-1); brokeone=true; - break; + return; } } } @@ -2662,11 +2668,12 @@ public class GenericFunctions { if (isArtifactEquip(item) && ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, item)) { int tier = item.getEnchantmentLevel(Enchantment.LUCK); - if (Math.random()<=((16-tier)*0.1d)/100d) { + if (Math.random()<=(100d/tier)/100d) { item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED); AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-1, p); p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item))); brokeone=true; + return; } } } @@ -2736,7 +2743,7 @@ public class GenericFunctions { CustomDamage.addIframe(dodgeduration, p); - logAndApplyPotionEffectToPlayer(PotionEffectType.SPEED,dodgeduration,2,p); + logAndApplyPotionEffectToEntity(PotionEffectType.SPEED,dodgeduration,2,p); } } } @@ -2746,11 +2753,11 @@ public class GenericFunctions { return (int)(cooldown*(1-cdr)); } - public static void logAndApplyPotionEffectToPlayer(PotionEffectType type, int ticks, int amplifier, LivingEntity p) { - logAndApplyPotionEffectToPlayer(type,ticks,amplifier,p,false); + public static void logAndApplyPotionEffectToEntity(PotionEffectType type, int ticks, int amplifier, LivingEntity p) { + logAndApplyPotionEffectToEntity(type,ticks,amplifier,p,false); } - public static void logAndApplyPotionEffectToPlayer(PotionEffectType type, int ticks, int amplifier, LivingEntity p, boolean force) { + public static void logAndApplyPotionEffectToEntity(PotionEffectType type, int ticks, int amplifier, LivingEntity p, boolean force) { TwosideKeeper.log(ChatColor.WHITE+"Adding Potion Effect "+type.getName()+" "+WorldShop.toRomanNumeral((amplifier+1))+"("+amplifier+") to "+p.getName()+" with "+ticks+" tick duration. "+((force)?ChatColor.RED+"FORCED":""), TwosideKeeper.POTION_DEBUG_LEVEL); if (p.hasPotionEffect(type)) { TwosideKeeper.log(ChatColor.YELLOW+" Already had effect on Player "+p.getName()+". "+type.getName()+" "+WorldShop.toRomanNumeral((getPotionEffectLevel(type,p)+1))+"("+getPotionEffectLevel(type,p)+"), Duration: "+getPotionEffectDuration(type,p)+" ticks", TwosideKeeper.POTION_DEBUG_LEVEL); @@ -2776,10 +2783,10 @@ public class GenericFunctions { } } - public static void logAndRemovePotionEffectFromPlayer(PotionEffectType type, LivingEntity p) { + public static void logAndRemovePotionEffectFromEntity(PotionEffectType type, LivingEntity p) { TwosideKeeper.log(ChatColor.WHITE+"Removing Potion Effect "+type+" "+WorldShop.toRomanNumeral((getPotionEffectLevel(type,p)+1))+"("+getPotionEffectLevel(type,p)+") on Player "+p.getName()+" Duration: "+getPotionEffectDuration(type,p)+" ticks by adding a 0 duration version of this effect.", TwosideKeeper.POTION_DEBUG_LEVEL); //p.removePotionEffect(type); - logAndApplyPotionEffectToPlayer(type,1,0,p,true); + logAndApplyPotionEffectToEntity(type,1,0,p,true); if (p.hasPotionEffect(type)) { TwosideKeeper.log(ChatColor.DARK_RED+" Effect on Player "+p.getName()+" is now "+type+" "+WorldShop.toRomanNumeral((getPotionEffectLevel(type,p)+1))+"("+getPotionEffectLevel(type,p)+"), Duration: "+getPotionEffectDuration(type,p)+" ticks", TwosideKeeper.POTION_DEBUG_LEVEL); TwosideKeeper.log(ChatColor.RED+"THIS SHOULD NOT BE HAPPENING! Reporting", TwosideKeeper.POTION_DEBUG_LEVEL); @@ -2974,7 +2981,7 @@ public class GenericFunctions { if (pd.last_rejuvenate+GetModifiedCooldown(TwosideKeeper.REJUVENATE_COOLDOWN,player)<=TwosideKeeper.getServerTickTime()) { player.playSound(player.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CURE, 1.0f, 1.0f); addIFrame(player,40); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.REGENERATION,200,9,player,true); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.REGENERATION,200,9,player,true); aPlugin.API.sendCooldownPacket(player, player.getEquipment().getItemInMainHand(), GetModifiedCooldown(TwosideKeeper.REJUVENATE_COOLDOWN,player)); } } @@ -3305,7 +3312,7 @@ public class GenericFunctions { RevivePlayer(p,p.getMaxHealth()); pd.slayermodehp = p.getMaxHealth(); if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) {GenericFunctions.applyStealth(p,false);} - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.SPEED, 20*10, 3, p, true); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.SPEED, 20*10, 3, p, true); deAggroNearbyTargets(p); revived=true; Bukkit.broadcastMessage(ChatColor.GOLD+p.getName()+ChatColor.WHITE+" almost died... But came back to life!"); @@ -3367,11 +3374,11 @@ public class GenericFunctions { public static void deAggroNearbyTargets(Player p) { //List monsters = getNearbyMobs(p.getLocation(),8); - List monsters = CustomDamage.trimNonMonsterEntities(p.getNearbyEntities(8, 8, 8)); + List monsters = CustomDamage.trimNonMonsterEntities(p.getNearbyEntities(24, 24, 24)); for (Monster m : monsters) { if (m.getTarget()!=null && m.getTarget().equals(p) && - m.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING,5,0))) { + !m.hasPotionEffect(PotionEffectType.GLOWING)) { m.setTarget(null); } } @@ -3384,7 +3391,7 @@ public class GenericFunctions { if (isBadEffect(eff.getType())) { Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, () -> { - logAndRemovePotionEffectFromPlayer(eff.getType(),p); + logAndRemovePotionEffectFromEntity(eff.getType(),p); }, 1); } } @@ -3543,13 +3550,17 @@ public class GenericFunctions { Player p = (Player)damager; PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); pd.last_strikerspell = pd.last_strikerspell-40; - aPlugin.API.sendCooldownPacket(p, p.getEquipment().getItemInMainHand(), (int)(GetModifiedCooldown(TwosideKeeper.LINEDRIVE_COOLDOWN,p)-(TwosideKeeper.getServerTickTime()-pd.last_strikerspell))); + aPlugin.API.sendCooldownPacket(p, p.getEquipment().getItemInMainHand(), GetRemainingCooldownTime(p, pd.last_strikerspell, TwosideKeeper.LINEDRIVE_COOLDOWN)); } updateNoDamageTickMap(m,(Player)damager); } } } } + + public static int GetRemainingCooldownTime(Player p, long current_cooldown, int cooldown_time) { + return (int)(GetModifiedCooldown(cooldown_time,p)-(TwosideKeeper.getServerTickTime()-current_cooldown)); + } public static List getNearbyMobs(Location l, int range) { Collection ents = l.getWorld().getNearbyEntities(l, range, range, range); @@ -3818,10 +3829,10 @@ public class GenericFunctions { if (resistancelv+swiftaegislv<9) { //Apply it directly. pd.swiftaegisamt+=swiftaegislv; - logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE, Math.max(20*20, resistance_duration), (resistancelv+swiftaegislv),p,true); + logAndApplyPotionEffectToEntity(PotionEffectType.DAMAGE_RESISTANCE, Math.max(20*20, resistance_duration), (resistancelv+swiftaegislv),p,true); } else { pd.swiftaegisamt+=Math.max(9-resistancelv,0); - logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE, Math.max(20*20, resistance_duration),9,p,true); + logAndApplyPotionEffectToEntity(PotionEffectType.DAMAGE_RESISTANCE, Math.max(20*20, resistance_duration),9,p,true); } } TwosideKeeper.log("New Aegis level: "+pd.swiftaegisamt,5); @@ -3856,11 +3867,11 @@ public class GenericFunctions { int currentlv = getPotionEffectLevel(type,p); PotionEffect neweffect = new PotionEffect(type,tick_duration,(currentlv+incr_amt= duration) { - logAndApplyPotionEffectToPlayer(neweffect.getType(), neweffect.getDuration(),neweffect.getAmplifier(), p, true); + logAndApplyPotionEffectToEntity(neweffect.getType(), neweffect.getDuration(),neweffect.getAmplifier(), p, true); } } else { PotionEffect neweffect = new PotionEffect(type,tick_duration,0); - logAndApplyPotionEffectToPlayer(neweffect.getType(), neweffect.getDuration(),neweffect.getAmplifier(), p, true); + logAndApplyPotionEffectToEntity(neweffect.getType(), neweffect.getDuration(),neweffect.getAmplifier(), p, true); } } @@ -3874,7 +3885,9 @@ public class GenericFunctions { if (set!=null && (set==ItemSet.LORASYS || set==ItemSet.GLADOMAIN || - set==ItemSet.MOONSHADOW)) { + set==ItemSet.MOONSHADOW || + set==ItemSet.WOLFSBANE || + set==ItemSet.ALUSTINE)) { return true; } } @@ -3909,7 +3922,7 @@ public class GenericFunctions { } if (Math.random()<=removechance/100) { if (type!=null && (!type.equals(PotionEffectType.WEAKNESS) || level<9)) { - GenericFunctions.logAndRemovePotionEffectFromPlayer(type,p); + GenericFunctions.logAndRemovePotionEffectFromEntity(type,p); p.sendMessage(ChatColor.DARK_GRAY+"You successfully resisted the application of "+ChatColor.WHITE+GenericFunctions.CapitalizeFirstLetters(type.getName().replace("_", " "))); } } @@ -3944,11 +3957,11 @@ public class GenericFunctions { public static void logToFile(String message) { try { - if (!TwosideKeeper.getT.exists()) { - savePath.mkdir(); + if (!TwosideKeeper.filesave.exists()) { + TwosideKeeper.filesave.mkdir(); } - File saveTo = new File(plugin.getDataFolder(), "aPluginLogger.txt"); + File saveTo = new File(TwosideKeeper.filesave, "TwosideKeeperlogger.txt"); if (!saveTo.exists()) { saveTo.createNewFile(); } @@ -3974,13 +3987,13 @@ public class GenericFunctions { } public static void applyStealth(Player p, boolean blindness_effect) { - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 111, p, true); - if (blindness_effect) {GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.BLINDNESS, 20*2, 111, p);} + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 111, p, true); + if (blindness_effect) {GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.BLINDNESS, 20*2, 111, p);} p.playSound(p.getLocation(), Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 0.5f); } public static void removeStealth(Player p) { - GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.INVISIBILITY, p); + GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.INVISIBILITY, p); GenericFunctions.addIFrame(p, 10); p.playSound(p.getLocation(), Sound.BLOCK_REDSTONE_TORCH_BURNOUT, 1.0f, 1.0f); } @@ -4003,7 +4016,7 @@ public class GenericFunctions { Vector facing = p.getLocation().getDirection(); if (!second_charge) { facing = p.getLocation().getDirection().setY(0); - logAndApplyPotionEffectToPlayer(PotionEffectType.SLOW,(ex_version)?7:15,20,p); + logAndApplyPotionEffectToEntity(PotionEffectType.SLOW,(ex_version)?7:15,20,p); } if (!ex_version || second_charge) { aPlugin.API.sendCooldownPacket(p, weaponused, GetModifiedCooldown(TwosideKeeper.LINEDRIVE_COOLDOWN,p)); @@ -4081,6 +4094,7 @@ public class GenericFunctions { mult += 2.0; pitch-=1.0; } + Location originalloc = player.getLocation().clone(); Location teleloc = target.getLocation().add(target.getLocation().getDirection().multiply(-1.0-mult)); int i=0; while (teleloc.getBlock().getType().isSolid() || teleloc.getBlock().getType()==Material.BEDROCK) { @@ -4105,15 +4119,32 @@ public class GenericFunctions { } player.playSound(teleloc, Sound.BLOCK_NOTE_SNARE, 1.0f, 1.0f); teleloc.setPitch((float)pitch); + + PlayerStructure pd = PlayerStructure.GetPlayerStructure(player); + player.teleport(teleloc); Location newfacingdir = target.getLocation().setDirection(target.getLocation().getDirection()); target.teleport(newfacingdir); - PlayerStructure pd = PlayerStructure.GetPlayerStructure(player); if (name!=Material.SKULL_ITEM || pd.lastlifesavertime+GetModifiedCooldown(TwosideKeeper.LIFESAVER_COOLDOWN,player)0) { - aPlugin.API.sendActionBarMessage(p, message+" "+prefix); - } else { - if (message.length()>0) { - aPlugin.API.sendActionBarMessage(p, message); + sendActionBarMessage(p,message,false); + } + + //Automatically appends status effect buffs to the beginning of it. + public static void sendActionBarMessage(Player p, String message, boolean important) { + PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); + if (important || (pd.lastimportantactionbarmsg+200) { + aPlugin.API.sendActionBarMessage(p, message+" "+prefix); + } else { + if (message.length()>0) { + aPlugin.API.sendActionBarMessage(p, message); + } + } + if (important) { + pd.lastimportantactionbarmsg=TwosideKeeper.getServerTickTime(); } } } @@ -4262,6 +4305,8 @@ public class GenericFunctions { return new EliteZombie(target); } if (target instanceof Wither) { + target.setMaxHealth(188000); + target.setHealth(188000); return new MegaWither(target); } TwosideKeeper.log("Elite Monster for monster "+target.getName()+" UNDEFINED. Defaulting to EliteZombie type.", 0); diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/Habitation.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/Habitation.java index beffb94..d125a9c 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/Habitation.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/Habitation.java @@ -122,7 +122,6 @@ public class Habitation { try { file.createNewFile(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/RecipeLinker.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/RecipeLinker.java index 71ae2b9..7a95f7d 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/RecipeLinker.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/RecipeLinker.java @@ -12,341 +12,341 @@ import sig.plugin.TwosideKeeper.HelperStructures.ArtifactItemType; import sig.plugin.TwosideKeeper.HelperStructures.CustomItem; public enum RecipeLinker { - ic(ChatColor.YELLOW,"Item Cube", + ic("Containers",ChatColor.YELLOW,"Item Cube", new ItemStack[]{ CustomItem.ItemCube(), new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD), new ItemStack(Material.WOOD),new ItemStack(Material.CHEST),new ItemStack(Material.WOOD), new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD), }), - lic(ChatColor.YELLOW,"Large Item Cube",new ItemStack[]{ + lic("Containers",ChatColor.YELLOW,"Large Item Cube",new ItemStack[]{ CustomItem.LargeItemCube(), new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD), new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.CHEST),new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD), }), - eic(ChatColor.YELLOW,"Ender Item Cube",new ItemStack[]{ + eic("Containers",ChatColor.YELLOW,"Ender Item Cube",new ItemStack[]{ CustomItem.EnderItemCube(), new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN), new ItemStack(Material.EMERALD),new ItemStack(Material.CHEST),new ItemStack(Material.EMERALD), new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN), }), - dc(ChatColor.YELLOW,"Duplicate Ender Item Cube",new ItemStack[]{ + dc("Containers",ChatColor.YELLOW,"Duplicate Ender Item Cube",new ItemStack[]{ CustomItem.EnderItemCube(2), CustomItem.EnderItemCube(),new ItemStack(Material.NETHER_STAR) }), - aq(ChatColor.RED,"Arrow Quiver",new ItemStack[]{ + aq("Misc Items",ChatColor.RED,"Arrow Quiver",new ItemStack[]{ CustomItem.ArrowQuiver(), null,new ItemStack(Material.LEATHER),new ItemStack(Material.EMERALD_BLOCK), new ItemStack(Material.LEATHER),new ItemStack(Material.SPECTRAL_ARROW),new ItemStack(Material.LEATHER), null,new ItemStack(Material.LEATHER) }), - ihelm(ChatColor.WHITE,"Hardened Iron Helmet",new ItemStack[]{ + ihelm("Hardened Armor",ChatColor.WHITE,"Hardened Iron Helmet",new ItemStack[]{ CustomItem.HardenedPiece(Material.IRON_HELMET), new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK) }), - ichest(ChatColor.WHITE,"Hardened Iron Chestplate",new ItemStack[]{ + ichest("Hardened Armor",ChatColor.WHITE,"Hardened Iron Chestplate",new ItemStack[]{ CustomItem.HardenedPiece(Material.IRON_CHESTPLATE), new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK) }), - ileg(ChatColor.WHITE,"Hardened Iron Leggings",new ItemStack[]{ + ileg("Hardened Armor",ChatColor.WHITE,"Hardened Iron Leggings",new ItemStack[]{ CustomItem.HardenedPiece(Material.IRON_LEGGINGS), new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK) }), - iboots(ChatColor.WHITE,"Hardened Iron Boots",new ItemStack[]{ + iboots("Hardened Armor",ChatColor.WHITE,"Hardened Iron Boots",new ItemStack[]{ CustomItem.HardenedPiece(Material.IRON_BOOTS), new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK) }), - dhelm(ChatColor.AQUA,"Hardened Diamond Helmet",new ItemStack[]{ + dhelm("Hardened Armor",ChatColor.AQUA,"Hardened Diamond Helmet",new ItemStack[]{ CustomItem.HardenedPiece(Material.DIAMOND_HELMET), new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK), new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK) }), - dchest(ChatColor.AQUA,"Hardened Diamond Chestplate",new ItemStack[]{ + dchest("Hardened Armor",ChatColor.AQUA,"Hardened Diamond Chestplate",new ItemStack[]{ CustomItem.HardenedPiece(Material.DIAMOND_CHESTPLATE), new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK), new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK), new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK) }), - dleg(ChatColor.AQUA,"Hardened Diamond Leggings",new ItemStack[]{ + dleg("Hardened Armor",ChatColor.AQUA,"Hardened Diamond Leggings",new ItemStack[]{ CustomItem.HardenedPiece(Material.DIAMOND_LEGGINGS), new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK), new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK),null, new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK) }), - dboots(ChatColor.AQUA,"Hardened Diamond Boots",new ItemStack[]{ + dboots("Hardened Armor",ChatColor.AQUA,"Hardened Diamond Boots",new ItemStack[]{ CustomItem.HardenedPiece(Material.DIAMOND_BOOTS), new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK), new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK) }), - ghelm(ChatColor.GOLD,"Hardened Gold Helmet",new ItemStack[]{ + ghelm("Hardened Armor",ChatColor.GOLD,"Hardened Gold Helmet",new ItemStack[]{ CustomItem.HardenedPiece(Material.GOLD_HELMET), new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK) }), - gchest(ChatColor.GOLD,"Hardened Gold Chestplate",new ItemStack[]{ + gchest("Hardened Armor",ChatColor.GOLD,"Hardened Gold Chestplate",new ItemStack[]{ CustomItem.HardenedPiece(Material.GOLD_CHESTPLATE), new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK) }), - gleg(ChatColor.GOLD,"Hardened Gold Leggings",new ItemStack[]{ + gleg("Hardened Armor",ChatColor.GOLD,"Hardened Gold Leggings",new ItemStack[]{ CustomItem.HardenedPiece(Material.GOLD_LEGGINGS), new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK) }), - gboots(ChatColor.GOLD,"Hardened Gold Boots",new ItemStack[]{ + gboots("Hardened Armor",ChatColor.GOLD,"Hardened Gold Boots",new ItemStack[]{ CustomItem.HardenedPiece(Material.GOLD_BOOTS), new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK), new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK) }), @SuppressWarnings("deprecation") - wool(ChatColor.BLUE,"Wool Recoloring",new ItemStack[]{ + wool("Misc Items",ChatColor.BLUE,"Wool Recoloring",new ItemStack[]{ new ItemStack(Material.WOOL,8,(short)11), new ItemStack(Material.WOOL,1,(short)2),new ItemStack(Material.WOOL,1,(short)3),new ItemStack(Material.WOOL,1,(short)5), new ItemStack(Material.WOOL,1,(short)7),new ItemStack(Material.getMaterial(351),1,(short)4),new ItemStack(Material.WOOL,1,(short)8), new ItemStack(Material.WOOL,1,(short)13),new ItemStack(Material.WOOL,1,(short)11),new ItemStack(Material.WOOL,1,(short)9) }), - slab(ChatColor.BLUE,"Slab Reconstruction",new ItemStack[]{ + slab("Misc Items",ChatColor.BLUE,"Slab Reconstruction",new ItemStack[]{ new ItemStack(Material.WOOD,1,(short)2), new ItemStack(Material.WOOD_STEP,1,(short)2),new ItemStack(Material.WOOD_STEP,1,(short)2) }), - check(ChatColor.BLUE,"Money Check",new ItemStack[]{ + check("Misc Items",ChatColor.BLUE,"Money Check",new ItemStack[]{ CustomItem.MoneyCheck(), new ItemStack(Material.FEATHER),new ItemStack(Material.INK_SACK),null, new ItemStack(Material.PAPER), }), - sword(ChatColor.LIGHT_PURPLE,"Artifact Sword Recipe",new ItemStack[]{ + sword("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Sword Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.SWORD), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - axe(ChatColor.LIGHT_PURPLE,"Artifact Axe Recipe",new ItemStack[]{ + axe("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Axe Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.AXE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - boots(ChatColor.LIGHT_PURPLE,"Artifact Boots Recipe",new ItemStack[]{ + boots("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Boots Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.BOOTS), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), }), - chest(ChatColor.LIGHT_PURPLE,"Artifact Chestplate Recipe",new ItemStack[]{ + chest("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Chestplate Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.CHESTPLATE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - leg(ChatColor.LIGHT_PURPLE,"Artifact Leggings Recipe",new ItemStack[]{ + leg("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Leggings Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.LEGGINGS), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - helm(ChatColor.LIGHT_PURPLE,"Artifact Helmet Recipe",new ItemStack[]{ + helm("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Helmet Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.HELMET), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - bow(ChatColor.LIGHT_PURPLE,"Artifact Bow Recipe",new ItemStack[]{ + bow("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Bow Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.BOW), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - scythe(ChatColor.LIGHT_PURPLE,"Artifact Scythe Recipe",new ItemStack[]{ + scythe("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Scythe Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.HOE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - rod(ChatColor.LIGHT_PURPLE,"Artifact Fishing Rod Recipe",new ItemStack[]{ + rod("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Fishing Rod Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.FISHING_ROD), null,null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE) }), - pickaxe(ChatColor.LIGHT_PURPLE,"Artifact Pickaxe Recipe",new ItemStack[]{ + pickaxe("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Pickaxe Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.PICKAXE), Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE), null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null }), - shovel(ChatColor.LIGHT_PURPLE,"Artifact Shovel Recipe",new ItemStack[]{ + shovel("Artifact Recipes",ChatColor.LIGHT_PURPLE,"Artifact Shovel Recipe",new ItemStack[]{ Artifact.createRecipe(0, ArtifactItemType.SHOVEL), null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null, null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null }), - recipe(ChatColor.DARK_AQUA,"Recipe To Artifact",new ItemStack[]{ + recipe("Artifact Recipes",ChatColor.DARK_AQUA,"Recipe To Artifact",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.CHESTPLATE.getTieredItem(1),1,ArtifactItemType.CHESTPLATE.getDataValue()), Artifact.createRecipe(0, ArtifactItemType.CHESTPLATE) }), - t2(ChatColor.DARK_AQUA,"Upgrade to T2",new ItemStack[]{ + t2("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T2",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(2),2,ArtifactItemType.SHOVEL.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(1),1,ArtifactItemType.SHOVEL.getDataValue()),Artifact.createRecipe(0, ArtifactItemType.SHOVEL) }), - t3(ChatColor.DARK_AQUA,"Upgrade to T3",new ItemStack[]{ + t3("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T3",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.LEGGINGS.getTieredItem(3),3,ArtifactItemType.LEGGINGS.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.LEGGINGS.getTieredItem(2),2,ArtifactItemType.LEGGINGS.getDataValue()),Artifact.createRecipe(2, ArtifactItemType.LEGGINGS) }), - t4(ChatColor.DARK_AQUA,"Upgrade to T4",new ItemStack[]{ + t4("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T4",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOOTS.getTieredItem(4),4,ArtifactItemType.BOOTS.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOOTS.getTieredItem(3),3,ArtifactItemType.BOOTS.getDataValue()),Artifact.createRecipe(3, ArtifactItemType.BOOTS) }), - t5(ChatColor.DARK_AQUA,"Upgrade to T5",new ItemStack[]{ + t5("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T5",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HELMET.getTieredItem(5),5,ArtifactItemType.HELMET.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HELMET.getTieredItem(4),4,ArtifactItemType.HELMET.getDataValue()),Artifact.createRecipe(4, ArtifactItemType.HELMET) }), - t6(ChatColor.DARK_AQUA,"Upgrade to T6",new ItemStack[]{ + t6("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T6",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SWORD.getTieredItem(6),6,ArtifactItemType.SWORD.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SWORD.getTieredItem(5),5,ArtifactItemType.SWORD.getDataValue()),Artifact.createRecipe(5, ArtifactItemType.SWORD) }), - t7(ChatColor.DARK_AQUA,"Upgrade to T7",new ItemStack[]{ + t7("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T7",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(7),7,ArtifactItemType.HOE.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(6),6,ArtifactItemType.HOE.getDataValue()),Artifact.createRecipe(6, ArtifactItemType.HOE) }), - t8(ChatColor.DARK_AQUA,"Upgrade to T8",new ItemStack[]{ + t8("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T8",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(8),8,ArtifactItemType.AXE.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(7),7,ArtifactItemType.AXE.getDataValue()),Artifact.createRecipe(7, ArtifactItemType.AXE) }), - t9(ChatColor.DARK_AQUA,"Upgrade to T9",new ItemStack[]{ + t9("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T9",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(9),9,ArtifactItemType.PICKAXE.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(8),8,ArtifactItemType.PICKAXE.getDataValue()),Artifact.createRecipe(8, ArtifactItemType.PICKAXE) }), - t10(ChatColor.DARK_AQUA,"Upgrade to T10",new ItemStack[]{ + t10("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T10",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(10),10,ArtifactItemType.SHOVEL.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(9),9,ArtifactItemType.SHOVEL.getDataValue()),Artifact.createRecipe(9, ArtifactItemType.SHOVEL) }), - t11(ChatColor.DARK_AQUA,"Upgrade to T11",new ItemStack[]{ + t11("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T11",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(11),11,ArtifactItemType.PICKAXE.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(10),10,ArtifactItemType.PICKAXE.getDataValue()),Artifact.createRecipe(10, ArtifactItemType.PICKAXE) }), - t12(ChatColor.DARK_AQUA,"Upgrade to T12",new ItemStack[]{ + t12("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T12",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(12),12,ArtifactItemType.AXE.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(11),11,ArtifactItemType.AXE.getDataValue()),Artifact.createRecipe(11, ArtifactItemType.AXE) }), - t13(ChatColor.DARK_AQUA,"Upgrade to T13",new ItemStack[]{ + t13("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T13",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(13),13,ArtifactItemType.HOE.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(12),12,ArtifactItemType.HOE.getDataValue()),Artifact.createRecipe(12, ArtifactItemType.HOE) }), - t14(ChatColor.DARK_AQUA,"Upgrade to T14",new ItemStack[]{ + t14("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T14",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.FISHING_ROD.getTieredItem(14),14,ArtifactItemType.FISHING_ROD.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.FISHING_ROD.getTieredItem(13),13,ArtifactItemType.FISHING_ROD.getDataValue()),Artifact.createRecipe(13, ArtifactItemType.FISHING_ROD) }), - t15(ChatColor.DARK_AQUA,"Upgrade to T15",new ItemStack[]{ + t15("Upgrade Recipes",ChatColor.DARK_AQUA,"Upgrade to T15",new ItemStack[]{ AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOW.getTieredItem(15),15,ArtifactItemType.BOW.getDataValue()), AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOW.getTieredItem(14),14,ArtifactItemType.BOW.getDataValue()),Artifact.createRecipe(14, ArtifactItemType.BOW) }), - t2recipe(ChatColor.WHITE,"T2 Artifact Recipe",new ItemStack[]{ + t2recipe("Artifact Recipes",ChatColor.WHITE,"T2 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(2, ArtifactItemType.SHOVEL), Artifact.createRecipe(0, ArtifactItemType.SHOVEL),Artifact.createRecipe(0, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE) }), - t3recipe(ChatColor.WHITE,"T3 Artifact Recipe",new ItemStack[]{ + t3recipe("Artifact Recipes",ChatColor.WHITE,"T3 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(3, ArtifactItemType.SHOVEL), Artifact.createRecipe(2, ArtifactItemType.SHOVEL),Artifact.createRecipe(2, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE) }), - t4recipe(ChatColor.WHITE,"T4 Artifact Recipe",new ItemStack[]{ + t4recipe("Artifact Recipes",ChatColor.WHITE,"T4 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(4, ArtifactItemType.SHOVEL), Artifact.createRecipe(3, ArtifactItemType.SHOVEL),Artifact.createRecipe(3, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.ARTIFACT_BASE) }), - t5recipe(ChatColor.WHITE,"T5 Artifact Recipe",new ItemStack[]{ + t5recipe("Artifact Recipes",ChatColor.WHITE,"T5 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(5, ArtifactItemType.SHOVEL), Artifact.createRecipe(4, ArtifactItemType.SHOVEL),Artifact.createRecipe(4, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE) }), - t6recipe(ChatColor.WHITE,"T6 Artifact Recipe",new ItemStack[]{ + t6recipe("Artifact Recipes",ChatColor.WHITE,"T6 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(6, ArtifactItemType.SHOVEL), Artifact.createRecipe(5, ArtifactItemType.SHOVEL),Artifact.createRecipe(5, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE) }), - t7recipe(ChatColor.WHITE,"T7 Artifact Recipe",new ItemStack[]{ + t7recipe("Artifact Recipes",ChatColor.WHITE,"T7 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(7, ArtifactItemType.SHOVEL), Artifact.createRecipe(6, ArtifactItemType.SHOVEL),Artifact.createRecipe(6, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.ANCIENT_BASE) }), - t8recipe(ChatColor.WHITE,"T8 Artifact Recipe",new ItemStack[]{ + t8recipe("Artifact Recipes",ChatColor.WHITE,"T8 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(8, ArtifactItemType.SHOVEL), Artifact.createRecipe(7, ArtifactItemType.SHOVEL),Artifact.createRecipe(7, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE) }), - t9recipe(ChatColor.WHITE,"T9 Artifact Recipe",new ItemStack[]{ + t9recipe("Artifact Recipes",ChatColor.WHITE,"T9 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(9, ArtifactItemType.SHOVEL), Artifact.createRecipe(8, ArtifactItemType.SHOVEL),Artifact.createRecipe(8, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.LOST_CORE) }), - t10recipe(ChatColor.WHITE,"T10 Artifact Recipe",new ItemStack[]{ + t10recipe("Artifact Recipes",ChatColor.WHITE,"T10 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(10, ArtifactItemType.SHOVEL), Artifact.createRecipe(9, ArtifactItemType.SHOVEL),Artifact.createRecipe(9, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.LOST_BASE) }), - t11recipe(ChatColor.WHITE,"T11 Artifact Recipe",new ItemStack[]{ + t11recipe("Artifact Recipes",ChatColor.WHITE,"T11 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(11, ArtifactItemType.SHOVEL), Artifact.createRecipe(10, ArtifactItemType.SHOVEL),Artifact.createRecipe(10, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.DIVINE_ESSENCE) }), - t12recipe(ChatColor.WHITE,"T12 Artifact Recipe",new ItemStack[]{ + t12recipe("Artifact Recipes",ChatColor.WHITE,"T12 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(12, ArtifactItemType.SHOVEL), Artifact.createRecipe(11, ArtifactItemType.SHOVEL),Artifact.createRecipe(11, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE) }), - t13recipe(ChatColor.WHITE,"T13 Artifact Recipe",new ItemStack[]{ + t13recipe("Artifact Recipes",ChatColor.WHITE,"T13 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(13, ArtifactItemType.SHOVEL), Artifact.createRecipe(12, ArtifactItemType.SHOVEL),Artifact.createRecipe(12, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.DIVINE_BASE) }), - t14recipe(ChatColor.WHITE,"T14 Artifact Recipe",new ItemStack[]{ + t14recipe("Artifact Recipes",ChatColor.WHITE,"T14 Artifact Recipe",new ItemStack[]{ Artifact.createRecipe(14, ArtifactItemType.SHOVEL), Artifact.createRecipe(13, ArtifactItemType.SHOVEL),Artifact.createRecipe(13, ArtifactItemType.SHOVEL),null, Artifact.createArtifactItem(ArtifactItem.DIVINE_ESSENCE), Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE), Artifact.createArtifactItem(ArtifactItem.DIVINE_BASE) }), - tierup(ChatColor.YELLOW,"Increase Artifact Material Tier",new ItemStack[]{ + tierup("Artifact Recipes",ChatColor.YELLOW,"Increase Artifact Material Tier",new ItemStack[]{ Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE), Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE), Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE) }), - tierdown(ChatColor.YELLOW,"Decrease Artifact Material Tier",new ItemStack[]{ + tierdown("Artifact Recipes",ChatColor.YELLOW,"Decrease Artifact Material Tier",new ItemStack[]{ Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE,2), Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE) }), - empower(ChatColor.YELLOW,"Empower Artifact Materials to Divine Tier",new ItemStack[]{ + empower("Artifact Recipes",ChatColor.YELLOW,"Empower Artifact Materials to Divine Tier",new ItemStack[]{ Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE), Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE),new ItemStack(Material.NETHER_STAR), }), - arrow2(ChatColor.GREEN,"Hand-made Arrow",new ItemStack[]{ + arrow2("Custom Arrows",ChatColor.GREEN,"Hand-made Arrow",new ItemStack[]{ Recipes.getArrowFromMeta("DOUBLE_DAMAGE_ARR"), new ItemStack(Material.FLINT),new ItemStack(Material.STICK),null, new ItemStack(Material.FEATHER), }), - arrow4(ChatColor.GREEN,"Diamond-Tipped Arrow",new ItemStack[]{ + arrow4("Custom Arrows",ChatColor.GREEN,"Diamond-Tipped Arrow",new ItemStack[]{ Recipes.getArrowFromMeta("QUADRUPLE_DAMAGE_ARR"), Recipes.getArrowFromMeta("DOUBLE_DAMAGE_ARR"),new ItemStack(Material.DIAMOND) }), - traparrow(ChatColor.GREEN,"Trapping Arrow",new ItemStack[]{ + traparrow("Custom Arrows",ChatColor.GREEN,"Trapping Arrow",new ItemStack[]{ Recipes.getArrowFromMeta("TRAP_ARR"), new ItemStack(Material.WEB),new ItemStack(Material.STICK),null, new ItemStack(Material.FEATHER), }), - explodearrow(ChatColor.GREEN,"Exploding Arrow",new ItemStack[]{ + explodearrow("Custom Arrows",ChatColor.GREEN,"Exploding Arrow",new ItemStack[]{ Recipes.getArrowFromMeta("EXPLODE_ARR"), new ItemStack(Material.SULPHUR),new ItemStack(Material.STICK),null, new ItemStack(Material.FEATHER), }), - poisonarrow(ChatColor.GREEN,"Poison Arrow",new ItemStack[]{ + poisonarrow("Custom Arrows",ChatColor.GREEN,"Poison Arrow",new ItemStack[]{ Recipes.getArrowFromMeta("POISON_ARR"), new ItemStack(Material.RAW_FISH,1,(short)3),new ItemStack(Material.STICK),null, new ItemStack(Material.FEATHER), @@ -355,11 +355,17 @@ public enum RecipeLinker { String name = ""; ItemStack[] rec = null; ChatColor col = null; + String category = ""; - RecipeLinker(ChatColor col, String name, ItemStack[] recipe) { + RecipeLinker(String cat, ChatColor col, String name, ItemStack[] recipe) { this.col=col; this.name=name; this.rec=recipe; + this.category=cat; + } + + public String getCategory() { + return category; } public String getName() { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/CustomRecipe.java b/src/sig/plugin/TwosideKeeper/HelperStructures/CustomRecipe.java index 512d2f3..c29f9e9 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/CustomRecipe.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/CustomRecipe.java @@ -153,7 +153,7 @@ public enum CustomRecipe { pm.setDisplayName(ChatColor.GREEN+"Life Vial"); pm.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS); LIFE_VIAL.setItemMeta(pm); - return new CustomPotion(LIFE_VIAL,effects,50,100); + return new CustomPotion(LIFE_VIAL,effects,10,20); } public static CustomPotion DefineStrengtheningVial() { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java index 6c89a3c..20d5af9 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java @@ -18,12 +18,14 @@ public enum ItemSet { SONGSTEEL(4,2, 6,2, 8,8, 20,10), DAWNTRACKER(4,4, 20,10, 20,10, 6,4), LORASYS(2,2, 0,0, 0,0, 0,0), - JAMDAK(1,1, 5,1, 10,1, 10,2), //Graceful Dodge is in ticks. - DARNYS(1,1, 10,5, 20,5, 1,1), - ALIKAHN(1,1, 15,6, 30,10, 12,6), - LORASAADI(1,1, 1,1, 3,2, 2,1), + JAMDAK(3,3, 5,1, 10,1, 10,2), //Graceful Dodge is in ticks. + DARNYS(2,1, 10,5, 20,5, 1,1), + ALIKAHN(3,1, 15,6, 30,10, 12,6), + LORASAADI(4,1, 4,2, 8,6, 8,3), MOONSHADOW(4,2, 1,1, 8,8, 15,7), - GLADOMAIN(1,1, 12,10, 8,8, 1,1); + GLADOMAIN(1,1, 12,10, 8,8, 1,1), + WOLFSBANE(2,1, 15,10, 10,5, 15,10), + ALUSTINE(10,10, 10,-1, 5,-1, 6,4); int baseval; int increase_val; @@ -273,6 +275,16 @@ public enum ItemSet { lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Moonshadow Set"); lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Crit Damage"); }break; + case WOLFSBANE:{ + lore.add(ChatColor.LIGHT_PURPLE+"Slayer Ornament"); + lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Wolfsbane Set"); + lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Critical Chance"); + }break; + case ALUSTINE:{ + lore.add(ChatColor.LIGHT_PURPLE+"Slayer Charm"); + lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Alustine Set"); + lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% EXP Gain"); + }break; } lore.add(""); @@ -319,8 +331,8 @@ public enum ItemSet { lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Dodge Chance"); lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Dodge Chance"); lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+(ItemSet.GetBaseAmount(set, tier, 4)/20d)+"s Graceful Dodge"); - lore.add(ChatColor.GRAY+" Gives you invulnerability after a"); - lore.add(ChatColor.GRAY+" successful dodge."); + lore.add(ChatColor.GRAY+" Gives you invulnerability and "+(ItemSet.GetBaseAmount(set, tier, 4)/4)+" absorption"); + lore.add(ChatColor.GRAY+" health for each successful dodge."); lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Boosts All Modes of Ranger"); lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Close Range Mode:"); lore.add(ChatColor.GRAY+" Increases Tumble Invincibility from"); @@ -408,6 +420,30 @@ public enum ItemSet { lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"While in Stealth Mode you gain 40%"); lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Dodge Chance"); }break; + case WOLFSBANE:{ + lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:"); + lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Recovers "+ItemSet.GetBaseAmount(set, tier, 2)+"% Cooldown on Assassination per kill"); + lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Applies Speed V when Assassination is casted. Suppresses"); + lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" the target for "+(ItemSet.GetBaseAmount(set, tier, 3)/20d)+"s"); + lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Gain "+(ItemSet.GetBaseAmount(set, tier, 4)/20d)+" seconds of invulnerability after"); + lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Assassination is casted."); + lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:"); + lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Backstabs heal 2 HP (1 Heart). Assassination cooldown reduced"); + lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"to 2 seconds when used on a target closer than 5 meters."); + }break; + case ALUSTINE:{ + lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:"); + lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Gain immunity to Explosions."); + lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Consumes "+ItemSet.GetBaseAmount(set, tier, 2)+" XP per absorbed hit."); + lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Resists all fire, poison, and wither damage."); + lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Consumes "+ItemSet.GetBaseAmount(set, tier, 3)+" XP per absorbed hit."); + lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Backstabs spill "+ItemSet.GetBaseAmount(set, tier, 4)+" XP out from the target hit."); + lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Has a "+Math.min((ItemSet.GetBaseAmount(set, tier, 4)/20d)*100d,100)+"% chance to restore 2 HP (1 Heart) on XP gain."); + lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:"); + lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Deal additional base damage equal to the"); + lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"number of levels you have. Drains XP equal"); + lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"to the number of levels you have per hit."); + }break; } return lore; } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java index 0f4702f..e0d296f 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java @@ -598,7 +598,7 @@ public class Loot { allowed = false; break; } - item.setDurability((short)2); + item.setDurability((short)5); ItemMeta m = item.getItemMeta(); m.addItemFlags(ItemFlag.HIDE_ENCHANTS); item.setItemMeta(m); @@ -610,12 +610,36 @@ public class Loot { break; } //item.setType(Material.SKULL_ITEM); - item.setDurability((short)0); + item.setDurability((short)4); ItemMeta m = item.getItemMeta(); m.addItemFlags(ItemFlag.HIDE_ENCHANTS); item.setItemMeta(m); set_name = prefix+"Moonshadow Slayer Trinket"; }break; + case WOLFSBANE:{ + if (!item.getType().toString().contains("SKULL_ITEM")) { + allowed = false; + break; + } + //item.setType(Material.SKULL_ITEM); + item.setDurability((short)0); + ItemMeta m = item.getItemMeta(); + m.addItemFlags(ItemFlag.HIDE_ENCHANTS); + item.setItemMeta(m); + set_name = prefix+"Wolfsbane Slayer Ornament"; + }break; + case ALUSTINE:{ + if (!item.getType().toString().contains("SKULL_ITEM")) { + allowed = false; + break; + } + //item.setType(Material.SKULL_ITEM); + item.setDurability((short)2); + ItemMeta m = item.getItemMeta(); + m.addItemFlags(ItemFlag.HIDE_ENCHANTS); + item.setItemMeta(m); + set_name = prefix+"Alustine Slayer Charm"; + }break; } if (item.getItemMeta().hasLore()) { lore = item.getItemMeta().getLore(); diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/LootStructure.java b/src/sig/plugin/TwosideKeeper/HelperStructures/LootStructure.java index 6894f7f..fc08751 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/LootStructure.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/LootStructure.java @@ -36,7 +36,6 @@ public class LootStructure { } public LootStructure(Material mat, boolean ishardened, int minSetLevel) { - // TODO Auto-generated constructor stub this.mat=mat; this.hardened_item=ishardened; this.amt=1; diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/MonsterType.java b/src/sig/plugin/TwosideKeeper/HelperStructures/MonsterType.java index c331531..89c8cb0 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/MonsterType.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/MonsterType.java @@ -1,18 +1,33 @@ package sig.plugin.TwosideKeeper.HelperStructures; +import org.bukkit.entity.EntityType; + public enum MonsterType { - BLAZE, - CAVESPIDER, - CREEPER, - ENDERMAN, - ENDERMITE, - GIANT, - GUARDIAN, - PIGZOMBIE, - SILVERFISH, - SKELETON, - SPIDER, - WITCH, - WITHER, - ZOMBIE, + BLAZE(EntityType.BLAZE), + CAVESPIDER(EntityType.CAVE_SPIDER), + CREEPER(EntityType.CREEPER), + ENDERMAN(EntityType.ENDERMAN), + ENDERMITE(EntityType.ENDERMITE), + GIANT(EntityType.GIANT), + GUARDIAN(EntityType.GUARDIAN), + PIGZOMBIE(EntityType.PIG_ZOMBIE), + SILVERFISH(EntityType.SILVERFISH), + SKELETON(EntityType.SKELETON), + SPIDER(EntityType.SPIDER), + WITCH(EntityType.WITCH), + WITHER(EntityType.WITHER), + WITHER_SKELETON(EntityType.SKELETON), + ZOMBIE(EntityType.ZOMBIE); + + EntityType type; + + MonsterType(EntityType type) { + this.type=type; + } + + public EntityType getEntityType() { + return type; + } + + } diff --git a/src/sig/plugin/TwosideKeeper/LivingEntityStructure.java b/src/sig/plugin/TwosideKeeper/LivingEntityStructure.java index 8fa6c47..e1facac 100644 --- a/src/sig/plugin/TwosideKeeper/LivingEntityStructure.java +++ b/src/sig/plugin/TwosideKeeper/LivingEntityStructure.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.UUID; import org.bukkit.Bukkit; +import org.bukkit.attribute.Attribute; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.Player; @@ -17,6 +18,7 @@ public class LivingEntityStructure { public LivingEntity m; public boolean isLeader=false; public boolean isElite=false; + public double original_movespd = 0.0d; public HashMap hitlist = new HashMap(); public HashMap glowcolorlist = new HashMap(); @@ -24,11 +26,13 @@ public class LivingEntityStructure { target=null; original_name=""; this.m=m; + this.original_movespd = m.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue(); } public LivingEntityStructure(LivingEntity m, LivingEntity target) { this.target=target; original_name=""; this.m=m; + this.original_movespd = m.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue(); } public LivingEntity GetTarget() { @@ -87,9 +91,6 @@ public class LivingEntityStructure { if (GenericFunctions.isSuppressed(m)) { setGlow(p,GlowAPI.Color.BLACK); } else - if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) { - setGlow(p,GlowAPI.Color.DARK_RED); - } else if (getElite()) { boolean handled=false; for (EliteMonster em : TwosideKeeper.elitemonsters) { @@ -102,6 +103,9 @@ public class LivingEntityStructure { setGlow(p,GlowAPI.Color.DARK_PURPLE); } } else + if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) { + setGlow(p,GlowAPI.Color.DARK_RED); + } else if (GenericFunctions.isIsolatedTarget(m, p)) { setGlow(p,GlowAPI.Color.WHITE); } else { diff --git a/src/sig/plugin/TwosideKeeper/MonsterController.java b/src/sig/plugin/TwosideKeeper/MonsterController.java index d86de64..c0125f3 100644 --- a/src/sig/plugin/TwosideKeeper/MonsterController.java +++ b/src/sig/plugin/TwosideKeeper/MonsterController.java @@ -919,54 +919,11 @@ public class MonsterController { } public static Monster spawnAdjustedMonster(MonsterType mt,Location loc) { - EntityType et; - switch(mt) { - case BLAZE: - et=EntityType.BLAZE; - break; - case CAVESPIDER: - et=EntityType.CAVE_SPIDER; - break; - case CREEPER: - et=EntityType.CREEPER; - break; - case ENDERMAN: - et=EntityType.ENDERMAN; - break; - case ENDERMITE: - et=EntityType.ENDERMITE; - break; - case GIANT: - et=EntityType.GIANT; - break; - case GUARDIAN: - et=EntityType.GUARDIAN; - break; - case PIGZOMBIE: - et=EntityType.PIG_ZOMBIE; - break; - case SILVERFISH: - et=EntityType.SILVERFISH; - break; - case SKELETON: - et=EntityType.SKELETON; - break; - case SPIDER: - et=EntityType.SPIDER; - break; - case WITCH: - et=EntityType.WITCH; - break; - case WITHER: - et=EntityType.WITHER; - break; - case ZOMBIE: - et=EntityType.ZOMBIE; - break; - default: - et=EntityType.ZOMBIE; + Monster m = (Monster)loc.getWorld().spawnEntity(loc, mt.getEntityType()); + if (mt.equals(MonsterType.WITHER_SKELETON)) { + Skeleton sk = (Skeleton)m; + sk.setSkeletonType(SkeletonType.WITHER); } - Monster m = (Monster)loc.getWorld().spawnEntity(loc, et); return MonsterController.convertMonster(m); } @@ -982,7 +939,8 @@ public class MonsterController { if (m.getType()==EntityType.ZOMBIE || m.getType()==EntityType.PIG_ZOMBIE || m.getType()==EntityType.GIANT || - m.getType()==EntityType.SKELETON + m.getType()==EntityType.SKELETON || + m.getType()==EntityType.WITHER ) { return true; } diff --git a/src/sig/plugin/TwosideKeeper/PlayerStructure.java b/src/sig/plugin/TwosideKeeper/PlayerStructure.java index 392acbf..299ca04 100644 --- a/src/sig/plugin/TwosideKeeper/PlayerStructure.java +++ b/src/sig/plugin/TwosideKeeper/PlayerStructure.java @@ -110,6 +110,8 @@ public class PlayerStructure { public long lastlifesavertime=0; public boolean slayermegahit=false; public double thorns_amt = 0.0; + public long lastimportantactionbarmsg=0; + public long lasthighwinderhit=0; public long iframetime = 0; diff --git a/src/sig/plugin/TwosideKeeper/Recipes.java b/src/sig/plugin/TwosideKeeper/Recipes.java index 9314e37..b85e7eb 100644 --- a/src/sig/plugin/TwosideKeeper/Recipes.java +++ b/src/sig/plugin/TwosideKeeper/Recipes.java @@ -265,7 +265,7 @@ public class Recipes { //pm.setBasePotionData(data); pm.addCustomEffect(new PotionEffect(PotionEffectType.INVISIBILITY,0,0),true); List lore = new ArrayList(); - lore.add(ChatColor.GRAY+"Explodes on Contact (+40 dmg)"); + lore.add(ChatColor.GRAY+"Explodes on Contact (+80 dmg)"); pm.setLore(lore); pm.setDisplayName(ChatColor.GRAY+"Exploding Arrow"); explosionarrow.setItemMeta(pm); diff --git a/src/sig/plugin/TwosideKeeper/RecyclingCenter.java b/src/sig/plugin/TwosideKeeper/RecyclingCenter.java index d964e55..5f7d35b 100644 --- a/src/sig/plugin/TwosideKeeper/RecyclingCenter.java +++ b/src/sig/plugin/TwosideKeeper/RecyclingCenter.java @@ -102,7 +102,6 @@ public class RecyclingCenter { try { workable.save(config); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } diff --git a/src/sig/plugin/TwosideKeeper/SpleefGame.java b/src/sig/plugin/TwosideKeeper/SpleefGame.java index 6d4b82b..b8fa46a 100644 --- a/src/sig/plugin/TwosideKeeper/SpleefGame.java +++ b/src/sig/plugin/TwosideKeeper/SpleefGame.java @@ -328,7 +328,7 @@ public class SpleefGame implements Listener { (corner1.getBlockZ()>corner2.getBlockZ())?(corner1.getBlockZ()-2-(Math.random()*(corner1.getBlockZ()-corner2.getBlockZ()-4))):(corner2.getBlockZ()-2-(Math.random()*(corner2.getBlockZ()-corner1.getBlockZ()-4))) ), TeleportCause.PLUGIN); //Give players Resistance 100 so they can never die. - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,99999,100,Bukkit.getServer().getPlayer(players.get(i).player)); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.DAMAGE_RESISTANCE,99999,100,Bukkit.getServer().getPlayer(players.get(i).player)); } active=true; starttime=TwosideKeeper.getServerTickTime(); @@ -385,7 +385,7 @@ public class SpleefGame implements Listener { void RemovePlayer(SpleefPlayerData p, RemovePlayerReason rs) { p.ClearInventory(); p.RestoreInventory(); - GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.DAMAGE_RESISTANCE,Bukkit.getServer().getPlayer(p.player)); + GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.DAMAGE_RESISTANCE,Bukkit.getServer().getPlayer(p.player)); for (int i=0;i0) { if (p.hasPotionEffect(PotionEffectType.ABSORPTION)) { int oldlv = GenericFunctions.getPotionEffectLevel(PotionEffectType.ABSORPTION, p); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.ABSORPTION,599,(int)(absorption_amt/4)+oldlv,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.ABSORPTION,599,(int)(absorption_amt/4)+oldlv,p); } else { - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.ABSORPTION,599,(int)(absorption_amt/4),p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.ABSORPTION,599,(int)(absorption_amt/4),p); } } + if (p.hasPotionEffect(PotionEffectType.ABSORPTION)) { + CustomDamage.setAbsorptionHearts(p, Math.max(CustomDamage.getAbsorptionHearts(p),4*(GenericFunctions.getPotionEffectLevel(PotionEffectType.ABSORPTION, p)+1))); + } } } } @@ -343,7 +343,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener { } } } - cz.BreakBlocksAroundArea(1); + ChargeZombie.BreakBlocksAroundArea(cz.m,1); } } for (HellfireSpider hs : hellfirespiders.values()) { @@ -373,6 +373,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener { for (Entity e : suppressed_entities) { if (e==null || !e.isValid() || GenericFunctions.getSuppressionTime(e)<=0) { + if (e!=null && e.isValid() && e instanceof LivingEntity) { + LivingEntityStructure les = LivingEntityStructure.getLivingEntityStructure((LivingEntity)e); + ((LivingEntity)e).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(les.original_movespd); + ((LivingEntity)e).setAI(true); + } ScheduleRemoval(suppressed_entities,e); } } @@ -613,7 +618,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener { @Override public void onEnable() { - // TODO Insert logic to be performed when the plugin is enabled Bukkit.getPluginManager().registerEvents(this, this); plugin=this; @@ -760,7 +764,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener { @Override public void onDisable() { - // TODO Insert logic to be performed when the plugin is disabled //Clear out remaining parties. for (int i=0;i entities = player.getNearbyEntities(16, 16, 16); for (int i=0;igetServerTickTime()) { - pd.lastassassinatetime=getServerTickTime()-GenericFunctions.GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,p); - ItemStack[] inv = p.getInventory().getContents(); - for (int i=0;i<9;i++) { - if (inv[i]!=null && (inv[i].getType()!=Material.SKULL_ITEM || pd.lastlifesavertime+GenericFunctions.GetModifiedCooldown(TwosideKeeper.LIFESAVER_COOLDOWN,p)getServerTickTime()) { //Successful Assassination. + pd.lastassassinatetime=getServerTickTime()-GenericFunctions.GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,p); + ItemStack[] inv = p.getInventory().getContents(); + for (int i=0;i<9;i++) { + if (inv[i]!=null && (inv[i].getType()!=Material.SKULL_ITEM || pd.lastlifesavertime+GenericFunctions.GetModifiedCooldown(TwosideKeeper.LIFESAVER_COOLDOWN,p) mobs = GenericFunctions.getNearbyMobs(m.getLocation(), 8); - List mobs = CustomDamage.trimNonMonsterEntities(m.getNearbyEntities(8, 8, 8)); - for (Monster m1 : mobs) { - if (!m1.equals(m)) { - pd.lastassassinatetime=0; - CustomDamage.ApplyDamage(0,p,m1,p.getEquipment().getItemInMainHand(),"AoE Damage",CustomDamage.NOAOE); - if (m1.isDead()) { - GenericFunctions.addStackingPotionEffect(p, PotionEffectType.INCREASE_DAMAGE, 10*20, 39, 2); - GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SPEED, 10*20, 4); + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SPEED, 10*20, 4); + if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getHotbarItems(p), p, ItemSet.MOONSHADOW, 7)) { + //Apply damage to everything around the player. + //List mobs = GenericFunctions.getNearbyMobs(m.getLocation(), 8); + List mobs = CustomDamage.trimNonMonsterEntities(m.getNearbyEntities(8, 8, 8)); + for (Monster m1 : mobs) { + if (!m1.equals(m)) { + pd.lastassassinatetime=0; + CustomDamage.ApplyDamage(0,p,m1,p.getEquipment().getItemInMainHand(),"AoE Damage",CustomDamage.NOAOE); + if (m1.isDead()) { + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.INCREASE_DAMAGE, 10*20, 39, 2); + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SPEED, 10*20, 4); + } + } + } + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.INCREASE_DAMAGE, 10*20, 39, 2); + } else { + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.INCREASE_DAMAGE, 10*20, 9); + } + if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getHotbarItems(p), p, ItemSet.GLADOMAIN, 7)) { + pd.slayermegahit=true; + } + GenericFunctions.applyStealth(p, false); + } else { //Failed Assassination. + if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getHotbarItems(p), p, ItemSet.WOLFSBANE, 2)) { + pd.lastassassinatetime-=GenericFunctions.GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,p)*(ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getHotbarItems(p), p, ItemSet.WOLFSBANE, 2, 2)/100d); + ItemStack[] inv = p.getInventory().getContents(); + for (int i=0;i<9;i++) { + if (inv[i]!=null && (inv[i].getType()!=Material.SKULL_ITEM || pd.lastlifesavertime+GenericFunctions.GetModifiedCooldown(TwosideKeeper.LIFESAVER_COOLDOWN,p)256) { pd.target=null; @@ -178,7 +178,7 @@ final class runServerHeartbeat implements Runnable { int duration = GenericFunctions.getPotionEffectDuration(PotionEffectType.FIRE_RESISTANCE, p); int lv = GenericFunctions.getPotionEffectLevel(PotionEffectType.FIRE_RESISTANCE, p); if (lv>10) {lv=10;} - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.FIRE_RESISTANCE, duration-(20*(10-lv)), lv, p, true); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.FIRE_RESISTANCE, duration-(20*(10-lv)), lv, p, true); } if (GenericFunctions.hasStealth(p)) {GenericFunctions.DamageRandomTool(p);} @@ -249,12 +249,12 @@ final class runServerHeartbeat implements Runnable { for (ItemStack equip : equips) { if (ArtifactAbility.containsEnchantment(ArtifactAbility.SHADOWWALKER, equip) && p.isOnGround() && p.getLocation().getY()>=0 && p.getLocation().getY()<=255 && p.getLocation().add(0,0,0).getBlock().getLightLevel()<=4) { - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.SPEED,20,1,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.SPEED,20,1,p); } } if (ArtifactAbility.containsEnchantment(ArtifactAbility.SHADOWWALKER, p.getEquipment().getItemInMainHand()) && p.isOnGround() && p.getLocation().getY()>=0 && p.getLocation().getY()<=255 && p.getLocation().add(0,0,0).getBlock().getLightLevel()<=4) { - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.SPEED,20,1,p); + GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.SPEED,20,1,p); //log("Apply speed. The light level here is "+p.getLocation().add(0,-1,0).getBlock().getLightLevel(),2); }