aPlugin.API.Chests.LOOT_CUSTOM_5.addDrop(newSigDrop(1,40,"[Leader Wither] Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,LivingEntityDifficulty.DEADLY));
p.sendMessage(ChatColor.GOLD+"You must wait "+ChatColor.AQUA+DisplayTimeDifference(tickdiff)+ChatColor.RESET+" to play "+pd.nameoflastdailysign+ChatColor.RESET+" again.");
}
}
}else
@ -4619,7 +4656,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
p.sendMessage(ChatColor.GOLD+"You must wait "+ChatColor.AQUA+DisplayTimeDifference(tickdiff)+ChatColor.RESET+" to play "+pd.nameoflastdailysign+ChatColor.RESET+" again.");
}
}
}else
@ -4637,7 +4677,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
p.sendMessage(ChatColor.GOLD+"You must wait "+ChatColor.AQUA+DisplayTimeDifference(tickdiff)+ChatColor.RESET+" to play "+pd.nameoflastdailysign+ChatColor.RESET+" again.");
}
}
}
@ -5029,56 +5073,58 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
publicvoidonPlayerDeath(PlayerDeathEventev){
//Modify the death message. This is a fix for getting rid of the healthbar from the player name.
//NOTE: If you change how the suffix looks YOU MUST UPDATE THIS!
StringnewDeathMsg="";
for(inti=2;i<parsed_msg.length;i++){
if(newDeathMsg.equals("")){
newDeathMsg=parsed_msg[i];
}else{
newDeathMsg+=" "+parsed_msg[i];
}
}
pd.lastattack=0;
if(pd.lasthitdesc!=null){
log("Death Description: "+pd.lasthitdesc,5);
newDeathMsg=getFancyDeathMessage(p);
}
newDeathMsg=p.getName()+" "+newDeathMsg;
ev.setDeathMessage(newDeathMsg);
log("Death Message: "+ev.getDeathMessage(),5);
DecimalFormatdf=newDecimalFormat("0.00");
if(p!=null){
p.sendMessage(ChatColor.GRAY+"Due to death, you lost "+DEATHPENALTY+"% of your holding money. ");
givePlayerMoney(p,-(getPlayerMoney(p)/2));
p.sendMessage(" Now Holding: "+ChatColor.GREEN+"$"+df.format(getPlayerMoney(p)));
}
p.sendMessage("You took "+ChatColor.RED+df.format(pd.lastdamagetaken)+" damage"+ChatColor.WHITE+" from the last attack "+((pd.lasthitdesc!=null)?"("+pd.lasthitdesc+")":""+"!"));
log("Y position is "+p.getLocation().getY(),4);
DeathManager.addNewDeathStructure(ev.getDrops(),(p.getLocation().getY()<0)?p.getLocation().add(0,-p.getLocation().getY()+256,0)//This means they fell into the void. Might as well put it way higher.
:p.getLocation(),p);
pd=PlayerStructure.GetPlayerStructure(p);
pd.hasDied=true;
pd.vendetta_amt=0.0;
pd.regenpool=0;
pd.lifestealstacks=0;
pd.weaponcharges=0;
//p.getInventory().clear();
}
newDeathMsg=p.getName()+" "+newDeathMsg;
ev.setDeathMessage(newDeathMsg);
log("Death Message: "+ev.getDeathMessage(),5);
DecimalFormatdf=newDecimalFormat("0.00");
if(p!=null){
p.sendMessage(ChatColor.GRAY+"Due to death, you lost "+DEATHPENALTY+"% of your holding money. ");
givePlayerMoney(p,-(getPlayerMoney(p)/2));
p.sendMessage(" Now Holding: "+ChatColor.GREEN+"$"+df.format(getPlayerMoney(p)));
for(inti=0;i<elitemonsters.size();i++){
EliteMonsterem=elitemonsters.get(i);
em.targetlist.remove(p);
}
p.sendMessage("You took "+ChatColor.RED+df.format(pd.lastdamagetaken)+" damage"+ChatColor.WHITE+" from the last attack "+((pd.lasthitdesc!=null)?"("+pd.lasthitdesc+")":""+"!"));
log("Y position is "+p.getLocation().getY(),4);
DeathManager.addNewDeathStructure(ev.getDrops(),(p.getLocation().getY()<0)?p.getLocation().add(0,-p.getLocation().getY()+256,0)//This means they fell into the void. Might as well put it way higher.
:p.getLocation(),p);
pd=PlayerStructure.GetPlayerStructure(p);
pd.hasDied=true;
pd.vendetta_amt=0.0;
pd.regenpool=0;
pd.lifestealstacks=0;
pd.weaponcharges=0;
//p.getInventory().clear();
}
for(inti=0;i<elitemonsters.size();i++){
EliteMonsterem=elitemonsters.get(i);
em.targetlist.remove(p);
}
ev.setKeepInventory(true);
}
@ -8532,11 +8578,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
//Look for a death structure for this player. If found, continue.