Fixed issues with the debug report not uploading from a proper filename.
This commit is contained in:
parent
cbb363c11d
commit
392e89a724
Binary file not shown.
@ -3324,7 +3324,7 @@ public class GenericFunctions {
|
|||||||
ItemUtils.DeleteAllLoreLinesAtAndAfterLineContainingSubstring(item, ChatColor.AQUA+" ");
|
ItemUtils.DeleteAllLoreLinesAtAndAfterLineContainingSubstring(item, ChatColor.AQUA+" ");
|
||||||
ItemUtils.addLore(item, ChatColor.WHITE+"Contents ("+GetItemCubeSpace(id)+"):");
|
ItemUtils.addLore(item, ChatColor.WHITE+"Contents ("+GetItemCubeSpace(id)+"):");
|
||||||
for (ItemContainer it : TwosideKeeper.itemcube_updates.get(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.DeleteAllLoreLinesAtAndAfterLineContainingSubstring(item, ChatColor.WHITE+"Contents (");
|
||||||
ItemUtils.addLore(item, ChatColor.WHITE+"Contents ("+GetBaubleSpace(id)+"):");
|
ItemUtils.addLore(item, ChatColor.WHITE+"Contents ("+GetBaubleSpace(id)+"):");
|
||||||
for (ItemStack it : items) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1661,6 +1661,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
case "BAUBLEPOUCH":{
|
case "BAUBLEPOUCH":{
|
||||||
BaublePouch.getBaublePouchContents(BaublePouch.getBaublePouchID(p.getEquipment().getItemInOffHand()));
|
BaublePouch.getBaublePouchContents(BaublePouch.getBaublePouchID(p.getEquipment().getItemInOffHand()));
|
||||||
}break;
|
}break;
|
||||||
|
case "TIMINGSREPORT":{
|
||||||
|
runServerHeartbeat.performTimingsReport(true);
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//LivingEntity m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
|
//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);
|
//Arrow newar = p.getWorld().spawnArrow(p.getLocation(), p.getLocation().getDirection(), 1f, 12f);
|
||||||
//GenericFunctions.setBowMode(p.getEquipment().getItemInMainHand(), BowMode.SNIPE);
|
//GenericFunctions.setBowMode(p.getEquipment().getItemInMainHand(), BowMode.SNIPE);
|
||||||
//p.sendMessage("This is bow mode "+GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand()));
|
//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]) &&
|
if (GenericFunctions.isArtifactEquip(p.getEquipment().getArmorContents()[i]) &&
|
||||||
GenericFunctions.isArtifactArmor(p.getEquipment().getArmorContents()[i])) {
|
GenericFunctions.isArtifactArmor(p.getEquipment().getArmorContents()[i])) {
|
||||||
AwakenedArtifact.addPotentialEXP(p.getEquipment().getArmorContents()[i], 500, p);
|
AwakenedArtifact.addPotentialEXP(p.getEquipment().getArmorContents()[i], 500, p);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/*TwosideKeeper.log("Suppressed: "+GenericFunctions.isSuppressed(p),1);
|
/*TwosideKeeper.log("Suppressed: "+GenericFunctions.isSuppressed(p),1);
|
||||||
TwosideKeeper.log("Suppression Time: "+GenericFunctions.getSuppressionTime(p), 1);
|
TwosideKeeper.log("Suppression Time: "+GenericFunctions.getSuppressionTime(p), 1);
|
||||||
|
@ -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];
|
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");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
aPlugin.API.discordSendRawItalicized("**Server is lagging.**\nCurrent TPS: **"+df.format(tps)+"** (Also writing debug timings to log file)");
|
aPlugin.API.discordSendRawItalicized("**Server is lagging.**\nCurrent TPS: **"+df.format(tps)+"** (Also writing debug timings to log file)");
|
||||||
if (TwosideKeeper.getServerTickTime()-TwosideKeeper.lastTimingReport>72000) {
|
if (TwosideKeeper.getServerTickTime()-TwosideKeeper.lastTimingReport>72000) {
|
||||||
@ -594,8 +597,8 @@ final class runServerHeartbeat implements Runnable {
|
|||||||
aPlugin.API.takeTimings(3600);
|
aPlugin.API.takeTimings(3600);
|
||||||
}
|
}
|
||||||
TwosideKeeper.lastTimingReport=TwosideKeeper.getServerTickTime();
|
TwosideKeeper.lastTimingReport=TwosideKeeper.getServerTickTime();
|
||||||
GenericFunctions.logToFile("["+TwosideKeeper.getServerTickTime()+"] TPS: "+tps+"\n------------------\n"+ChatColor.stripColor(TwosideKeeper.HeartbeatLogger.outputReport()),"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()));
|
aPlugin.API.discordPostFileAttachment(new File(TwosideKeeper.filesave, "logs/"+TwosideKeeper.getServerTickTime()+".txt"));
|
||||||
}
|
}
|
||||||
if (tps<18) {
|
if (tps<18) {
|
||||||
GenericFunctions.logToFile("["+TwosideKeeper.getServerTickTime()+"] TPS: "+tps+"\n------------------\n"+ChatColor.stripColor(TwosideKeeper.HeartbeatLogger.outputReport()));
|
GenericFunctions.logToFile("["+TwosideKeeper.getServerTickTime()+"] TPS: "+tps+"\n------------------\n"+ChatColor.stripColor(TwosideKeeper.HeartbeatLogger.outputReport()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user