Fixed issues with the debug report not uploading from a proper filename.

This commit is contained in:
sigonasr2 2017-01-18 12:43:02 -06:00
parent cbb363c11d
commit 392e89a724
4 changed files with 14 additions and 8 deletions

Binary file not shown.

View File

@ -3324,7 +3324,7 @@ public class GenericFunctions {
ItemUtils.DeleteAllLoreLinesAtAndAfterLineContainingSubstring(item, ChatColor.AQUA+" ");
ItemUtils.addLore(item, ChatColor.WHITE+"Contents ("+GetItemCubeSpace(id)+"):");
for (ItemContainer it : TwosideKeeper.itemcube_updates.get(id)) {
ItemUtils.addLore(item, ChatColor.GRAY+" - "+GenericFunctions.UserFriendlyMaterialName(it.getItem())+(it.getAmount()>1?ChatColor.YELLOW+" x"+it.getAmount():""));
ItemUtils.addLore(item, ChatColor.GRAY+" - "+GenericFunctions.UserFriendlyMaterialName(it.getItem())+(TwosideKeeperAPI.isSetItem(it.getItem())?" (T"+TwosideKeeperAPI.getItemTier(it.getItem())+")":"")+(it.getAmount()>1?ChatColor.YELLOW+" x"+it.getAmount():""));
}
}
@ -3350,7 +3350,7 @@ public class GenericFunctions {
ItemUtils.DeleteAllLoreLinesAtAndAfterLineContainingSubstring(item, ChatColor.WHITE+"Contents (");
ItemUtils.addLore(item, ChatColor.WHITE+"Contents ("+GetBaubleSpace(id)+"):");
for (ItemStack it : items) {
ItemUtils.addLore(item, ChatColor.GRAY+" - "+GenericFunctions.UserFriendlyMaterialName(it)+(it.getAmount()>1?ChatColor.YELLOW+" x"+it.getAmount():""));
ItemUtils.addLore(item, ChatColor.GRAY+" - "+GenericFunctions.UserFriendlyMaterialName(it)+(TwosideKeeperAPI.isSetItem(it)?" (T"+TwosideKeeperAPI.getItemTier(it)+")":"")+(it.getAmount()>1?ChatColor.YELLOW+" x"+it.getAmount():""));
}
return;
}

View File

@ -1661,6 +1661,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
case "BAUBLEPOUCH":{
BaublePouch.getBaublePouchContents(BaublePouch.getBaublePouchID(p.getEquipment().getItemInOffHand()));
}break;
case "TIMINGSREPORT":{
runServerHeartbeat.performTimingsReport(true);
}break;
}
}
//LivingEntity m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
@ -1752,12 +1755,12 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
//Arrow newar = p.getWorld().spawnArrow(p.getLocation(), p.getLocation().getDirection(), 1f, 12f);
//GenericFunctions.setBowMode(p.getEquipment().getItemInMainHand(), BowMode.SNIPE);
//p.sendMessage("This is bow mode "+GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand()));
for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
/*for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
if (GenericFunctions.isArtifactEquip(p.getEquipment().getArmorContents()[i]) &&
GenericFunctions.isArtifactArmor(p.getEquipment().getArmorContents()[i])) {
AwakenedArtifact.addPotentialEXP(p.getEquipment().getArmorContents()[i], 500, p);
}
}
}*/
/*TwosideKeeper.log("Suppressed: "+GenericFunctions.isSuppressed(p),1);
TwosideKeeper.log("Suppression Time: "+GenericFunctions.getSuppressionTime(p), 1);

View File

@ -582,10 +582,13 @@ final class runServerHeartbeat implements Runnable {
}
}
public static void performTimingsReport() {
performTimingsReport(false);
}
private void performTimingsReport() {
public static void performTimingsReport(boolean manual) {
double tps = MinecraftServer.getServer().recentTps[0];
if (tps<18 && TwosideKeeper.lastTimingReport+36000<TwosideKeeper.getServerTickTime()) {
if ((tps<18 && TwosideKeeper.lastTimingReport+36000<TwosideKeeper.getServerTickTime()) || manual) {
DecimalFormat df = new DecimalFormat("0.00");
aPlugin.API.discordSendRawItalicized("**Server is lagging.**\nCurrent TPS: **"+df.format(tps)+"** (Also writing debug timings to log file)");
if (TwosideKeeper.getServerTickTime()-TwosideKeeper.lastTimingReport>72000) {
@ -594,8 +597,8 @@ final class runServerHeartbeat implements Runnable {
aPlugin.API.takeTimings(3600);
}
TwosideKeeper.lastTimingReport=TwosideKeeper.getServerTickTime();
GenericFunctions.logToFile("["+TwosideKeeper.getServerTickTime()+"] TPS: "+tps+"\n------------------\n"+ChatColor.stripColor(TwosideKeeper.HeartbeatLogger.outputReport()),"logs/"+TwosideKeeper.getServerTickTime());
aPlugin.API.discordPostFileAttachment(new File(TwosideKeeper.filesave, "logs/"+TwosideKeeper.getServerTickTime()));
GenericFunctions.logToFile("["+TwosideKeeper.getServerTickTime()+"] TPS: "+tps+"\n------------------\n"+ChatColor.stripColor(TwosideKeeper.HeartbeatLogger.outputReport()),"logs/"+TwosideKeeper.getServerTickTime()+".txt");
aPlugin.API.discordPostFileAttachment(new File(TwosideKeeper.filesave, "logs/"+TwosideKeeper.getServerTickTime()+".txt"));
}
if (tps<18) {
GenericFunctions.logToFile("["+TwosideKeeper.getServerTickTime()+"] TPS: "+tps+"\n------------------\n"+ChatColor.stripColor(TwosideKeeper.HeartbeatLogger.outputReport()));