diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 8808ca9..eebb7d1 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index a839121..84a5c04 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -716,7 +716,9 @@ public class CustomDamage { //Convert from seconds to ticks. int tick_duration = (int)(duration*20); //Apply iframes. - addIframe(tick_duration,(Player)target); + if (tick_duration>0) { + addIframe(tick_duration,(Player)target); + } } } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Pronouns.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Pronouns.java index 2ece4a5..06ab206 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Pronouns.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Pronouns.java @@ -185,8 +185,8 @@ public class Pronouns { pronouns = new String[]{ "starved.", "died of starvation.", - "starved to death. They should have ate that last piece "+Pronouns.ChoosePronoun(15), - "thought they could live without eating that piece of "+Pronouns.ChoosePronoun(15), + "starved to death. They should have ate that last piece "+Pronouns.ChooseRandomFood(0), + "thought they could live without eating that piece of "+Pronouns.ChooseRandomFood(0), }; }break; case 15:{ @@ -218,7 +218,26 @@ public class Pronouns { }; } } - + return pronouns[(int)(Math.random()*pronouns.length)]; + } + + + public static String ChooseRandomFood(int type) { + String[] pronouns = new String[]{ + "beef", + "chicken", + "pork", + "rabbit", + "bread", + "beetroot", + "fish", + "cake", + "salmon", + "rotten flesh", + "potato", + "melon", + "pie", + }; return pronouns[(int)(Math.random()*pronouns.length)]; } } diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index 31f9c82..8dcb98d 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -644,12 +644,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener { } } if (Math.random()<=removechance/100) { - if (!type.equals(PotionEffectType.WEAKNESS) || level<9) { + if (type!=null && (!type.equals(PotionEffectType.WEAKNESS) || level<9)) { p.removePotionEffect(type); p.sendMessage(ChatColor.DARK_GRAY+"You successfully resisted the application of "+ChatColor.WHITE+GenericFunctions.CapitalizeFirstLetters(type.getName().replace("_", " "))); } } - } pd.debuffcount=GenericFunctions.CountDebuffs(p);