diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index d4fda8a..6cab269 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index 1b995ea..776e6e6 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.10.13 +version: 3.10.14 loadbefore: [aPlugin] commands: money: @@ -148,11 +148,6 @@ commands: usage: /debugreport permission: TwosideKeeper.fulldebugreport permission-message: No permissions! - vac: - description: Toggle Vacuum Cube suction - usage: /vac - permission: TwosideKeeper.money - permission-message: No permissions! equip_weapon: description: Toggle Automatic Equipping of Weapons usage: /equip_weapon @@ -162,4 +157,19 @@ commands: description: Toggle Automatic Equipping of Armor usage: /equip_armor permission: TwosideKeeper.money + permission-message: No permissions! + options: + description: Displays a menu to toggle plugin-specific options. + usage: /options + permission: TwosideKeeper.money + permission-message: No permissions! + settings: + description: Displays a menu to toggle plugin-specific options. + usage: /settings + permission: TwosideKeeper.money + permission-message: No permissions! + damage_numbers: + description: Toggles the damage numbers that display while dealing damage. + usage: /damage_numbers + permission: TwosideKeeper.money permission-message: No permissions! \ No newline at end of file diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index 082a079..6ae944a 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -314,7 +314,7 @@ public class CustomDamage { } TwosideKeeper.log("Damage: "+dmg+", Armor Pen Damage: "+armorpendmg, 3); - setupDamagePropertiesForPlayer(damager,((crit)?IS_CRIT:0)|((headshot)?IS_HEADSHOT:0)|((preemptive)?IS_PREEMPTIVE:0)); + setupDamagePropertiesForPlayer(damager,((crit)?IS_CRIT:0)|((headshot)?IS_HEADSHOT:0)|((preemptive)?IS_PREEMPTIVE:0),true); dmg = hardCapDamage(dmg+armorpendmg,target,reason); return dmg; } @@ -398,10 +398,10 @@ public class CustomDamage { } private static double getDamageFromBarbarianSetBonus(LivingEntity target) { - if (target instanceof Player) { + /*if (target instanceof Player) { Player p = (Player)target; return (ItemSet.GetTotalBaseAmount(p, ItemSet.DAWNTRACKER)+1)/3; - } + }*/ return 0.0; } @@ -755,11 +755,12 @@ public class CustomDamage { applyLightningStriketoFoe(p,target); pd.slayermegahit=false; pd.lastcombat=TwosideKeeper.getServerTickTime(); - increaseBarbarianStacks(p,weapon); + increaseBarbarianStacks(p,weapon,reason); damage = applyBarbarianBonuses(p,target,weapon,damage,reason); increaseWindCharges(p); applyWindSlashEffects(p,target,damage,reason); createFirePool(p,damager,target,damage,reason); + addSweepupBonus(p,damage,reason); if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) { if (isFlagSet(pd.lasthitproperties,IS_CRIT)) { @@ -833,6 +834,15 @@ public class CustomDamage { return damage; } + private static void addSweepupBonus(Player p, double damage, String reason) { + if (reason!=null && reason.equalsIgnoreCase("sweep up")) { + if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.PRIDE, 5)) { + TwosideKeeper.log("In here. Damage: "+damage, 0); + GenericFunctions.HealEntity(p, damage/2); + } + } + } + private static void applySustenanceSetonHitEffects(Player p) { if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.SUSTENANCE, 2)) { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); @@ -1252,7 +1262,12 @@ public class CustomDamage { if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN) { if (reason!=null) { if (reason.equalsIgnoreCase("power swing")) { - IncreaseLifestealStacks(p,10); + double lifestealstack_incramt = 10; + if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.PRIDE, 3)) { + lifestealstack_incramt *= 2; + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.REGENERATION, 20*15, 9, (int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.PRIDE, 3, 3)); + } + IncreaseLifestealStacks(p,(int)lifestealstack_incramt); pd.weaponcharges-=10; //GenericFunctions.sendActionBarMessage(p, ""); pd.customtitle.updateSideTitleStats(p); @@ -1267,11 +1282,25 @@ public class CustomDamage { double xspd=p.getLocation().getDirection().getX(); double zspd=p.getLocation().getDirection().getZ(); Location attackloc = p.getLocation().clone(); + boolean appliesPoisonDebuff=false; + if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.PRIDE, 4)) { + appliesPoisonDebuff=true; + } for (int i=0;i<10;i++) { attackloc = attackloc.add(xspd,0,zspd); SoundUtils.playGlobalSound(p.getLocation(), Sound.ENTITY_ENDERDRAGON_FIREBALL_EXPLODE, 0.1f, 1.4f); aPlugin.API.sendSoundlessExplosion(attackloc, 0.6f); - GenericFunctions.DealDamageToNearbyMobs(attackloc, dmg, 1, true, 0.6, p, weapon, false, "Forceful Strike"); + List ents = GenericFunctions.DealDamageToNearbyMobs(attackloc, dmg, 1, true, 0.6, p, weapon, false, "Forceful Strike"); + if (appliesPoisonDebuff) { + int poisonlv = (int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.PRIDE, 4, 4); + for (Entity e : ents) { + if (e instanceof LivingEntity && !(e instanceof Player)) { + //GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.POISON, 20*15, poisonlv-1, (LivingEntity)e); + Buff.addBuff((LivingEntity)e, "Poison", new Buff("Poison",20*15,poisonlv,Color.YELLOW,ChatColor.YELLOW+"☣",false)); + } + } + } + } pd.weaponcharges-=30; pd.customtitle.updateSideTitleStats(p); @@ -1303,6 +1332,12 @@ public class CustomDamage { if (ItemSet.hasFullSet(p, ItemSet.DAWNTRACKER)) { amt*=2; } + double pct = ItemSet.GetTotalBaseAmount(p, ItemSet.PRIDE)/100d; + amt+=(int)(amt*pct); + //TwosideKeeper.log("pct is "+pct+". Trying RNG for roll "+(pct%1.0), 0); + if (Math.random()<=pct%1.0) { + amt+=1; + } pd.lifestealstacks=Math.min(100,pd.lifestealstacks+amt*((pd.rage_time>TwosideKeeper.getServerTickTime())?2:1)); } @@ -1314,7 +1349,9 @@ public class CustomDamage { pd.damagepooltime=TwosideKeeper.getServerTickTime(); } if (damage>getTransferDamage(p)) { - pd.damagepool+=(damage-getTransferDamage(p))*getDamagePoolMult(p); + if ((damage-getTransferDamage(p))*getDamagePoolMult(p)>0) { + pd.damagepool+=(damage-getTransferDamage(p))*getDamagePoolMult(p); + } return getTransferDamage(p); } else { //pd.damagepool=0; @@ -1331,8 +1368,9 @@ public class CustomDamage { return mult; } - private static void increaseBarbarianStacks(Player p, ItemStack weapon) { - if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN) { + private static void increaseBarbarianStacks(Player p, ItemStack weapon, String reason) { + if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN && + (reason==null || !reason.equalsIgnoreCase("forceful strike"))) { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); if (pd.rage_time>TwosideKeeper.getServerTickTime()) { IncreaseLifestealStacks(p,2); @@ -1341,7 +1379,9 @@ public class CustomDamage { } pd.lastattacked=TwosideKeeper.getServerTickTime(); if (p.getEquipment().getItemInMainHand().equals(weapon)) { - IncreaseWeaponCharges(p,1); + double charge_amt = 1; + charge_amt += ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.PRIDE, 2, 2)/2; + IncreaseWeaponCharges(p,(int)charge_amt); } } } @@ -2720,11 +2760,11 @@ public class CustomDamage { dmg += ItemSet.TotalBaseAmountBasedOnSetBonusCount((Player)shooter, ItemSet.OLIVE, 3, 3); if (ItemSet.HasSetBonusBasedOnSetBonusCount((Player)shooter, ItemSet.PANROS, 5) || ItemSet.HasSetBonusBasedOnSetBonusCount((Player)shooter, ItemSet.DAWNTRACKER, 5) || - (ItemSet.meetsLorasysSwordConditions(9, 1, (Player)shooter)) || + (ItemSet.meetsSlayerSwordConditions(ItemSet.LORASYS, 9, 1, (Player)shooter)) || GenericFunctions.HasFullRangerSet((Player)shooter)) { dmg += 15; } - if (ItemSet.meetsLorasysSwordConditions(40, 4, (Player)shooter)) { + if (ItemSet.meetsSlayerSwordConditions(ItemSet.LORASYS, 40, 4, (Player)shooter)) { dmg += 55; } dmg += ItemSet.GetTotalBaseAmount((Player)shooter, ItemSet.WINDRY); @@ -3166,7 +3206,7 @@ public class CustomDamage { if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 5)) { finaldmg += dmg*0.5; } else - if (ItemSet.meetsLorasysSwordConditions(9, 1, p)) { + if (ItemSet.meetsSlayerSwordConditions(ItemSet.LORASYS, 9, 1, p)) { finaldmg += dmg*0.5; } finaldmg += dmg*aPlugin.API.getPlayerBonuses(p).getBonusArmorPenetration(); @@ -3379,7 +3419,7 @@ public class CustomDamage { if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER,6) || ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.LEGION,6) || ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.PRIDE,6)) { - lifestealpct+=0.25d*ItemSet.GetItemTier(p.getEquipment().getItemInMainHand()); + lifestealpct+=0.1d*ItemSet.GetItemTier(p.getEquipment().getItemInMainHand()); } lifestealpct+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.LEGION, 2, 2)/100d; if (reason!=null && reason.equalsIgnoreCase("sweep up")) { @@ -3404,10 +3444,18 @@ public class CustomDamage { } private static void setupDamagePropertiesForPlayer(Entity damager, int i) { + setupDamagePropertiesForPlayer(damager,i,false); + } + + private static void setupDamagePropertiesForPlayer(Entity damager, int i, boolean overwrite) { if (getDamagerEntity(damager) instanceof Player) { Player pl = (Player)getDamagerEntity(damager); PlayerStructure pd = PlayerStructure.GetPlayerStructure(pl); - pd.lasthitproperties = i; + if (overwrite) { + pd.lasthitproperties = i; + } else { + pd.lasthitproperties |= i; + } TwosideKeeper.log("Flag properties set to "+pd.lasthitproperties,5); } } @@ -3522,9 +3570,10 @@ public class CustomDamage { double cooldown = 0.0; cooldown=addMultiplicativeValue(cooldown,ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.GLADOMAIN, 2, 2)/100d); cooldown=addMultiplicativeValue(cooldown,ItemSet.GetTotalBaseAmount(p, ItemSet.VIXEN)/100d); - if (ItemSet.meetsLorasysSwordConditions(40, 4, p)) { + if (ItemSet.meetsSlayerSwordConditions(ItemSet.LORASYS, 40, 4, p)) { cooldown = addMultiplicativeValue(cooldown,0.45d); } + cooldown=addMultiplicativeValue(cooldown,ItemSet.GetTotalBaseAmount(p, ItemSet.ASSASSIN)/100d); return cooldown; } @@ -3630,7 +3679,8 @@ public class CustomDamage { } public static int GetDamageReductionFromDawntrackerPieces(Player p) { - return (ItemSet.GetTotalBaseAmount(p, ItemSet.DAWNTRACKER))/3; + //return (ItemSet.GetTotalBaseAmount(p, ItemSet.DAWNTRACKER))/3; + return 0; } private static double increaseDamageDealtByFireTicks(Player p, double damage, String reason) { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/AdvancedTitle.java b/src/sig/plugin/TwosideKeeper/HelperStructures/AdvancedTitle.java index afa328d..4dbf1d7 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/AdvancedTitle.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/AdvancedTitle.java @@ -13,6 +13,7 @@ import org.bukkit.entity.Player; import sig.plugin.TwosideKeeper.PlayerStructure; import sig.plugin.TwosideKeeper.TwosideKeeper; import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions; +import sig.plugin.TwosideKeeper.HelperStructures.Utils.DebugUtils; import sig.plugin.TwosideKeeper.HelperStructures.Utils.PlayerUtils; public class AdvancedTitle { @@ -113,6 +114,7 @@ public class AdvancedTitle { } public void updateSideTitleStats(Player p) { + //DebugUtils.showStackTrace(); PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN) { modifyLargeLeftTitle(ChatColor.DARK_AQUA+"☤"+Integer.toString((int)pd.weaponcharges),100); diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index 0e48116..4afb15b 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -7,6 +7,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Set; @@ -16,6 +17,7 @@ import org.bukkit.Chunk; import org.bukkit.Effect; 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; @@ -3990,13 +3992,15 @@ public class GenericFunctions { /** * Use this to customize dealing damage to nearby mobs. */ - public static void DealDamageToNearbyMobs(Location l, double basedmg, double range, boolean knockup, double knockupamt, Entity damager, ItemStack weapon, boolean isLineDrive, String reason) { + public static List DealDamageToNearbyMobs(Location l, double basedmg, double range, boolean knockup, double knockupamt, Entity damager, ItemStack weapon, boolean isLineDrive, String reason) { Collection ents = l.getWorld().getNearbyEntities(l, range, range, range); + List affectedents = new ArrayList(); //We cleared the non-living entities, deal damage to the rest. double origdmg = basedmg; for (Entity e : ents) { if (e instanceof LivingEntity && !(e instanceof Player) && !e.equals(damager)) { LivingEntity m = (LivingEntity)e; + affectedents.add(m); if (enoughTicksHavePassed(m,(Player)damager)) { basedmg=origdmg; boolean isForcefulStrike = (reason!=null && reason.equalsIgnoreCase("forceful strike")); @@ -4036,6 +4040,7 @@ public class GenericFunctions { } } } + return affectedents; } public static int GetRemainingCooldownTime(Player p, long current_cooldown, int cooldown_time) { @@ -4650,6 +4655,61 @@ public class GenericFunctions { aPlugin.API.sendCooldownPacket(player, name, 40); } } + } else { + if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 9, 1, player)) { + Set set = new HashSet(); + set.add(Material.AIR); + set.add(Material.LAVA); + set.add(Material.STATIONARY_LAVA); + set.add(Material.WATER); + set.add(Material.STATIONARY_WATER); + Block b = player.getTargetBlock(set, 100); + if (b!=null && b.getType()!=Material.AIR) { + SoundUtils.playGlobalSound(player.getLocation(), Sound.BLOCK_NOTE_BASS, 1.0f, 1.0f); + Vector dir = player.getLocation().getDirection(); + //player.teleport(); + Location blockcenter = b.getLocation().add(0.5,0.5,0.5); + //-Z : North + //+X : East + //+Z : South + //-X : West + double xincr=0; + double yincr=0; + double zincr=0; + Location teleportloc = null; + if (player.getLocation().getX()=1 && ItemSet.GetBaubleTier(p)>=27 && ItemSet.GetItemTier(p.getEquipment().getItemInMainHand())>=3) { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java index d1da8e9..82037da 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java @@ -24,7 +24,7 @@ import sig.plugin.TwosideKeeper.HelperStructures.Utils.TextUtils; public enum ItemSet { PANROS(1,1, 6,4, 10,10, 20,10), SONGSTEEL(4,2, 6,2, 8,8, 20,10), - DAWNTRACKER(3,1, 20,10, 10,5, 10,5), + DAWNTRACKER(2,2, 20,10, 10,5, 10,5), LORASYS(2,2, 0,0, 0,0, 0,0), JAMDAK(3,3, 5,1, 10,1, 10,2), //Graceful Dodge is in ticks. DARNYS(2,1, 10,5, 20,5, 1,1), @@ -368,7 +368,7 @@ public enum ItemSet { lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear"); lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Dawntracker Set"); if (((ItemSet.GetBaseAmount(set, tier, 1))/3)>0) { - lore.add(ChatColor.YELLOW+"-"+((ItemSet.GetBaseAmount(set, tier, 1)+1)/3)+" Damage taken per hit"); + lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Health"); } }break; case LORASYS:{ @@ -505,7 +505,7 @@ public enum ItemSet { case PRIDE: lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear"); lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Pride Set"); - lore.add(ChatColor.YELLOW+"-"+ItemSet.GetBaseAmount(set, tier, 1)+"% Lifesteal Stacks"); + lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Lifesteal Stacks"); break; case PROTECTOR: lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear"); @@ -579,9 +579,9 @@ public enum ItemSet { lore.add(ChatColor.GRAY+" All Lifesteal Stacks and Weapon Charges"); lore.add(ChatColor.GRAY+" gained are doubled."); lore.add(ChatColor.DARK_AQUA+" 6 - "+ChatColor.WHITE+""); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Lifesteal"); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Health Regeneration"); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Maximum Health"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Lifesteal"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Health Regeneration"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Maximum Health"); }break; case LORASYS:{ lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Increases in power based on "+ChatColor.BOLD+"Total Tier Amount"); @@ -856,9 +856,9 @@ public enum ItemSet { lore.add(ChatColor.GRAY+" "); lore.add(ChatColor.GRAY+" (120s Cooldown)"); lore.add(ChatColor.DARK_AQUA+" 6 - "+ChatColor.WHITE+""); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Lifesteal"); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Health Regeneration"); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Maximum Health"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Lifesteal"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Health Regeneration"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Maximum Health"); break; case LUCI: lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:"); @@ -878,7 +878,7 @@ public enum ItemSet { break; case PRIDE: lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:"); - lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Weapon Charges per hit"); + lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+(ItemSet.GetBaseAmount(set, tier, 2)/2)+" Weapon Charges when left-clicking."); lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Power Swing"+ABILITY_LABEL_END+" (Right-Click) provides double"); lore.add(" "+ChatColor.WHITE+" the lifesteal stacks and increases Regeneration"); lore.add(" "+ChatColor.WHITE+" level by "+ItemSet.GetBaseAmount(set, tier, 3)+" for 15 seconds. (Max. 10 Levels)"); @@ -887,9 +887,9 @@ public enum ItemSet { lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Sweep Up"+ABILITY_LABEL_END+" (Shift+Right-Click) heals"); lore.add(" "+ChatColor.WHITE+" half the health it deals as HP directly."); lore.add(ChatColor.DARK_AQUA+" 6 - "+ChatColor.WHITE+""); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Lifesteal"); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Health Regeneration"); - lore.add(ChatColor.WHITE+" +"+(tier*25)+"% Maximum Health"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Lifesteal"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Health Regeneration"); + lore.add(ChatColor.WHITE+" +"+(tier*10)+"% Maximum Health"); break; case PROTECTOR: lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+PlayerMode.SLAYER.getColor()+PlayerMode.SLAYER.getName()+"s"+ChatColor.GOLD+" do not benefit from party effects"); @@ -1091,9 +1091,9 @@ public enum ItemSet { return false; } - public static boolean meetsLorasysSwordConditions(int baubletier, int swordtier, Player p) { + public static boolean meetsSlayerSwordConditions(ItemSet set, int baubletier, int swordtier, Player p) { //TwosideKeeper.log("["+baubletier+"||"+swordtier+"] Is a Lorasys Set? "+ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.LORASYS, 1)+";;Bauble Tier: "+(ItemSet.GetBaubleTier(p))+"/"+baubletier+";;Meets Sword Requirement? "+((swordtier==1 || ItemSet.GetItemTier(p.getEquipment().getItemInMainHand())>=swordtier)), 0); - return ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.LORASYS, 1) && ItemSet.GetBaubleTier(p)>=baubletier && (swordtier==1 || ItemSet.GetItemTier(p.getEquipment().getItemInMainHand())>=swordtier); + return ItemSet.HasSetBonusBasedOnSetBonusCount(p, set, 1) && ItemSet.GetBaubleTier(p)>=baubletier && (swordtier==1 || ItemSet.GetItemTier(p.getEquipment().getItemInMainHand())>=swordtier); } public static int getHighestTierInSet(Player p, ItemSet set) { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/OptionsMenu.java b/src/sig/plugin/TwosideKeeper/HelperStructures/OptionsMenu.java new file mode 100644 index 0000000..b341087 --- /dev/null +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/OptionsMenu.java @@ -0,0 +1,221 @@ +package sig.plugin.TwosideKeeper.HelperStructures; + +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.ItemStack; +import org.bukkit.material.MaterialData; + +import sig.plugin.TwosideKeeper.PlayerStructure; +import sig.plugin.TwosideKeeper.TwosideKeeper; +import sig.plugin.TwosideKeeper.HelperStructures.Utils.ItemUtils; + +public class OptionsMenu { + Player p; + Inventory inv; + List