diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 1213acd..fa4fb17 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index fa4d416..f4a6ccb 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.6.0 +version: 3.6.1 commands: money: description: Tells the player the amount of money they are holding. diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index abdcdfd..539f413 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -2392,7 +2392,7 @@ public class GenericFunctions { item.setItemMeta(m); return item; } else { - String newname = name+" "+ChatColor.GREEN+"\\("+CapitalizeFirstLetters(getBowMode(item).name())+" Mode)"+ChatColor.WHITE; + String newname = name+" "+ChatColor.GREEN+"("+CapitalizeFirstLetters(getBowMode(item).name())+" Mode)"+ChatColor.WHITE; m.setDisplayName(newname); item.setItemMeta(m); return item; diff --git a/src/sig/plugin/TwosideKeeper/PlayerStructure.java b/src/sig/plugin/TwosideKeeper/PlayerStructure.java index 05edb30..82af08f 100644 --- a/src/sig/plugin/TwosideKeeper/PlayerStructure.java +++ b/src/sig/plugin/TwosideKeeper/PlayerStructure.java @@ -62,6 +62,8 @@ public class PlayerStructure { public double highwinderdmg=0.0; public int nextarrowxp = 0; //How much bonus XP to give to an Artifact Bow. public boolean hasfullrangerset=false; + public double lastarrowpower=0; + public int headshotcombo=0; public double prev_weapondmg=0.0; public double prev_buffdmg=0.0; diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index e05f001..cc5b49a 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -497,11 +497,12 @@ public class TwosideKeeper extends JavaPlugin implements Listener { } } + /* if (GenericFunctions.isRanger(p) && GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.SNIPE) { p.removePotionEffect(PotionEffectType.SLOW); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,20,5)); - } + }*/ if (TwosideShops.PlayerHasPurchases(p)) { TwosideShops.PlayerSendPurchases(p); @@ -1120,7 +1121,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener { Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { @Override public void run() { - if (Bukkit.getOnlinePlayers().size()==1 && restarting_server) { + if (Bukkit.getOnlinePlayers().size()==0 && restarting_server) { Bukkit.savePlayers(); DiscordMessageSender.sendItalicizedRawMessageDiscord("All players have disconnected. Server is shutting down..."); for (int i=0;i=64 || GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.CLOSE) { headshotvalx*=4; - headshotvaly*=6; + headshotvaly*=4; headshotvalz*=4; } if (GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.SNIPE) { headshotvalx*=3; - headshotvaly*=12; + headshotvaly*=3; headshotvalz*=3; } } + //Get the headshot multiplier based on arrow power. + PlayerStructure pd = (PlayerStructure)playerdata.get(p.getUniqueId()); + double mult=1d; + mult = (GenericFunctions.isRanger(p))?(pd.lastarrowpower/140d):(pd.lastarrowpower/9d); + ev.setDamage(ev.getDamage()*mult); + headshotvalx*=mult; + headshotvaly*=mult; + headshotvalz*=mult; + + log("Headshot hitbox size Multiplier: x"+mult,2); log(headshotvalx+","+headshotvaly+","+headshotvalz,5); if (ev.getDamager().getTicksLived()>=4 || GenericFunctions.isRanger(p)) { @@ -4154,9 +4164,34 @@ public class TwosideKeeper extends JavaPlugin implements Listener { Math.abs(arrowLoc.getX()-monsterHead.getX())<=headshotvalx) { if (GenericFunctions.isRanger(p) && GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.SNIPE) { - ev.setDamage(ev.getDamage()*4.0); - p.sendMessage(ChatColor.DARK_RED+"Headshot! x4 Damage"); - p.playSound(p.getLocation(), Sound.ENTITY_LIGHTNING_IMPACT, 0.2f, 0.24f); + if (pd.headshotcombo<8) {pd.headshotcombo++;} + ev.setDamage(ev.getDamage()*(2+(pd.headshotcombo*0.25))); + p.sendMessage(ChatColor.DARK_RED+"Headshot! x"+(2+(pd.headshotcombo*0.25))+" Damage"); + if (p.hasPotionEffect(PotionEffectType.SLOW)) { + //Add to the current stack of BLINDNESS. + for (int i1=0;i1