Fixed Hunger message, plus potential glow bug fix.

dev
sigonasr2 9 years ago
parent 767c633093
commit 0c149c9b4a
  1. BIN
      TwosideKeeper.jar
  2. 4
      src/sig/plugin/TwosideKeeper/CustomDamage.java
  3. 25
      src/sig/plugin/TwosideKeeper/HelperStructures/Pronouns.java
  4. 3
      src/sig/plugin/TwosideKeeper/TwosideKeeper.java

Binary file not shown.

@ -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);
}
}
}

@ -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)];
}
}

@ -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);

Loading…
Cancel
Save