Fix Mythical drop rate. Added in toString() debug output command for
PlayerBuffData. Added debug output to PlayerBuffData.txt every time it updates.
This commit is contained in:
parent
8846e32a31
commit
a901466361
@ -2698,6 +2698,23 @@ public void checkJukeboxes() {
|
||||
LOGGING_UPDATE_COUNTS=0;
|
||||
for (int i=0;i<SPEED_CONTROL.size();i++) {
|
||||
SPEED_CONTROL.get(i).updatePlayerSpd();
|
||||
try
|
||||
{
|
||||
String filename= "PlayerBuffData.txt";
|
||||
FileWriter fw = new FileWriter(filename,true); //the true will append the new data
|
||||
fw.write("["+SERVER_TICK_TIME+"]"+"PlayerBuffData for "+SPEED_CONTROL.get(i).p.getName()+": "+SPEED_CONTROL.get(i).toString()+"\n");//appends the string to the file
|
||||
if (i+1==SPEED_CONTROL.size()) {
|
||||
fw.write("========\n");
|
||||
}
|
||||
fw.close();
|
||||
}
|
||||
catch(IOException ioe)
|
||||
{
|
||||
System.err.println("IOException: " + ioe.getMessage());
|
||||
}
|
||||
}
|
||||
if (SPEED_CONTROL.size()!=Bukkit.getOnlinePlayers().length) {
|
||||
Bukkit.getLogger().warning("["+SERVER_TICK_TIME+"]SPEED_CONTROL and ONLINE PLAYERS list length don't match! ("+SPEED_CONTROL.size()+"/"+Bukkit.getOnlinePlayers().length+")");
|
||||
}
|
||||
LOGGING_UPDATE_COUNTS++; //1
|
||||
for (int i=0;i<explorers.size();i++) {
|
||||
|
@ -30,6 +30,16 @@ public class PlayerBuffData {
|
||||
double money_gained=0;
|
||||
long last_money_report_time=0;
|
||||
public Main plugin;
|
||||
|
||||
public String toString() {
|
||||
//A method that outputs this class as a string.
|
||||
return ((java.lang.Object)this).toString()+"{p = "+p.toString()+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+
|
||||
armorbufflist.toString()+", base_hplv = "+base_hplv+", hpbufflist = "+hpbufflist.toString()+", helmet_durability = "+
|
||||
helmet_durability+", chestplate_durability = "+chestplate_durability+", leggings_durability = "+leggings_durability+"," +
|
||||
" boots_durability = "+boots_durability+", potion_spdlv = "+potion_spdlv+", potion_time = "+potion_time+", hpbuff_time = "+
|
||||
hpbuff_time+", extra_hp = "+extra_hp+", money_gained = "+money_gained+", last_money_report_time = "+last_money_report_time+"," +
|
||||
"plugin = "+plugin.toString()+"}";
|
||||
}
|
||||
|
||||
public String healthbar(double curHP,double maxHP) {
|
||||
//笆<EFBFBD>笆<EFBFBD>
|
||||
|
@ -11354,7 +11354,7 @@ implements Listener
|
||||
Location loc = e.getEntity().getLocation();
|
||||
ItemStack item = null;
|
||||
|
||||
switch ((int)(Math.random()*112)) {
|
||||
switch ((int)(Math.random()*111.01)) {
|
||||
case 0:{
|
||||
item = new ItemStack(Material.WOOD_HOE);
|
||||
}break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user