From 878331587be8a7ed9d318c225a0ab14e9cccee02 Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 12 Jan 2021 01:39:46 -0600 Subject: [PATCH 1/8] Update timings.py --- cogs/timings.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cogs/timings.py b/cogs/timings.py index e5b01ba..1659c47 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -2,6 +2,7 @@ import discord from discord.ext import commands import requests + class Timings(commands.Cog): def __init__(self, bot): @@ -9,6 +10,12 @@ class Timings(commands.Cog): # Use @commands.Cog.listener() instead of event and use @commands.command() for commands + # TODO: Add descriptions or hyperlink from the following links + # https://minecraft.gamepedia.com/Server.properties#Java_Edition_3 + # https://bukkit.gamepedia.com/Bukkit.yml + # https://www.spigotmc.org/wiki/spigot-configuration/ + # https://paper.readthedocs.io/en/latest/server/configuration.html + # https://pl3xgaming.github.io/PurpurDocs/Configuration/ async def analyze_timings(self, message): enterless_message = message.content.replace("\n", " ") words = enterless_message.split(" ") @@ -21,7 +28,7 @@ class Timings(commands.Cog): "https://timings.spigotmc.org/?url="): embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) embed_var.add_field(name="❌ Spigot", - value="Upgrade to [Purpur](https://purpur.pl3x.net/downloads/).") + value="Upgrade to [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).") embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) embed_var.url = timings_url await message.reply(embed=embed_var) @@ -951,6 +958,9 @@ class Timings(commands.Cog): except ValueError: embed_var.add_field(name="❌ Invalid Configuration", value="At least one of your configuration files had an invalid data type.") + except TypeError: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") if len(embed_var.fields) == 0: embed_var.add_field(name="✅ All good", From 5c04dc2ff0ac7aba1c7c062f67514fff07e7ae40 Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 12 Jan 2021 14:31:23 -0600 Subject: [PATCH 2/8] Update timings.py --- cogs/timings.py | 173 ++++++++++++++++++++++-------------------------- 1 file changed, 80 insertions(+), 93 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 1659c47..23a30a2 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -11,8 +11,6 @@ class Timings(commands.Cog): # Use @commands.Cog.listener() instead of event and use @commands.command() for commands # TODO: Add descriptions or hyperlink from the following links - # https://minecraft.gamepedia.com/Server.properties#Java_Edition_3 - # https://bukkit.gamepedia.com/Bukkit.yml # https://www.spigotmc.org/wiki/spigot-configuration/ # https://paper.readthedocs.io/en/latest/server/configuration.html # https://pl3xgaming.github.io/PurpurDocs/Configuration/ @@ -28,7 +26,7 @@ class Timings(commands.Cog): "https://timings.spigotmc.org/?url="): embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) embed_var.add_field(name="❌ Spigot", - value="Upgrade to [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).") + value="Spigot timings have limited information. Upgrade to [Purpur](https://purpur.pl3x.net/downloads/#1.16.4) for the most accurate timings analysis.") embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) embed_var.url = timings_url await message.reply(embed=embed_var) @@ -41,36 +39,33 @@ class Timings(commands.Cog): return timings_host, timings_id = timings_url.split("?id=") timings_json = timings_host + "data.php?id=" + timings_id - r = requests.get(timings_json).json() + embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) + embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) + embed_var.url = timings_url + r = requests.get(timings_json).json() if r is None: - embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) embed_var.add_field(name="❌ Invalid report", value="Create a new timings report.") - embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) - embed_var.url = timings_url await message.reply(embed=embed_var) return - embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) - embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) - embed_var.url = timings_url unchecked = 0 try: try: version = r["timingsMaster"]["version"] if "1.16.4" not in version: embed_var.add_field(name="❌ Legacy Build", - value="Update to 1.16.4.") + value="You are using " + version + ". Update to 1.16.4.") using_yatopia = "yatopia" in r["timingsMaster"]["config"] if using_yatopia: embed_var.add_field(name="❌ Yatopia", value="Yatopia is prone to bugs. " - "Consider using [Purpur](https://ci.pl3x.net/job/Purpur/).") + "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).") elif "Paper" in version: embed_var.add_field(name="||❌ Paper||", value="||Purpur has more optimizations but is generally less supported. " - "Consider using [Purpur](https://ci.pl3x.net/job/Purpur/).||") + "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).||") except KeyError: unchecked = unchecked + 1 @@ -82,7 +77,7 @@ class Timings(commands.Cog): if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): embed_var.add_field(name="❌ online-mode", - value="Enable this in server.properties for security.") + value="Enable this in [server.properties](https://minecraft.gamepedia.com/Server.properties#Java_Edition_3) for security.") except KeyError: unchecked = unchecked + 1 @@ -109,7 +104,7 @@ class Timings(commands.Cog): java_version = jvm_version.split(".")[0] if int(java_version) < 14: embed_var.add_field(name="❌ Java " + java_version, - value="If you are going to use ZGC, you should also use Java 14+.") + value="If you are going to use ZGC, you should also use [Java 14+](https://adoptopenjdk.net/installation.html).") elif "-Daikars.new.flags=true" in flags: if "-XX:+PerfDisableSharedMem" not in flags: embed_var.add_field(name="❌ Outdated Flags", @@ -215,7 +210,7 @@ class Timings(commands.Cog): if "SuggestionBlocker" in plugins: embed_var.add_field(name="❌ SuggestionBlocker", value="You probably don't need SuggestionBlocker as Spigot already adds its features. " - "Set tab-complete to -1 in spigot.yml.") + "Set tab-complete to -1 in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/).") if "FastAsyncWorldEdit" in plugins: embed_var.add_field(name="❌ FastAsyncWorldEdit", value="FAWE can corrupt your world. " @@ -234,12 +229,10 @@ class Timings(commands.Cog): "Remove ExploitFixer.") if "EntityTrackerFixer" in plugins: embed_var.add_field(name="❌ EntityTrackerFixer", - value="You probably don't need EntityTrackerFixer as Paper already has its features. " - "Remove EntityTrackerFixer.") + value="You don't need EntityTrackerFixer as Paper already has its features. ") if "Orebfuscator" in plugins: embed_var.add_field(name="❌ Orebfuscator", - value="You probably don't need Orebfuscator as Paper already has its features. " - "Remove Orebfuscator.") + value="You don't need Orebfuscator as Paper already has its features.") if "ImageOnMap" in plugins: embed_var.add_field(name="❌ ImageOnMap", value="This plugin has a [memory leak](https://github.com/zDevelopers/ImageOnMap/issues/104). If it is not essential, you should remove it. " @@ -293,7 +286,7 @@ class Timings(commands.Cog): if "VillagerLobotomizatornator" in plugins: embed_var.add_field(name="❌ LimitPillagers", value="You probably don't need VillagerLobotomizatornator as Purpur already adds its features. " - "Enable villager.lobotomize.enabled in purpur.yml.") + "Enable villager.lobotomize.enabled in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") except KeyError: unchecked = unchecked + 1 @@ -309,7 +302,7 @@ class Timings(commands.Cog): else: embed_var.add_field(name="❌ PhantomSMP", value="You probably don't need PhantomSMP as Paper already has its features. " - "Enable phantoms-only-attack-insomniacs in paper.yml.") + "Enable phantoms-only-attack-insomniacs in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -319,10 +312,10 @@ class Timings(commands.Cog): bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] if network_compression_threshold <= 256 and bungeecord == "false": embed_var.add_field(name="❌ network-compression-threshold", - value="Increase this in server.properties. Recommended: 512.") + value="Increase this in [server.properties](https://minecraft.gamepedia.com/Server.properties#Java_Edition_3). Recommended: 512.") if network_compression_threshold != -1 and bungeecord == "true": embed_var.add_field(name="❌ network-compression-threshold", - value="Set this to -1 in server.properties for a bungee server like yours.") + value="Set this to -1 in [server.properties](https://minecraft.gamepedia.com/Server.properties#Java_Edition_3) for a bungee server like yours.") except KeyError: unchecked = unchecked + 1 @@ -331,7 +324,7 @@ class Timings(commands.Cog): view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) if view_distance >= 10 and spigot_view_distance == "default": embed_var.add_field(name="❌ view-distance", - value="Decrease this from default (10) in spigot.yml. " + value="Decrease this from default (10) in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 3.") except KeyError: unchecked = unchecked + 1 @@ -340,7 +333,7 @@ class Timings(commands.Cog): chunk_gc_period = int(r["timingsMaster"]["config"]["bukkit"]["chunk-gc"]["period-in-ticks"]) if chunk_gc_period >= 600: embed_var.add_field(name="❌ chunk-gc.period-in-ticks", - value="Decrease this in bukkit.yml.\nRecommended: 400.") + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 400.") except KeyError: unchecked = unchecked + 1 @@ -348,7 +341,7 @@ class Timings(commands.Cog): ticks_per_monster_spawns = int(r["timingsMaster"]["config"]["bukkit"]["ticks-per"]["monster-spawns"]) if ticks_per_monster_spawns == 1: embed_var.add_field(name="❌ ticks-per.monster-spawns", - value="Increase this in bukkit.yml.\nRecommended: 4.") + value="Increase this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 4.") except KeyError: unchecked = unchecked + 1 @@ -356,7 +349,7 @@ class Timings(commands.Cog): monsters_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["monsters"]) if monsters_spawn_limit >= 70: embed_var.add_field(name="❌ spawn-limits.monsters", - value="Decrease this in bukkit.yml.\nRecommended: 15.") + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 15.") except KeyError: unchecked = unchecked + 1 @@ -364,7 +357,7 @@ class Timings(commands.Cog): water_ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-ambient"]) if water_ambient_spawn_limit >= 20: embed_var.add_field(name="❌ spawn-limits.water-ambient", - value="Decrease this in bukkit.yml.\nRecommended: 2.") + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") except KeyError: unchecked = unchecked + 1 @@ -372,7 +365,7 @@ class Timings(commands.Cog): ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["ambient"]) if ambient_spawn_limit >= 15: embed_var.add_field(name="❌ spawn-limits.ambient", - value="Decrease this in bukkit.yml.\nRecommended: 1.") + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 1.") except KeyError: unchecked = unchecked + 1 @@ -380,7 +373,7 @@ class Timings(commands.Cog): animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["animals"]) if animals_spawn_limit >= 10: embed_var.add_field(name="❌ spawn-limits.animals", - value="Decrease this in bukkit.yml.\nRecommended: 3.") + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 3.") except KeyError: unchecked = unchecked + 1 @@ -388,7 +381,7 @@ class Timings(commands.Cog): water_animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-animals"]) if water_animals_spawn_limit >= 15: embed_var.add_field(name="❌ spawn-limits.water-animals", - value="Decrease this in bukkit.yml.\nRecommended: 2.") + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") except KeyError: unchecked = unchecked + 1 @@ -399,11 +392,11 @@ class Timings(commands.Cog): view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) if mob_spawn_range >= 8 and view_distance <= 6: embed_var.add_field(name="❌ mob-spawn-range", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: " + str(view_distance - 1) + ".") elif mob_spawn_range >= 8 and int(spigot_view_distance) <= 6: embed_var.add_field(name="❌ mob-spawn-range", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: " + str(int(spigot_view_distance) - 1) + ".") except KeyError: unchecked = unchecked + 1 @@ -414,7 +407,7 @@ class Timings(commands.Cog): "animals"]) if animals_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.animals", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 6.") except KeyError: unchecked = unchecked + 1 @@ -425,7 +418,7 @@ class Timings(commands.Cog): "monsters"]) if monsters_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.monsters", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 16.") except KeyError: unchecked = unchecked + 1 @@ -442,7 +435,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["misc"]) if misc_entity_activation_range >= 16: embed_var.add_field(name="❌ entity-activation-range.misc", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 4.") except KeyError: unchecked = unchecked + 1 @@ -452,7 +445,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["water"]) if water_entity_activation_range >= 16: embed_var.add_field(name="❌ entity-activation-range.water", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 12.") except KeyError: unchecked = unchecked + 1 @@ -463,7 +456,7 @@ class Timings(commands.Cog): "villagers"]) if villagers_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.villagers", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 16.") except KeyError: unchecked = unchecked + 1 @@ -481,7 +474,7 @@ class Timings(commands.Cog): "tick-inactive-villagers"] if tick_inactive_villagers == "true": embed_var.add_field(name="❌ tick-inactive-villagers", - value="Disable this in spigot.yml.") + value="Disable this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/).") except KeyError: unchecked = unchecked + 1 @@ -489,7 +482,7 @@ class Timings(commands.Cog): nerf_spawner_mobs = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["nerf-spawner-mobs"] if nerf_spawner_mobs == "false": embed_var.add_field(name="❌ nerf-spawner-mobs", - value="Enable this in spigot.yml.") + value="Enable this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/).") except KeyError: unchecked = unchecked + 1 @@ -614,7 +607,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["arrow-despawn-rate"]) if arrow_despawn_rate >= 1200: embed_var.add_field(name="❌ arrow-despawn-rate", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 300.") except KeyError: unchecked = unchecked + 1 @@ -624,7 +617,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["item"]) if item_merge_radius <= 2.5: embed_var.add_field(name="❌ merge-radius.item", - value="Increase this in spigot.yml. " + value="Increase this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 4.0.") except KeyError: unchecked = unchecked + 1 @@ -634,7 +627,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["exp"]) if exp_merge_radius <= 3.0: embed_var.add_field(name="❌ merge-radius.exp", - value="Increase this in spigot.yml. " + value="Increase this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 6.0.") except KeyError: unchecked = unchecked + 1 @@ -644,7 +637,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["max-entity-collisions"]) if max_entity_collisions >= 8: embed_var.add_field(name="❌ max-entity-collisions", - value="Decrease this in spigot.yml. " + value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " "Recommended: 2.") except KeyError: unchecked = unchecked + 1 @@ -654,7 +647,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["max-auto-save-chunks-per-tick"]) if max_auto_save_chunks_per_tick >= 24: embed_var.add_field(name="❌ max-auto-save-chunks-per-tick", - value="Decrease this in paper.yml. " + value="Decrease this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 6.") except KeyError: unchecked = unchecked + 1 @@ -664,7 +657,7 @@ class Timings(commands.Cog): "optimize-explosions"] if optimize_explosions == "false": embed_var.add_field(name="❌ optimize-explosions", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -673,7 +666,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["mob-spawner-tick-rate"]) if mob_spawner_tick_rate == 1: embed_var.add_field(name="❌ mob-spawner-tick-rate", - value="Increase this in paper.yml. " + value="Increase this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 2.") except KeyError: unchecked = unchecked + 1 @@ -684,7 +677,7 @@ class Timings(commands.Cog): "disable-chest-cat-detection"] if disable_chest_cat_detection == "false": embed_var.add_field(name="❌ disable-chest-cat-detection", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -693,7 +686,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["container-update-tick-rate"]) if container_update_tick_rate == "false": embed_var.add_field(name="❌ container-update-tick-rate", - value="Increase this in paper.yml. " + value="Increase this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 3.") except KeyError: unchecked = unchecked + 1 @@ -703,7 +696,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["grass-spread-tick-rate"]) if grass_spread_tick_rate == 1: embed_var.add_field(name="❌ grass-spread-tick-rate", - value="Increase this in paper.yml. " + value="Increase this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 4") except KeyError: unchecked = unchecked + 1 @@ -713,7 +706,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) if soft_despawn_range >= 32: embed_var.add_field(name="❌ despawn-ranges.soft", - value="Decrease this in paper.yml. " + value="Decrease this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 28") except KeyError: unchecked = unchecked + 1 @@ -722,7 +715,7 @@ class Timings(commands.Cog): hard_despawn_range = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) if hard_despawn_range >= 128: embed_var.add_field(name="❌ despawn-ranges.hard", - value="Decrease this in paper.yml. " + value="Decrease this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 48") except KeyError: unchecked = unchecked + 1 @@ -732,7 +725,7 @@ class Timings(commands.Cog): "disable-move-event"] if hopper_disable_move_event == "false": embed_var.add_field(name="❌ hopper.disable-move-event", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -741,7 +734,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["non-player-arrow-despawn-rate"]) if non_player_arrow_despawn_rate == -1: embed_var.add_field(name="❌ non-player-arrow-despawn-rate", - value="Set a value in paper.yml. " + value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 60") except KeyError: unchecked = unchecked + 1 @@ -751,7 +744,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["creative-arrow-despawn-rate"]) if creative_arrow_despawn_rate == -1: embed_var.add_field(name="❌ creative-arrow-despawn-rate", - value="Set a value in paper.yml. " + value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " "Recommended: 60") except KeyError: unchecked = unchecked + 1 @@ -761,7 +754,7 @@ class Timings(commands.Cog): "prevent-moving-into-unloaded-chunks"] if prevent_moving_into_unloaded_chunks == "false": embed_var.add_field(name="❌ prevent-moving-into-unloaded-chunks", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -770,7 +763,7 @@ class Timings(commands.Cog): "use-faster-eigencraft-redstone"] if eigencraft_redstone == "false": embed_var.add_field(name="❌ use-faster-eigencraft-redstone", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -778,7 +771,7 @@ class Timings(commands.Cog): fix_climbing_bypass_gamerule = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["fix-climbing-bypassing-cramming-rule"] if fix_climbing_bypass_gamerule == "false": embed_var.add_field(name="❌ fix-climbing-bypassing-cramming-rule", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -786,7 +779,7 @@ class Timings(commands.Cog): armor_stands_do_collision_entity_lookups = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-do-collision-entity-lookups"] if armor_stands_do_collision_entity_lookups == "true": embed_var.add_field(name="❌ armor-stands-do-collision-entity-lookups", - value="Disable this in paper.yml.") + value="Disable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -795,7 +788,7 @@ class Timings(commands.Cog): armor_stands_tick = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-tick"] if armor_stands_tick == "true" and "PetBlocks" not in plugins and "BlockBalls" not in plugins and "ArmorStandTools" not in plugins: embed_var.add_field(name="❌ armor-stands-tick", - value="Disable this in paper.yml.") + value="Disable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -804,7 +797,7 @@ class Timings(commands.Cog): "per-player-mob-spawns"] if per_player_mob_spawns == "false": embed_var.add_field(name="❌ per-player-mob-spawns", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -813,7 +806,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["alt-item-despawn-rate"]["enabled"] if alt_item_despawn_rate_enabled == "false": embed_var.add_field(name="❌ alt-item-despawn-rate.enabled", - value="Enable this in paper.yml.") + value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -828,21 +821,21 @@ class Timings(commands.Cog): view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) if view_distance >= 4: embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in paper.yml. " - "Recommended: " + str(view_distance) + ". And reduce view-distance in server.properties. Recommended: 3.") + value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + "Recommended: " + str(view_distance) + ". And reduce view-distance from default (" + str(view_distance) + ") in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). Recommended: 3.") elif int(spigot_view_distance) >= 4: embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in paper.yml. " - "Recommended: " + spigot_view_distance + ". And reduce view-distance in spigot.yml. Recommended: 3.") + value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + "Recommended: " + spigot_view_distance + ". And reduce view-distance in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). Recommended: 3.") except KeyError: unchecked = unchecked + 1 try: - enable_treasure_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "enable-treasure-maps"] - if enable_treasure_maps == "true": + enable_treasure_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["enable-treasure-maps"] + already_discovered_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["treasure-maps-return-already-discovered"] + if enable_treasure_maps == "true" and already_discovered_maps == "false": embed_var.add_field(name="❌ enable-treasure-maps", - value="Disable this in paper.yml. Why? Generating treasure maps is extremely expensive and can hang a server if the structure it's trying to locate is really far away.") + value="Disable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") except KeyError: unchecked = unchecked + 1 @@ -851,7 +844,7 @@ class Timings(commands.Cog): "projectile-load-save-per-chunk-limit"]) if projectile_load_save == -1: embed_var.add_field(name="❌ projectile-load-save-per-chunk-limit", - value="Set a value in paper.yml. Recommended: 8.") + value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). Recommended: 8.") except KeyError: unchecked = unchecked + 1 @@ -860,10 +853,10 @@ class Timings(commands.Cog): plugins = r["timingsMaster"]["plugins"] if use_alternate_keepalive == "false" and "TCPShield" not in plugins: embed_var.add_field(name="❌ use-alternate-keepalive", - value="Enable this in purpur.yml.") + value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") if use_alternate_keepalive == "true" and "TCPShield" in plugins: embed_var.add_field(name="❌ use-alternate-keepalive", - value="Disable this in purpur.yml. It causes issues with TCPShield.") + value="Disable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). It causes issues with TCPShield.") except KeyError: unchecked = unchecked + 1 @@ -872,7 +865,7 @@ class Timings(commands.Cog): "dont-send-useless-entity-packets"] if dont_send_useless_entity_packets == "false": embed_var.add_field(name="❌ dont-send-useless-entity-packets", - value="Enable this in purpur.yml.") + value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") except KeyError: unchecked = unchecked + 1 @@ -882,39 +875,33 @@ class Timings(commands.Cog): "disable-treasure-searching"] if disable_treasure_searching == "false": embed_var.add_field(name="❌ dolphin.disable-treasure-searching", - value="Enable this in purpur.yml.") + value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") except KeyError: unchecked = unchecked + 1 try: - brain_ticks = int( - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ - "brain-ticks"]) + brain_ticks = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["brain-ticks"]) if brain_ticks == 1: embed_var.add_field(name="❌ villager.brain-ticks", - value="Increase this in purpur.yml. " + value="Increase this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). " "Recommended: 4.") except KeyError: unchecked = unchecked + 1 try: - iron_golem_radius = int( - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ - "spawn-iron-golem"]["radius"]) + iron_golem_radius = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["radius"]) if iron_golem_radius == 0: embed_var.add_field(name="❌ spawn-iron-golem.radius", - value="Set a value in purpur.yml. " + value="Set a value in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). " "Recommended: 32.") except KeyError: unchecked = unchecked + 1 try: - iron_golem_limit = int( - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ - "spawn-iron-golem"]["limit"]) + iron_golem_limit = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["limit"]) if iron_golem_limit == 0: embed_var.add_field(name="❌ spawn-iron-golem.limit", - value="Set a value in purpur.yml. " + value="Set a value in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). " "Recommended: 5.") except KeyError: unchecked = unchecked + 1 @@ -925,7 +912,7 @@ class Timings(commands.Cog): "aggressive-towards-villager-when-lagging"] if aggressive_towards_villager_when_lagging == "true": embed_var.add_field(name="❌ zombie.aggresive-towards-villager-when-lagging", - value="Disable this in purpur.yml.") + value="Disable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") except KeyError: unchecked = unchecked + 1 @@ -935,7 +922,7 @@ class Timings(commands.Cog): "entities-can-use-portals"] if entities_can_use_portals == "true": embed_var.add_field(name="❌ entities-can-use-portals", - value="Disable this in purpur.yml to prevent players from creating chunk anchors.") + value="Disable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/) to prevent players from creating chunk anchors.") except KeyError: unchecked = unchecked + 1 @@ -944,7 +931,7 @@ class Timings(commands.Cog): "lobotomize"]["enabled"] if lobotomize_enabled == "false": embed_var.add_field(name="❌ villager.lobotomize.enabled", - value="Enable this in purpur.yml.") + value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") except KeyError: unchecked = unchecked + 1 @@ -952,7 +939,7 @@ class Timings(commands.Cog): teleport_if_outside_border = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["player"]["teleport-if-outside-border"] if teleport_if_outside_border == "false": embed_var.add_field(name="❌ player.teleport-if-outside-border", - value="Enable this in purpur.yml.") + value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") except KeyError: unchecked = unchecked + 1 except ValueError: @@ -972,7 +959,7 @@ class Timings(commands.Cog): if issue_count >= 25: embed_var.insert_field_at(index=24, name="Plus " + str(issue_count - 24) + " more recommendations", value="Create a new timings report after resolving some of the above issues to see more.") if unchecked > 0: - embed_var.description = "||" + str(unchecked) + " missing configuration optimizations due to your server version.||" + embed_var.description = "||" + str(unchecked) + " unchecked configuration optimizations due to your server version. Use the latest version of [Purpur](https://purpur.pl3x.net/downloads/#1.16.4) to resolve this.||" await message.reply(embed=embed_var) From 079df577b80723480710376b381fec88cd856065 Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 12 Jan 2021 14:49:53 -0600 Subject: [PATCH 3/8] Update timings.py --- cogs/timings.py | 122 ++++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 23a30a2..2b72597 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -11,9 +11,9 @@ class Timings(commands.Cog): # Use @commands.Cog.listener() instead of event and use @commands.command() for commands # TODO: Add descriptions or hyperlink from the following links - # https://www.spigotmc.org/wiki/spigot-configuration/ - # https://paper.readthedocs.io/en/latest/server/configuration.html - # https://pl3xgaming.github.io/PurpurDocs/Configuration/ + # http://bit.ly/spiconf + # http://bit.ly/paperconf + # http://bit.ly/purpurc async def analyze_timings(self, message): enterless_message = message.content.replace("\n", " ") words = enterless_message.split(" ") @@ -77,7 +77,7 @@ class Timings(commands.Cog): if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): embed_var.add_field(name="❌ online-mode", - value="Enable this in [server.properties](https://minecraft.gamepedia.com/Server.properties#Java_Edition_3) for security.") + value="Enable this in [server.properties](http://bit.ly/servprop) for security.") except KeyError: unchecked = unchecked + 1 @@ -210,7 +210,7 @@ class Timings(commands.Cog): if "SuggestionBlocker" in plugins: embed_var.add_field(name="❌ SuggestionBlocker", value="You probably don't need SuggestionBlocker as Spigot already adds its features. " - "Set tab-complete to -1 in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/).") + "Set tab-complete to -1 in [spigot.yml](http://bit.ly/spiconf).") if "FastAsyncWorldEdit" in plugins: embed_var.add_field(name="❌ FastAsyncWorldEdit", value="FAWE can corrupt your world. " @@ -244,15 +244,15 @@ class Timings(commands.Cog): if "GroupManager" in plugins: embed_var.add_field(name="❌ GroupManager", value="GroupManager is an outdated permission plugin. " - "Consider replacing it with [LuckPerms](https://ci.lucko.me/job/LuckPerms/1243/artifact/bukkit/build/libs/LuckPerms-Bukkit-5.2.77.jar).") + "Consider replacing it with [LuckPerms](https://luckperms.net/download).") if "PermissionsEx" in plugins: embed_var.add_field(name="❌ PermissionsEx", value="PermissionsEx is an outdated permission plugin. " - "Consider replacing it with [LuckPerms](https://ci.lucko.me/job/LuckPerms/1243/artifact/bukkit/build/libs/LuckPerms-Bukkit-5.2.77.jar).") + "Consider replacing it with [LuckPerms](https://luckperms.net/download).") if "bPermissions" in plugins: embed_var.add_field(name="❌ bPermissions", value="bPermissions is an outdated permission plugin. " - "Consider replacing it with [LuckPerms](https://ci.lucko.me/job/LuckPerms/1243/artifact/bukkit/build/libs/LuckPerms-Bukkit-5.2.77.jar).") + "Consider replacing it with [LuckPerms](https://luckperms.net/download).") if "DisableJoinMessage" in plugins and "Essentials" in plugins: embed_var.add_field(name="❌ DisableJoinMessage", value="You probably don't need DisableJoinMessage because Essentials already has its features. ") @@ -286,7 +286,7 @@ class Timings(commands.Cog): if "VillagerLobotomizatornator" in plugins: embed_var.add_field(name="❌ LimitPillagers", value="You probably don't need VillagerLobotomizatornator as Purpur already adds its features. " - "Enable villager.lobotomize.enabled in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + "Enable villager.lobotomize.enabled in [purpur.yml](http://bit.ly/purpurc).") except KeyError: unchecked = unchecked + 1 @@ -302,7 +302,7 @@ class Timings(commands.Cog): else: embed_var.add_field(name="❌ PhantomSMP", value="You probably don't need PhantomSMP as Paper already has its features. " - "Enable phantoms-only-attack-insomniacs in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + "Enable phantoms-only-attack-insomniacs in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -312,10 +312,10 @@ class Timings(commands.Cog): bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] if network_compression_threshold <= 256 and bungeecord == "false": embed_var.add_field(name="❌ network-compression-threshold", - value="Increase this in [server.properties](https://minecraft.gamepedia.com/Server.properties#Java_Edition_3). Recommended: 512.") + value="Increase this in [server.properties](http://bit.ly/servprop). Recommended: 512.") if network_compression_threshold != -1 and bungeecord == "true": embed_var.add_field(name="❌ network-compression-threshold", - value="Set this to -1 in [server.properties](https://minecraft.gamepedia.com/Server.properties#Java_Edition_3) for a bungee server like yours.") + value="Set this to -1 in [server.properties](http://bit.ly/servprop) for a bungee server like yours.") except KeyError: unchecked = unchecked + 1 @@ -324,7 +324,7 @@ class Timings(commands.Cog): view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) if view_distance >= 10 and spigot_view_distance == "default": embed_var.add_field(name="❌ view-distance", - value="Decrease this from default (10) in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this from default (10) in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 3.") except KeyError: unchecked = unchecked + 1 @@ -392,11 +392,11 @@ class Timings(commands.Cog): view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) if mob_spawn_range >= 8 and view_distance <= 6: embed_var.add_field(name="❌ mob-spawn-range", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: " + str(view_distance - 1) + ".") elif mob_spawn_range >= 8 and int(spigot_view_distance) <= 6: embed_var.add_field(name="❌ mob-spawn-range", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: " + str(int(spigot_view_distance) - 1) + ".") except KeyError: unchecked = unchecked + 1 @@ -407,7 +407,7 @@ class Timings(commands.Cog): "animals"]) if animals_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.animals", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 6.") except KeyError: unchecked = unchecked + 1 @@ -418,7 +418,7 @@ class Timings(commands.Cog): "monsters"]) if monsters_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.monsters", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 16.") except KeyError: unchecked = unchecked + 1 @@ -435,7 +435,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["misc"]) if misc_entity_activation_range >= 16: embed_var.add_field(name="❌ entity-activation-range.misc", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 4.") except KeyError: unchecked = unchecked + 1 @@ -445,7 +445,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["water"]) if water_entity_activation_range >= 16: embed_var.add_field(name="❌ entity-activation-range.water", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 12.") except KeyError: unchecked = unchecked + 1 @@ -456,7 +456,7 @@ class Timings(commands.Cog): "villagers"]) if villagers_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.villagers", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 16.") except KeyError: unchecked = unchecked + 1 @@ -474,7 +474,7 @@ class Timings(commands.Cog): "tick-inactive-villagers"] if tick_inactive_villagers == "true": embed_var.add_field(name="❌ tick-inactive-villagers", - value="Disable this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/).") + value="Disable this in [spigot.yml](http://bit.ly/spiconf).") except KeyError: unchecked = unchecked + 1 @@ -482,7 +482,7 @@ class Timings(commands.Cog): nerf_spawner_mobs = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["nerf-spawner-mobs"] if nerf_spawner_mobs == "false": embed_var.add_field(name="❌ nerf-spawner-mobs", - value="Enable this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/).") + value="Enable this in [spigot.yml](http://bit.ly/spiconf).") except KeyError: unchecked = unchecked + 1 @@ -607,7 +607,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["arrow-despawn-rate"]) if arrow_despawn_rate >= 1200: embed_var.add_field(name="❌ arrow-despawn-rate", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 300.") except KeyError: unchecked = unchecked + 1 @@ -617,7 +617,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["item"]) if item_merge_radius <= 2.5: embed_var.add_field(name="❌ merge-radius.item", - value="Increase this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Increase this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 4.0.") except KeyError: unchecked = unchecked + 1 @@ -627,7 +627,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["exp"]) if exp_merge_radius <= 3.0: embed_var.add_field(name="❌ merge-radius.exp", - value="Increase this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Increase this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 6.0.") except KeyError: unchecked = unchecked + 1 @@ -637,7 +637,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["max-entity-collisions"]) if max_entity_collisions >= 8: embed_var.add_field(name="❌ max-entity-collisions", - value="Decrease this in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). " + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " "Recommended: 2.") except KeyError: unchecked = unchecked + 1 @@ -647,7 +647,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["max-auto-save-chunks-per-tick"]) if max_auto_save_chunks_per_tick >= 24: embed_var.add_field(name="❌ max-auto-save-chunks-per-tick", - value="Decrease this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Decrease this in [paper.yml](http://bit.ly/paperconf). " "Recommended: 6.") except KeyError: unchecked = unchecked + 1 @@ -657,7 +657,7 @@ class Timings(commands.Cog): "optimize-explosions"] if optimize_explosions == "false": embed_var.add_field(name="❌ optimize-explosions", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -666,7 +666,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["mob-spawner-tick-rate"]) if mob_spawner_tick_rate == 1: embed_var.add_field(name="❌ mob-spawner-tick-rate", - value="Increase this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Increase this in [paper.yml](http://bit.ly/paperconf). " "Recommended: 2.") except KeyError: unchecked = unchecked + 1 @@ -677,7 +677,7 @@ class Timings(commands.Cog): "disable-chest-cat-detection"] if disable_chest_cat_detection == "false": embed_var.add_field(name="❌ disable-chest-cat-detection", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -686,7 +686,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["container-update-tick-rate"]) if container_update_tick_rate == "false": embed_var.add_field(name="❌ container-update-tick-rate", - value="Increase this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Increase this in [paper.yml](http://bit.ly/paperconf). " "Recommended: 3.") except KeyError: unchecked = unchecked + 1 @@ -696,7 +696,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["grass-spread-tick-rate"]) if grass_spread_tick_rate == 1: embed_var.add_field(name="❌ grass-spread-tick-rate", - value="Increase this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Increase this in [paper.yml](http://bit.ly/paperconf). " "Recommended: 4") except KeyError: unchecked = unchecked + 1 @@ -706,7 +706,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) if soft_despawn_range >= 32: embed_var.add_field(name="❌ despawn-ranges.soft", - value="Decrease this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Decrease this in [paper.yml](http://bit.ly/paperconf). " "Recommended: 28") except KeyError: unchecked = unchecked + 1 @@ -715,7 +715,7 @@ class Timings(commands.Cog): hard_despawn_range = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) if hard_despawn_range >= 128: embed_var.add_field(name="❌ despawn-ranges.hard", - value="Decrease this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Decrease this in [paper.yml](http://bit.ly/paperconf). " "Recommended: 48") except KeyError: unchecked = unchecked + 1 @@ -725,7 +725,7 @@ class Timings(commands.Cog): "disable-move-event"] if hopper_disable_move_event == "false": embed_var.add_field(name="❌ hopper.disable-move-event", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -734,7 +734,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["non-player-arrow-despawn-rate"]) if non_player_arrow_despawn_rate == -1: embed_var.add_field(name="❌ non-player-arrow-despawn-rate", - value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Set a value in [paper.yml](http://bit.ly/paperconf). " "Recommended: 60") except KeyError: unchecked = unchecked + 1 @@ -744,7 +744,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["creative-arrow-despawn-rate"]) if creative_arrow_despawn_rate == -1: embed_var.add_field(name="❌ creative-arrow-despawn-rate", - value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " + value="Set a value in [paper.yml](http://bit.ly/paperconf). " "Recommended: 60") except KeyError: unchecked = unchecked + 1 @@ -754,7 +754,7 @@ class Timings(commands.Cog): "prevent-moving-into-unloaded-chunks"] if prevent_moving_into_unloaded_chunks == "false": embed_var.add_field(name="❌ prevent-moving-into-unloaded-chunks", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -763,7 +763,7 @@ class Timings(commands.Cog): "use-faster-eigencraft-redstone"] if eigencraft_redstone == "false": embed_var.add_field(name="❌ use-faster-eigencraft-redstone", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -771,7 +771,7 @@ class Timings(commands.Cog): fix_climbing_bypass_gamerule = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["fix-climbing-bypassing-cramming-rule"] if fix_climbing_bypass_gamerule == "false": embed_var.add_field(name="❌ fix-climbing-bypassing-cramming-rule", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -779,7 +779,7 @@ class Timings(commands.Cog): armor_stands_do_collision_entity_lookups = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-do-collision-entity-lookups"] if armor_stands_do_collision_entity_lookups == "true": embed_var.add_field(name="❌ armor-stands-do-collision-entity-lookups", - value="Disable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Disable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -788,7 +788,7 @@ class Timings(commands.Cog): armor_stands_tick = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-tick"] if armor_stands_tick == "true" and "PetBlocks" not in plugins and "BlockBalls" not in plugins and "ArmorStandTools" not in plugins: embed_var.add_field(name="❌ armor-stands-tick", - value="Disable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Disable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -797,7 +797,7 @@ class Timings(commands.Cog): "per-player-mob-spawns"] if per_player_mob_spawns == "false": embed_var.add_field(name="❌ per-player-mob-spawns", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -806,7 +806,7 @@ class Timings(commands.Cog): r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["alt-item-despawn-rate"]["enabled"] if alt_item_despawn_rate_enabled == "false": embed_var.add_field(name="❌ alt-item-despawn-rate.enabled", - value="Enable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -821,12 +821,12 @@ class Timings(commands.Cog): view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) if view_distance >= 4: embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " - "Recommended: " + str(view_distance) + ". And reduce view-distance from default (" + str(view_distance) + ") in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). Recommended: 3.") + value="Set a value in [paper.yml](http://bit.ly/paperconf). " + "Recommended: " + str(view_distance) + ". And reduce view-distance from default (" + str(view_distance) + ") in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") elif int(spigot_view_distance) >= 4: embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). " - "Recommended: " + spigot_view_distance + ". And reduce view-distance in [spigot.yml](https://www.spigotmc.org/wiki/spigot-configuration/). Recommended: 3.") + value="Set a value in [paper.yml](http://bit.ly/paperconf). " + "Recommended: " + spigot_view_distance + ". And reduce view-distance in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") except KeyError: unchecked = unchecked + 1 @@ -835,7 +835,7 @@ class Timings(commands.Cog): already_discovered_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["treasure-maps-return-already-discovered"] if enable_treasure_maps == "true" and already_discovered_maps == "false": embed_var.add_field(name="❌ enable-treasure-maps", - value="Disable this in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html).") + value="Disable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: unchecked = unchecked + 1 @@ -844,7 +844,7 @@ class Timings(commands.Cog): "projectile-load-save-per-chunk-limit"]) if projectile_load_save == -1: embed_var.add_field(name="❌ projectile-load-save-per-chunk-limit", - value="Set a value in [paper.yml](https://paper.readthedocs.io/en/latest/server/configuration.html). Recommended: 8.") + value="Set a value in [paper.yml](http://bit.ly/paperconf). Recommended: 8.") except KeyError: unchecked = unchecked + 1 @@ -853,10 +853,10 @@ class Timings(commands.Cog): plugins = r["timingsMaster"]["plugins"] if use_alternate_keepalive == "false" and "TCPShield" not in plugins: embed_var.add_field(name="❌ use-alternate-keepalive", - value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") if use_alternate_keepalive == "true" and "TCPShield" in plugins: embed_var.add_field(name="❌ use-alternate-keepalive", - value="Disable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). It causes issues with TCPShield.") + value="Disable this in [purpur.yml](http://bit.ly/purpurc). It causes issues with TCPShield.") except KeyError: unchecked = unchecked + 1 @@ -865,7 +865,7 @@ class Timings(commands.Cog): "dont-send-useless-entity-packets"] if dont_send_useless_entity_packets == "false": embed_var.add_field(name="❌ dont-send-useless-entity-packets", - value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") except KeyError: unchecked = unchecked + 1 @@ -875,7 +875,7 @@ class Timings(commands.Cog): "disable-treasure-searching"] if disable_treasure_searching == "false": embed_var.add_field(name="❌ dolphin.disable-treasure-searching", - value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") except KeyError: unchecked = unchecked + 1 @@ -883,7 +883,7 @@ class Timings(commands.Cog): brain_ticks = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["brain-ticks"]) if brain_ticks == 1: embed_var.add_field(name="❌ villager.brain-ticks", - value="Increase this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). " + value="Increase this in [purpur.yml](http://bit.ly/purpurc). " "Recommended: 4.") except KeyError: unchecked = unchecked + 1 @@ -892,7 +892,7 @@ class Timings(commands.Cog): iron_golem_radius = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["radius"]) if iron_golem_radius == 0: embed_var.add_field(name="❌ spawn-iron-golem.radius", - value="Set a value in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). " + value="Set a value in [purpur.yml](http://bit.ly/purpurc). " "Recommended: 32.") except KeyError: unchecked = unchecked + 1 @@ -901,7 +901,7 @@ class Timings(commands.Cog): iron_golem_limit = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["limit"]) if iron_golem_limit == 0: embed_var.add_field(name="❌ spawn-iron-golem.limit", - value="Set a value in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/). " + value="Set a value in [purpur.yml](http://bit.ly/purpurc). " "Recommended: 5.") except KeyError: unchecked = unchecked + 1 @@ -912,7 +912,7 @@ class Timings(commands.Cog): "aggressive-towards-villager-when-lagging"] if aggressive_towards_villager_when_lagging == "true": embed_var.add_field(name="❌ zombie.aggresive-towards-villager-when-lagging", - value="Disable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + value="Disable this in [purpur.yml](http://bit.ly/purpurc).") except KeyError: unchecked = unchecked + 1 @@ -922,7 +922,7 @@ class Timings(commands.Cog): "entities-can-use-portals"] if entities_can_use_portals == "true": embed_var.add_field(name="❌ entities-can-use-portals", - value="Disable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/) to prevent players from creating chunk anchors.") + value="Disable this in [purpur.yml](http://bit.ly/purpurc) to prevent players from creating chunk anchors.") except KeyError: unchecked = unchecked + 1 @@ -931,7 +931,7 @@ class Timings(commands.Cog): "lobotomize"]["enabled"] if lobotomize_enabled == "false": embed_var.add_field(name="❌ villager.lobotomize.enabled", - value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") except KeyError: unchecked = unchecked + 1 @@ -939,7 +939,7 @@ class Timings(commands.Cog): teleport_if_outside_border = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["player"]["teleport-if-outside-border"] if teleport_if_outside_border == "false": embed_var.add_field(name="❌ player.teleport-if-outside-border", - value="Enable this in [purpur.yml](https://pl3xgaming.github.io/PurpurDocs/Configuration/).") + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") except KeyError: unchecked = unchecked + 1 except ValueError: From 6eb8b892fd9f2e6992bc18b81bbe4d04dd93e8ae Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:55:45 -0600 Subject: [PATCH 4/8] Timings - Better error handling --- cogs/timings.py | 1990 ++++++++++++++++++++++++++--------------------- 1 file changed, 1102 insertions(+), 888 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 2b72597..79b5f01 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -10,10 +10,6 @@ class Timings(commands.Cog): # Use @commands.Cog.listener() instead of event and use @commands.command() for commands - # TODO: Add descriptions or hyperlink from the following links - # http://bit.ly/spiconf - # http://bit.ly/paperconf - # http://bit.ly/purpurc async def analyze_timings(self, message): enterless_message = message.content.replace("\n", " ") words = enterless_message.split(" ") @@ -52,900 +48,1118 @@ class Timings(commands.Cog): unchecked = 0 try: - try: - version = r["timingsMaster"]["version"] - if "1.16.4" not in version: - embed_var.add_field(name="❌ Legacy Build", - value="You are using " + version + ". Update to 1.16.4.") - using_yatopia = "yatopia" in r["timingsMaster"]["config"] - if using_yatopia: - embed_var.add_field(name="❌ Yatopia", - value="Yatopia is prone to bugs. " - "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).") - elif "Paper" in version: - embed_var.add_field(name="||❌ Paper||", - value="||Purpur has more optimizations but is generally less supported. " - "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).||") - except KeyError: - unchecked = unchecked + 1 - - try: - online_mode = r["timingsMaster"]["onlinemode"] - bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] - velocity_online_mode = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] - velocity_enabled = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] - - if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): - embed_var.add_field(name="❌ online-mode", - value="Enable this in [server.properties](http://bit.ly/servprop) for security.") - except KeyError: - unchecked = unchecked + 1 - - try: - timing_cost = int(r["timingsMaster"]["system"]["timingcost"]) - if timing_cost > 300: - embed_var.add_field(name="❌ Timingcost", - value="Your timingcost is " + str(timing_cost) + ". Find a [better host](https://www.birdflop.com).") - except KeyError: - unchecked = unchecked + 1 - - try: + version = r["timingsMaster"]["version"] + if "1.16.4" not in version: + embed_var.add_field(name="❌ Legacy Build", + value="You are using " + version + ". Update to 1.16.4.") + using_yatopia = "yatopia" in r["timingsMaster"]["config"] + if using_yatopia: + embed_var.add_field(name="❌ Yatopia", + value="Yatopia is prone to bugs. " + "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).") + elif "Paper" in version: + embed_var.add_field(name="||❌ Paper||", + value="||Purpur has more optimizations but is generally less supported. " + "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).||") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + online_mode = r["timingsMaster"]["onlinemode"] + bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] + velocity_online_mode = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] + velocity_enabled = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] + + if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): + embed_var.add_field(name="❌ online-mode", + value="Enable this in [server.properties](http://bit.ly/servprop) for security.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + timing_cost = int(r["timingsMaster"]["system"]["timingcost"]) + if timing_cost > 300: + embed_var.add_field(name="❌ Timingcost", + value="Your timingcost is " + str(timing_cost) + ". Find a [better host](https://www.birdflop.com).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + jvm_version = r["timingsMaster"]["system"]["jvmversion"] + if jvm_version.startswith("1.8.") or jvm_version.startswith("9.") or jvm_version.startswith("10."): + embed_var.add_field(name="❌ Java Version", + value="You are using Java " + jvm_version + ". Update to [Java 11](https://adoptopenjdk.net/installation.html).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + flags = r["timingsMaster"]["system"]["flags"] + if "-XX:+UseZGC" in flags: jvm_version = r["timingsMaster"]["system"]["jvmversion"] - if jvm_version.startswith("1.8.") or jvm_version.startswith("9.") or jvm_version.startswith("10."): - embed_var.add_field(name="❌ Java Version", - value="You are using Java " + jvm_version + ". Update to [Java 11](https://adoptopenjdk.net/installation.html).") - except KeyError: - unchecked = unchecked + 1 - - try: - flags = r["timingsMaster"]["system"]["flags"] - if "-XX:+UseZGC" in flags: - jvm_version = r["timingsMaster"]["system"]["jvmversion"] - java_version = jvm_version.split(".")[0] - if int(java_version) < 14: - embed_var.add_field(name="❌ Java " + java_version, - value="If you are going to use ZGC, you should also use [Java 14+](https://adoptopenjdk.net/installation.html).") - elif "-Daikars.new.flags=true" in flags: - if "-XX:+PerfDisableSharedMem" not in flags: - embed_var.add_field(name="❌ Outdated Flags", - value="Add `-XX:+PerfDisableSharedMem` to flags") - if "XX:G1MixedGCCountTarget=4" not in flags: - embed_var.add_field(name="❌ Outdated Flags", - value="Add `-XX:G1MixedGCCountTarget=4` to flags") - if "-Xmx" in flags: - max_mem = 0 + java_version = jvm_version.split(".")[0] + if int(java_version) < 14: + embed_var.add_field(name="❌ Java " + java_version, + value="If you are going to use ZGC, you should also use [Java 14+](https://adoptopenjdk.net/installation.html).") + elif "-Daikars.new.flags=true" in flags: + if "-XX:+PerfDisableSharedMem" not in flags: + embed_var.add_field(name="❌ Outdated Flags", + value="Add `-XX:+PerfDisableSharedMem` to flags") + if "XX:G1MixedGCCountTarget=4" not in flags: + embed_var.add_field(name="❌ Outdated Flags", + value="Add `-XX:G1MixedGCCountTarget=4` to flags") + if "-Xmx" in flags: + max_mem = 0 + flaglist = flags.split(" ") + for flag in flaglist: + if flag.startswith("-Xmx"): + max_mem = flag.split("-Xmx")[1] + max_mem = max_mem.replace("G", "000") + max_mem = max_mem.replace("M", "") + max_mem = max_mem.replace("g", "000") + max_mem = max_mem.replace("m", "") + if int(max_mem) < 5400: + embed_var.add_field(name="❌ Low Memory", + value="Allocate at least 6-10GB of ram to your server if you can afford it.") + if "-Xms" in flags: + min_mem = 0 flaglist = flags.split(" ") for flag in flaglist: - if flag.startswith("-Xmx"): - max_mem = flag.split("-Xmx")[1] - max_mem = max_mem.replace("G", "000") - max_mem = max_mem.replace("M", "") - max_mem = max_mem.replace("g", "000") - max_mem = max_mem.replace("m", "") - if int(max_mem) < 5400: - embed_var.add_field(name="❌ Low Memory", - value="Allocate at least 6-10GB of ram to your server if you can afford it.") - if "-Xms" in flags: - min_mem = 0 - flaglist = flags.split(" ") - for flag in flaglist: - if flag.startswith("-Xms"): - min_mem = flag.split("-Xms")[1] - min_mem = min_mem.replace("G", "000") - min_mem = min_mem.replace("M", "") - min_mem = min_mem.replace("g", "000") - min_mem = min_mem.replace("m", "") - if min_mem != max_mem: - embed_var.add_field(name="❌ Aikar's Flags", - value="Your Xmx and Xms values should be equivalent when using Aikar's flags.") - elif "-Dusing.aikars.flags=mcflags.emc.gs" in flags: - embed_var.add_field(name="❌ Outdated Flags", - value="Update [Aikar's flags](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/).") - else: - embed_var.add_field(name="❌ Aikar's Flags", - value="Use [Aikar's flags](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/).") - except KeyError: - unchecked = unchecked + 1 - try: - cpu = int(r["timingsMaster"]["system"]["cpu"]) - if cpu == 1: - embed_var.add_field(name="❌ Threads", - value="You have only " + str(cpu) + " thread. Find a [better host](https://www.birdflop.com).") - if cpu == 2: - embed_var.add_field(name="❌ Threads", - value="You have only " + str(cpu) + " threads. Find a [better host](https://www.birdflop.com).") - except KeyError: - unchecked = unchecked + 1 - - try: + if flag.startswith("-Xms"): + min_mem = flag.split("-Xms")[1] + min_mem = min_mem.replace("G", "000") + min_mem = min_mem.replace("M", "") + min_mem = min_mem.replace("g", "000") + min_mem = min_mem.replace("m", "") + if min_mem != max_mem: + embed_var.add_field(name="❌ Aikar's Flags", + value="Your Xmx and Xms values should be equivalent when using Aikar's flags.") + elif "-Dusing.aikars.flags=mcflags.emc.gs" in flags: + embed_var.add_field(name="❌ Outdated Flags", + value="Update [Aikar's flags](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/).") + else: + embed_var.add_field(name="❌ Aikar's Flags", + value="Use [Aikar's flags](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + try: + cpu = int(r["timingsMaster"]["system"]["cpu"]) + if cpu == 1: + embed_var.add_field(name="❌ Threads", + value="You have only " + str(cpu) + " thread. Find a [better host](https://www.birdflop.com).") + if cpu == 2: + embed_var.add_field(name="❌ Threads", + value="You have only " + str(cpu) + " threads. Find a [better host](https://www.birdflop.com).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + plugins = r["timingsMaster"]["plugins"] + if "ClearLag" in plugins: + embed_var.add_field(name="❌ ClearLag", + value="Plugins that claim to remove lag actually cause more lag. " + "Remove ClearLag.") + if "LagAssist" in plugins: + embed_var.add_field(name="❌ LagAssist", + value="LagAssist should only be used for analytics and preventative measures. " + "All other features of the plugin should be disabled.") + if "NoChunkLag" in plugins: + embed_var.add_field(name="❌ NoChunkLag", + value="Plugins that claim to remove lag actually cause more lag. " + "Remove NoChunkLag.") + if "ServerBooster" in plugins: + embed_var.add_field(name="❌ ServerBooster", + value="Plugins that claim to remove lag actually cause more lag. " + "Remove ServerBooster.") + if "MobLimiter" in plugins: + embed_var.add_field(name="❌ MobLimiter", + value="You probably don't need MobLimiter as Bukkit already has its features. " + "Remove MobLimiter.") + if "BookLimiter" in plugins: + embed_var.add_field(name="❌ BookLimiter", + value="You probably don't need BookLimiter as Paper already has its features. " + "Remove BookLimiter.") + if "LimitPillagers" in plugins: + embed_var.add_field(name="❌ LimitPillagers", + value="You probably don't need LimitPillagers as Paper already adds its features. " + "Remove LimitPillagers.") + if "VillagerOptimiser" in plugins: + embed_var.add_field(name="❌ VillagerOptimiser", + value="You probably don't need VillagerOptimiser as Paper already adds its features. " + "See entity-activation-range in spigot.yml.") + if "StackMob" in plugins: + embed_var.add_field(name="❌ StackMob", + value="Stacking plugins actually cause more lag. " + "Remove StackMob.") + if "Stacker" in plugins: + embed_var.add_field(name="❌ Stacker", + value="Stacking plugins actually cause more lag. " + "Remove Stacker.") + if "MobStacker" in plugins: + embed_var.add_field(name="❌ MobStacker", + value="Stacking plugins actually cause more lag. " + "Remove MobStacker.") + if "WildStacker" in plugins: + embed_var.add_field(name="❌ WildStacker", + value="Stacking plugins actually cause more lag. " + "Remove WildStacker.") + if "SuggestionBlocker" in plugins: + embed_var.add_field(name="❌ SuggestionBlocker", + value="You probably don't need SuggestionBlocker as Spigot already adds its features. " + "Set tab-complete to -1 in [spigot.yml](http://bit.ly/spiconf).") + if "FastAsyncWorldEdit" in plugins: + embed_var.add_field(name="❌ FastAsyncWorldEdit", + value="FAWE can corrupt your world. " + "Consider replacing FAWE with [Worldedit](https://enginehub.org/worldedit/#downloads).") + if "CMI" in plugins: + embed_var.add_field(name="❌ CMI", + value="CMI is a buggy plugin. " + "Consider replacing CMI with [EssentialsX](https://essentialsx.net/downloads.html).") + if "IllegalStack" in plugins: + embed_var.add_field(name="❌ IllegalStack", + value="You probably don't need IllegalStack as Paper already has its features. " + "Remove IllegalStack.") + if "ExploitFixer" in plugins: + embed_var.add_field(name="❌ ExploitFixer", + value="You probably don't need ExploitFixer as Paper already has its features. " + "Remove ExploitFixer.") + if "EntityTrackerFixer" in plugins: + embed_var.add_field(name="❌ EntityTrackerFixer", + value="You don't need EntityTrackerFixer as Paper already has its features. ") + if "Orebfuscator" in plugins: + embed_var.add_field(name="❌ Orebfuscator", + value="You don't need Orebfuscator as Paper already has its features.") + if "ImageOnMap" in plugins: + embed_var.add_field(name="❌ ImageOnMap", + value="This plugin has a [memory leak](https://github.com/zDevelopers/ImageOnMap/issues/104). If it is not essential, you should remove it. " + "Consider replacing it with [an alternative](https://www.spigotmc.org/resources/drmap.87368/).") + if "CrazyActions" in plugins: + embed_var.add_field(name="❌ CrazyAuctions", + value="CrazyAuctions is a laggy plugin, even according to the developer. " + "Consider replacing it with [AuctionHouse](https://www.spigotmc.org/resources/auctionhouse.61836/).") + if "GroupManager" in plugins: + embed_var.add_field(name="❌ GroupManager", + value="GroupManager is an outdated permission plugin. " + "Consider replacing it with [LuckPerms](https://luckperms.net/download).") + if "PermissionsEx" in plugins: + embed_var.add_field(name="❌ PermissionsEx", + value="PermissionsEx is an outdated permission plugin. " + "Consider replacing it with [LuckPerms](https://luckperms.net/download).") + if "bPermissions" in plugins: + embed_var.add_field(name="❌ bPermissions", + value="bPermissions is an outdated permission plugin. " + "Consider replacing it with [LuckPerms](https://luckperms.net/download).") + if "DisableJoinMessage" in plugins and "Essentials" in plugins: + embed_var.add_field(name="❌ DisableJoinMessage", + value="You probably don't need DisableJoinMessage because Essentials already has its features. ") + for plugin in plugins: + if "songoda" in r["timingsMaster"]["plugins"][plugin]["authors"].casefold(): + if plugin == "EpicHeads": + embed_var.add_field(name="❌ EpicHeads", + value="This plugin was made by Songoda. Songoda resources are poorly developed and often cause problems. You should find an alternative such as [HeadsPlus](spigotmc.org/resources/headsplus-»-1-8-1-16-4.40265/) or [HeadDatabase](https://www.spigotmc.org/resources/head-database.14280/).") + elif plugin == "UltimateStacker": + embed_var.add_field(name="❌ UltimateStacker", + value="Stacking plugins actually cause more lag. " + "Remove UltimateStacker.") + else: + embed_var.add_field(name="❌ " + plugin, + value="This plugin was made by Songoda. Songoda resources are poorly developed and often cause problems. You should find an alternative.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + using_purpur = "purpur" in r["timingsMaster"]["config"] + if using_purpur: plugins = r["timingsMaster"]["plugins"] - if "ClearLag" in plugins: - embed_var.add_field(name="❌ ClearLag", - value="Plugins that claim to remove lag actually cause more lag. " - "Remove ClearLag.") - if "LagAssist" in plugins: - embed_var.add_field(name="❌ LagAssist", - value="LagAssist should only be used for analytics and preventative measures. " - "All other features of the plugin should be disabled.") - if "NoChunkLag" in plugins: - embed_var.add_field(name="❌ NoChunkLag", - value="Plugins that claim to remove lag actually cause more lag. " - "Remove NoChunkLag.") - if "ServerBooster" in plugins: - embed_var.add_field(name="❌ ServerBooster", - value="Plugins that claim to remove lag actually cause more lag. " - "Remove ServerBooster.") - if "MobLimiter" in plugins: - embed_var.add_field(name="❌ MobLimiter", - value="You probably don't need MobLimiter as Bukkit already has its features. " - "Remove MobLimiter.") - if "BookLimiter" in plugins: - embed_var.add_field(name="❌ BookLimiter", - value="You probably don't need BookLimiter as Paper already has its features. " - "Remove BookLimiter.") - if "LimitPillagers" in plugins: + if "SilkSpawners" in plugins: + embed_var.add_field(name="❌ SilkSpawners", + value="You probably don't need SilkSpawners as Purpur already has its features. " + "Remove SilkSpawners.") + if "MineableSpawners" in plugins: + embed_var.add_field(name="❌ MineableSpawners", + value="You probably don't need MineableSpawners as Purpur already has its features. " + "Remove MineableSpawners.") + if "VillagerLobotomizatornator" in plugins: embed_var.add_field(name="❌ LimitPillagers", - value="You probably don't need LimitPillagers as Paper already adds its features. " - "Remove LimitPillagers.") - if "VillagerOptimiser" in plugins: - embed_var.add_field(name="❌ VillagerOptimiser", - value="You probably don't need VillagerOptimiser as Paper already adds its features. " - "See entity-activation-range in spigot.yml.") - if "StackMob" in plugins: - embed_var.add_field(name="❌ StackMob", - value="Stacking plugins actually cause more lag. " - "Remove StackMob.") - if "Stacker" in plugins: - embed_var.add_field(name="❌ Stacker", - value="Stacking plugins actually cause more lag. " - "Remove Stacker.") - if "MobStacker" in plugins: - embed_var.add_field(name="❌ MobStacker", - value="Stacking plugins actually cause more lag. " - "Remove MobStacker.") - if "WildStacker" in plugins: - embed_var.add_field(name="❌ WildStacker", - value="Stacking plugins actually cause more lag. " - "Remove WildStacker.") - if "SuggestionBlocker" in plugins: - embed_var.add_field(name="❌ SuggestionBlocker", - value="You probably don't need SuggestionBlocker as Spigot already adds its features. " - "Set tab-complete to -1 in [spigot.yml](http://bit.ly/spiconf).") - if "FastAsyncWorldEdit" in plugins: - embed_var.add_field(name="❌ FastAsyncWorldEdit", - value="FAWE can corrupt your world. " - "Consider replacing FAWE with [Worldedit](https://enginehub.org/worldedit/#downloads).") - if "CMI" in plugins: - embed_var.add_field(name="❌ CMI", - value="CMI is a buggy plugin. " - "Consider replacing CMI with [EssentialsX](https://essentialsx.net/downloads.html).") - if "IllegalStack" in plugins: - embed_var.add_field(name="❌ IllegalStack", - value="You probably don't need IllegalStack as Paper already has its features. " - "Remove IllegalStack.") - if "ExploitFixer" in plugins: - embed_var.add_field(name="❌ ExploitFixer", - value="You probably don't need ExploitFixer as Paper already has its features. " - "Remove ExploitFixer.") - if "EntityTrackerFixer" in plugins: - embed_var.add_field(name="❌ EntityTrackerFixer", - value="You don't need EntityTrackerFixer as Paper already has its features. ") - if "Orebfuscator" in plugins: - embed_var.add_field(name="❌ Orebfuscator", - value="You don't need Orebfuscator as Paper already has its features.") - if "ImageOnMap" in plugins: - embed_var.add_field(name="❌ ImageOnMap", - value="This plugin has a [memory leak](https://github.com/zDevelopers/ImageOnMap/issues/104). If it is not essential, you should remove it. " - "Consider replacing it with [an alternative](https://www.spigotmc.org/resources/drmap.87368/).") - if "CrazyActions" in plugins: - embed_var.add_field(name="❌ CrazyAuctions", - value="CrazyAuctions is a laggy plugin, even according to the developer. " - "Consider replacing it with [AuctionHouse](https://www.spigotmc.org/resources/auctionhouse.61836/).") - if "GroupManager" in plugins: - embed_var.add_field(name="❌ GroupManager", - value="GroupManager is an outdated permission plugin. " - "Consider replacing it with [LuckPerms](https://luckperms.net/download).") - if "PermissionsEx" in plugins: - embed_var.add_field(name="❌ PermissionsEx", - value="PermissionsEx is an outdated permission plugin. " - "Consider replacing it with [LuckPerms](https://luckperms.net/download).") - if "bPermissions" in plugins: - embed_var.add_field(name="❌ bPermissions", - value="bPermissions is an outdated permission plugin. " - "Consider replacing it with [LuckPerms](https://luckperms.net/download).") - if "DisableJoinMessage" in plugins and "Essentials" in plugins: - embed_var.add_field(name="❌ DisableJoinMessage", - value="You probably don't need DisableJoinMessage because Essentials already has its features. ") - for plugin in plugins: - if "songoda" in r["timingsMaster"]["plugins"][plugin]["authors"].casefold(): - if plugin == "EpicHeads": - embed_var.add_field(name="❌ EpicHeads", - value="This plugin was made by Songoda. Songoda resources are poorly developed and often cause problems. You should find an alternative such as [HeadsPlus](spigotmc.org/resources/headsplus-»-1-8-1-16-4.40265/) or [HeadDatabase](https://www.spigotmc.org/resources/head-database.14280/).") - elif plugin == "UltimateStacker": - embed_var.add_field(name="❌ UltimateStacker", - value="Stacking plugins actually cause more lag. " - "Remove UltimateStacker.") - else: - embed_var.add_field(name="❌ " + plugin, - value="This plugin was made by Songoda. Songoda resources are poorly developed and often cause problems. You should find an alternative.") - except KeyError: - unchecked = unchecked + 1 - - try: - using_purpur = "purpur" in r["timingsMaster"]["config"] - if using_purpur: - plugins = r["timingsMaster"]["plugins"] - if "SilkSpawners" in plugins: - embed_var.add_field(name="❌ SilkSpawners", - value="You probably don't need SilkSpawners as Purpur already has its features. " - "Remove SilkSpawners.") - if "MineableSpawners" in plugins: - embed_var.add_field(name="❌ MineableSpawners", - value="You probably don't need MineableSpawners as Purpur already has its features. " - "Remove MineableSpawners.") - if "VillagerLobotomizatornator" in plugins: - embed_var.add_field(name="❌ LimitPillagers", - value="You probably don't need VillagerLobotomizatornator as Purpur already adds its features. " - "Enable villager.lobotomize.enabled in [purpur.yml](http://bit.ly/purpurc).") - except KeyError: - unchecked = unchecked + 1 - - try: - plugins = r["timingsMaster"]["plugins"] - if "PhantomSMP" in plugins: - phantoms_only_insomniacs = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "phantoms-only-attack-insomniacs"] - if phantoms_only_insomniacs == "false": - embed_var.add_field(name="❌ PhantomSMP", - value="You probably don't need PhantomSMP as Paper already has its features. " - "Remove PhantomSMP.") - else: - embed_var.add_field(name="❌ PhantomSMP", - value="You probably don't need PhantomSMP as Paper already has its features. " - "Enable phantoms-only-attack-insomniacs in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - network_compression_threshold = int( - r["timingsMaster"]["config"]["server.properties"]["network-compression-threshold"]) - bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] - if network_compression_threshold <= 256 and bungeecord == "false": - embed_var.add_field(name="❌ network-compression-threshold", - value="Increase this in [server.properties](http://bit.ly/servprop). Recommended: 512.") - if network_compression_threshold != -1 and bungeecord == "true": - embed_var.add_field(name="❌ network-compression-threshold", - value="Set this to -1 in [server.properties](http://bit.ly/servprop) for a bungee server like yours.") - except KeyError: - unchecked = unchecked + 1 - - try: - spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] + value="You probably don't need VillagerLobotomizatornator as Purpur already adds its features. " + "Enable villager.lobotomize.enabled in [purpur.yml](http://bit.ly/purpurc).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + plugins = r["timingsMaster"]["plugins"] + if "PhantomSMP" in plugins: + phantoms_only_insomniacs = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + "phantoms-only-attack-insomniacs"] + if phantoms_only_insomniacs == "false": + embed_var.add_field(name="❌ PhantomSMP", + value="You probably don't need PhantomSMP as Paper already has its features. " + "Remove PhantomSMP.") + else: + embed_var.add_field(name="❌ PhantomSMP", + value="You probably don't need PhantomSMP as Paper already has its features. " + "Enable phantoms-only-attack-insomniacs in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + network_compression_threshold = int( + r["timingsMaster"]["config"]["server.properties"]["network-compression-threshold"]) + bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] + if network_compression_threshold <= 256 and bungeecord == "false": + embed_var.add_field(name="❌ network-compression-threshold", + value="Increase this in [server.properties](http://bit.ly/servprop). Recommended: 512.") + if network_compression_threshold != -1 and bungeecord == "true": + embed_var.add_field(name="❌ network-compression-threshold", + value="Set this to -1 in [server.properties](http://bit.ly/servprop) for a bungee server like yours.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] + view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) + if view_distance >= 10 and spigot_view_distance == "default": + embed_var.add_field(name="❌ view-distance", + value="Decrease this from default (10) in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 3.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + chunk_gc_period = int(r["timingsMaster"]["config"]["bukkit"]["chunk-gc"]["period-in-ticks"]) + if chunk_gc_period >= 600: + embed_var.add_field(name="❌ chunk-gc.period-in-ticks", + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 400.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + ticks_per_monster_spawns = int(r["timingsMaster"]["config"]["bukkit"]["ticks-per"]["monster-spawns"]) + if ticks_per_monster_spawns == 1: + embed_var.add_field(name="❌ ticks-per.monster-spawns", + value="Increase this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 4.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + monsters_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["monsters"]) + if monsters_spawn_limit >= 70: + embed_var.add_field(name="❌ spawn-limits.monsters", + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 15.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + water_ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-ambient"]) + if water_ambient_spawn_limit >= 20: + embed_var.add_field(name="❌ spawn-limits.water-ambient", + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["ambient"]) + if ambient_spawn_limit >= 15: + embed_var.add_field(name="❌ spawn-limits.ambient", + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 1.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["animals"]) + if animals_spawn_limit >= 10: + embed_var.add_field(name="❌ spawn-limits.animals", + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 3.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + water_animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-animals"]) + if water_animals_spawn_limit >= 15: + embed_var.add_field(name="❌ spawn-limits.water-animals", + value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + mob_spawn_range = int(r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["mob-spawn-range"]) + spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] + if spigot_view_distance == "default": view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) - if view_distance >= 10 and spigot_view_distance == "default": - embed_var.add_field(name="❌ view-distance", - value="Decrease this from default (10) in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 3.") - except KeyError: - unchecked = unchecked + 1 - - try: - chunk_gc_period = int(r["timingsMaster"]["config"]["bukkit"]["chunk-gc"]["period-in-ticks"]) - if chunk_gc_period >= 600: - embed_var.add_field(name="❌ chunk-gc.period-in-ticks", - value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 400.") - except KeyError: - unchecked = unchecked + 1 - - try: - ticks_per_monster_spawns = int(r["timingsMaster"]["config"]["bukkit"]["ticks-per"]["monster-spawns"]) - if ticks_per_monster_spawns == 1: - embed_var.add_field(name="❌ ticks-per.monster-spawns", - value="Increase this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 4.") - except KeyError: - unchecked = unchecked + 1 - - try: - monsters_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["monsters"]) - if monsters_spawn_limit >= 70: - embed_var.add_field(name="❌ spawn-limits.monsters", - value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 15.") - except KeyError: - unchecked = unchecked + 1 - - try: - water_ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-ambient"]) - if water_ambient_spawn_limit >= 20: - embed_var.add_field(name="❌ spawn-limits.water-ambient", - value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") - except KeyError: - unchecked = unchecked + 1 - - try: - ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["ambient"]) - if ambient_spawn_limit >= 15: - embed_var.add_field(name="❌ spawn-limits.ambient", - value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 1.") - except KeyError: - unchecked = unchecked + 1 - - try: - animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["animals"]) - if animals_spawn_limit >= 10: - embed_var.add_field(name="❌ spawn-limits.animals", - value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 3.") - except KeyError: - unchecked = unchecked + 1 - - try: - water_animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-animals"]) - if water_animals_spawn_limit >= 15: - embed_var.add_field(name="❌ spawn-limits.water-animals", - value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") - except KeyError: - unchecked = unchecked + 1 - - try: - mob_spawn_range = int(r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["mob-spawn-range"]) - spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] - if spigot_view_distance == "default": - view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) - if mob_spawn_range >= 8 and view_distance <= 6: + if mob_spawn_range >= 8 and view_distance <= 6: + embed_var.add_field(name="❌ mob-spawn-range", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: " + str(view_distance - 1) + ".") + elif mob_spawn_range >= 8 and int(spigot_view_distance) <= 6: embed_var.add_field(name="❌ mob-spawn-range", value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: " + str(view_distance - 1) + ".") - elif mob_spawn_range >= 8 and int(spigot_view_distance) <= 6: - embed_var.add_field(name="❌ mob-spawn-range", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: " + str(int(spigot_view_distance) - 1) + ".") - except KeyError: - unchecked = unchecked + 1 - - try: - animals_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "animals"]) - if animals_entity_activation_range >= 32: - embed_var.add_field(name="❌ entity-activation-range.animals", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 6.") - except KeyError: - unchecked = unchecked + 1 - - try: - monsters_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "monsters"]) - if monsters_entity_activation_range >= 32: - embed_var.add_field(name="❌ entity-activation-range.monsters", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 16.") - except KeyError: - unchecked = unchecked + 1 - - try: - raiders_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "raiders"]) - except KeyError: - unchecked = unchecked + 1 - - try: - misc_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["misc"]) - if misc_entity_activation_range >= 16: - embed_var.add_field(name="❌ entity-activation-range.misc", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 4.") - except KeyError: - unchecked = unchecked + 1 - - try: - water_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["water"]) - if water_entity_activation_range >= 16: - embed_var.add_field(name="❌ entity-activation-range.water", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 12.") - except KeyError: - unchecked = unchecked + 1 - - try: - villagers_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "villagers"]) - if villagers_entity_activation_range >= 32: - embed_var.add_field(name="❌ entity-activation-range.villagers", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 16.") - except KeyError: - unchecked = unchecked + 1 - - try: - flying_monsters_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "flying-monsters"]) - except KeyError: - unchecked = unchecked + 1 - - try: - tick_inactive_villagers = \ - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "tick-inactive-villagers"] - if tick_inactive_villagers == "true": - embed_var.add_field(name="❌ tick-inactive-villagers", - value="Disable this in [spigot.yml](http://bit.ly/spiconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - nerf_spawner_mobs = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["nerf-spawner-mobs"] - if nerf_spawner_mobs == "false": - embed_var.add_field(name="❌ nerf-spawner-mobs", - value="Enable this in [spigot.yml](http://bit.ly/spiconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_villagers_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["villagers-every"]) - except KeyError: - unchecked = unchecked + 1 - try: - wake_up_inactive_villagers_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["villagers-for"]) - if wake_up_inactive_villagers_for >= 100: - embed_var.add_field(name="❌ wake-up-inactive.villagers-for", - value="Decrease this in spigot.yml. " - "Recommended: 20.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_flying_monsters_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["flying-monsters-for"]) - if wake_up_inactive_flying_monsters_for >= 100: - embed_var.add_field(name="❌ wake-up-inactive.flying-monsters-for", - value="Decrease this in spigot.yml. " - "Recommended: 60.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_animals_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["animals-every"]) - - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_villagers_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["villagers-max-per-tick"]) - if wake_up_inactive_villagers_max_per_tick >= 4: - embed_var.add_field(name="❌ wake-up-inactive.villagers-max-per-tick", - value="Decrease this in spigot.yml. " - "Recommended: 1.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_animals_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["animals-for"]) - if wake_up_inactive_animals_for >= 100: - embed_var.add_field(name="❌ wake-up-inactive.animals-for", - value="Decrease this in spigot.yml. " - "Recommended: 40.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_monsters_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["monsters-max-per-tick"]) - if wake_up_inactive_monsters_max_per_tick >= 8: - embed_var.add_field(name="❌ wake-up-inactive.monsters-max-per-tick", - value="Decrease this in spigot.yml. " - "Recommended: 4.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_flying_monsters_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["flying-monsters-max-per-tick"]) - if wake_up_inactive_flying_monsters_max_per_tick >= 8: - embed_var.add_field(name="❌ wake-up-inactive.flying-monsters-max-per-tick", - value="Decrease this in spigot.yml. " - "Recommended: 1.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_flying_monsters_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["flying-monsters-every"]) - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_monsters_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["monsters-every"]) - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_animals_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["animals-max-per-tick"]) - if wake_up_inactive_animals_max_per_tick >= 4: - embed_var.add_field(name="❌ wake-up-inactive.animals-max-per-tick", - value="Decrease this in spigot.yml. " - "Recommended: 2.") - except KeyError: - unchecked = unchecked + 1 - - try: - wake_up_inactive_monsters_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ - "wake-up-inactive"]["monsters-for"]) - if wake_up_inactive_monsters_for >= 100: - embed_var.add_field(name="❌ wake-up-inactive.monsters-for", - value="Decrease this in spigot.yml. " - "Recommended: 60.") - except KeyError: - unchecked = unchecked + 1 - - try: - arrow_despawn_rate = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["arrow-despawn-rate"]) - if arrow_despawn_rate >= 1200: - embed_var.add_field(name="❌ arrow-despawn-rate", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 300.") - except KeyError: - unchecked = unchecked + 1 - - try: - item_merge_radius = float( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["item"]) - if item_merge_radius <= 2.5: - embed_var.add_field(name="❌ merge-radius.item", - value="Increase this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 4.0.") - except KeyError: - unchecked = unchecked + 1 - - try: - exp_merge_radius = float( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["exp"]) - if exp_merge_radius <= 3.0: - embed_var.add_field(name="❌ merge-radius.exp", - value="Increase this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 6.0.") - except KeyError: - unchecked = unchecked + 1 - - try: - max_entity_collisions = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["max-entity-collisions"]) - if max_entity_collisions >= 8: - embed_var.add_field(name="❌ max-entity-collisions", - value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " - "Recommended: 2.") - except KeyError: - unchecked = unchecked + 1 - - try: - max_auto_save_chunks_per_tick = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["max-auto-save-chunks-per-tick"]) - if max_auto_save_chunks_per_tick >= 24: - embed_var.add_field(name="❌ max-auto-save-chunks-per-tick", - value="Decrease this in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 6.") - except KeyError: - unchecked = unchecked + 1 - - try: - optimize_explosions = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "optimize-explosions"] - if optimize_explosions == "false": - embed_var.add_field(name="❌ optimize-explosions", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - mob_spawner_tick_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["mob-spawner-tick-rate"]) - if mob_spawner_tick_rate == 1: - embed_var.add_field(name="❌ mob-spawner-tick-rate", - value="Increase this in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 2.") - except KeyError: - unchecked = unchecked + 1 - - try: - disable_chest_cat_detection = \ - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["game-mechanics"][ - "disable-chest-cat-detection"] - if disable_chest_cat_detection == "false": - embed_var.add_field(name="❌ disable-chest-cat-detection", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - container_update_tick_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["container-update-tick-rate"]) - if container_update_tick_rate == "false": - embed_var.add_field(name="❌ container-update-tick-rate", - value="Increase this in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 3.") - except KeyError: - unchecked = unchecked + 1 - - try: - grass_spread_tick_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["grass-spread-tick-rate"]) - if grass_spread_tick_rate == 1: - embed_var.add_field(name="❌ grass-spread-tick-rate", - value="Increase this in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 4") - except KeyError: - unchecked = unchecked + 1 - - try: - soft_despawn_range = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) - if soft_despawn_range >= 32: - embed_var.add_field(name="❌ despawn-ranges.soft", - value="Decrease this in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 28") - except KeyError: - unchecked = unchecked + 1 - - try: - hard_despawn_range = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) - if hard_despawn_range >= 128: - embed_var.add_field(name="❌ despawn-ranges.hard", - value="Decrease this in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 48") - except KeyError: - unchecked = unchecked + 1 - - try: - hopper_disable_move_event = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["hopper"][ - "disable-move-event"] - if hopper_disable_move_event == "false": - embed_var.add_field(name="❌ hopper.disable-move-event", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - non_player_arrow_despawn_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["non-player-arrow-despawn-rate"]) - if non_player_arrow_despawn_rate == -1: - embed_var.add_field(name="❌ non-player-arrow-despawn-rate", - value="Set a value in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 60") - except KeyError: - unchecked = unchecked + 1 - - try: - creative_arrow_despawn_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["creative-arrow-despawn-rate"]) - if creative_arrow_despawn_rate == -1: - embed_var.add_field(name="❌ creative-arrow-despawn-rate", - value="Set a value in [paper.yml](http://bit.ly/paperconf). " - "Recommended: 60") - except KeyError: - unchecked = unchecked + 1 - - try: - prevent_moving_into_unloaded_chunks = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "prevent-moving-into-unloaded-chunks"] - if prevent_moving_into_unloaded_chunks == "false": - embed_var.add_field(name="❌ prevent-moving-into-unloaded-chunks", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - eigencraft_redstone = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "use-faster-eigencraft-redstone"] - if eigencraft_redstone == "false": - embed_var.add_field(name="❌ use-faster-eigencraft-redstone", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - fix_climbing_bypass_gamerule = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["fix-climbing-bypassing-cramming-rule"] - if fix_climbing_bypass_gamerule == "false": - embed_var.add_field(name="❌ fix-climbing-bypassing-cramming-rule", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - armor_stands_do_collision_entity_lookups = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-do-collision-entity-lookups"] - if armor_stands_do_collision_entity_lookups == "true": - embed_var.add_field(name="❌ armor-stands-do-collision-entity-lookups", - value="Disable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - plugins = r["timingsMaster"]["plugins"] - armor_stands_tick = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-tick"] - if armor_stands_tick == "true" and "PetBlocks" not in plugins and "BlockBalls" not in plugins and "ArmorStandTools" not in plugins: - embed_var.add_field(name="❌ armor-stands-tick", - value="Disable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - per_player_mob_spawns = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "per-player-mob-spawns"] - if per_player_mob_spawns == "false": - embed_var.add_field(name="❌ per-player-mob-spawns", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - alt_item_despawn_rate_enabled = \ - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["alt-item-despawn-rate"]["enabled"] - if alt_item_despawn_rate_enabled == "false": - embed_var.add_field(name="❌ alt-item-despawn-rate.enabled", - value="Enable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - no_tick_view_distance = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["viewdistances"][ - "no-tick-view-distance"]) - if no_tick_view_distance == -1: - spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"][ - "view-distance"] - if spigot_view_distance == "default": - view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) - if view_distance >= 4: - embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in [paper.yml](http://bit.ly/paperconf). " - "Recommended: " + str(view_distance) + ". And reduce view-distance from default (" + str(view_distance) + ") in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") - elif int(spigot_view_distance) >= 4: + "Recommended: " + str(int(spigot_view_distance) - 1) + ".") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + animals_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "animals"]) + if animals_entity_activation_range >= 32: + embed_var.add_field(name="❌ entity-activation-range.animals", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 6.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + monsters_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "monsters"]) + if monsters_entity_activation_range >= 32: + embed_var.add_field(name="❌ entity-activation-range.monsters", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 16.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + raiders_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "raiders"]) + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + misc_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["misc"]) + if misc_entity_activation_range >= 16: + embed_var.add_field(name="❌ entity-activation-range.misc", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 4.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + water_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["water"]) + if water_entity_activation_range >= 16: + embed_var.add_field(name="❌ entity-activation-range.water", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 12.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + villagers_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "villagers"]) + if villagers_entity_activation_range >= 32: + embed_var.add_field(name="❌ entity-activation-range.villagers", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 16.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + flying_monsters_entity_activation_range = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "flying-monsters"]) + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + tick_inactive_villagers = \ + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "tick-inactive-villagers"] + if tick_inactive_villagers == "true": + embed_var.add_field(name="❌ tick-inactive-villagers", + value="Disable this in [spigot.yml](http://bit.ly/spiconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + nerf_spawner_mobs = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["nerf-spawner-mobs"] + if nerf_spawner_mobs == "false": + embed_var.add_field(name="❌ nerf-spawner-mobs", + value="Enable this in [spigot.yml](http://bit.ly/spiconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_villagers_every = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["villagers-every"]) + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + try: + wake_up_inactive_villagers_for = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["villagers-for"]) + if wake_up_inactive_villagers_for >= 100: + embed_var.add_field(name="❌ wake-up-inactive.villagers-for", + value="Decrease this in spigot.yml. " + "Recommended: 20.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_flying_monsters_for = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["flying-monsters-for"]) + if wake_up_inactive_flying_monsters_for >= 100: + embed_var.add_field(name="❌ wake-up-inactive.flying-monsters-for", + value="Decrease this in spigot.yml. " + "Recommended: 60.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_animals_every = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["animals-every"]) + + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_villagers_max_per_tick = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["villagers-max-per-tick"]) + if wake_up_inactive_villagers_max_per_tick >= 4: + embed_var.add_field(name="❌ wake-up-inactive.villagers-max-per-tick", + value="Decrease this in spigot.yml. " + "Recommended: 1.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_animals_for = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["animals-for"]) + if wake_up_inactive_animals_for >= 100: + embed_var.add_field(name="❌ wake-up-inactive.animals-for", + value="Decrease this in spigot.yml. " + "Recommended: 40.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_monsters_max_per_tick = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["monsters-max-per-tick"]) + if wake_up_inactive_monsters_max_per_tick >= 8: + embed_var.add_field(name="❌ wake-up-inactive.monsters-max-per-tick", + value="Decrease this in spigot.yml. " + "Recommended: 4.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_flying_monsters_max_per_tick = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["flying-monsters-max-per-tick"]) + if wake_up_inactive_flying_monsters_max_per_tick >= 8: + embed_var.add_field(name="❌ wake-up-inactive.flying-monsters-max-per-tick", + value="Decrease this in spigot.yml. " + "Recommended: 1.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_flying_monsters_every = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["flying-monsters-every"]) + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_monsters_every = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["monsters-every"]) + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_animals_max_per_tick = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["animals-max-per-tick"]) + if wake_up_inactive_animals_max_per_tick >= 4: + embed_var.add_field(name="❌ wake-up-inactive.animals-max-per-tick", + value="Decrease this in spigot.yml. " + "Recommended: 2.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + wake_up_inactive_monsters_for = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + "wake-up-inactive"]["monsters-for"]) + if wake_up_inactive_monsters_for >= 100: + embed_var.add_field(name="❌ wake-up-inactive.monsters-for", + value="Decrease this in spigot.yml. " + "Recommended: 60.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + arrow_despawn_rate = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["arrow-despawn-rate"]) + if arrow_despawn_rate >= 1200: + embed_var.add_field(name="❌ arrow-despawn-rate", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 300.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + item_merge_radius = float( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["item"]) + if item_merge_radius <= 2.5: + embed_var.add_field(name="❌ merge-radius.item", + value="Increase this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 4.0.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + exp_merge_radius = float( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["exp"]) + if exp_merge_radius <= 3.0: + embed_var.add_field(name="❌ merge-radius.exp", + value="Increase this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 6.0.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + max_entity_collisions = int( + r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["max-entity-collisions"]) + if max_entity_collisions >= 8: + embed_var.add_field(name="❌ max-entity-collisions", + value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " + "Recommended: 2.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + max_auto_save_chunks_per_tick = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["max-auto-save-chunks-per-tick"]) + if max_auto_save_chunks_per_tick >= 24: + embed_var.add_field(name="❌ max-auto-save-chunks-per-tick", + value="Decrease this in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 6.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + optimize_explosions = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + "optimize-explosions"] + if optimize_explosions == "false": + embed_var.add_field(name="❌ optimize-explosions", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + mob_spawner_tick_rate = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["mob-spawner-tick-rate"]) + if mob_spawner_tick_rate == 1: + embed_var.add_field(name="❌ mob-spawner-tick-rate", + value="Increase this in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 2.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + disable_chest_cat_detection = \ + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["game-mechanics"][ + "disable-chest-cat-detection"] + if disable_chest_cat_detection == "false": + embed_var.add_field(name="❌ disable-chest-cat-detection", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + container_update_tick_rate = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["container-update-tick-rate"]) + if container_update_tick_rate == "false": + embed_var.add_field(name="❌ container-update-tick-rate", + value="Increase this in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 3.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + grass_spread_tick_rate = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["grass-spread-tick-rate"]) + if grass_spread_tick_rate == 1: + embed_var.add_field(name="❌ grass-spread-tick-rate", + value="Increase this in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 4") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + soft_despawn_range = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) + if soft_despawn_range >= 32: + embed_var.add_field(name="❌ despawn-ranges.soft", + value="Decrease this in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 28") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + hard_despawn_range = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) + if hard_despawn_range >= 128: + embed_var.add_field(name="❌ despawn-ranges.hard", + value="Decrease this in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 48") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + hopper_disable_move_event = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["hopper"][ + "disable-move-event"] + if hopper_disable_move_event == "false": + embed_var.add_field(name="❌ hopper.disable-move-event", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + non_player_arrow_despawn_rate = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["non-player-arrow-despawn-rate"]) + if non_player_arrow_despawn_rate == -1: + embed_var.add_field(name="❌ non-player-arrow-despawn-rate", + value="Set a value in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 60") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + creative_arrow_despawn_rate = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["creative-arrow-despawn-rate"]) + if creative_arrow_despawn_rate == -1: + embed_var.add_field(name="❌ creative-arrow-despawn-rate", + value="Set a value in [paper.yml](http://bit.ly/paperconf). " + "Recommended: 60") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + prevent_moving_into_unloaded_chunks = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + "prevent-moving-into-unloaded-chunks"] + if prevent_moving_into_unloaded_chunks == "false": + embed_var.add_field(name="❌ prevent-moving-into-unloaded-chunks", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + eigencraft_redstone = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + "use-faster-eigencraft-redstone"] + if eigencraft_redstone == "false": + embed_var.add_field(name="❌ use-faster-eigencraft-redstone", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + fix_climbing_bypass_gamerule = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["fix-climbing-bypassing-cramming-rule"] + if fix_climbing_bypass_gamerule == "false": + embed_var.add_field(name="❌ fix-climbing-bypassing-cramming-rule", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + armor_stands_do_collision_entity_lookups = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-do-collision-entity-lookups"] + if armor_stands_do_collision_entity_lookups == "true": + embed_var.add_field(name="❌ armor-stands-do-collision-entity-lookups", + value="Disable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + plugins = r["timingsMaster"]["plugins"] + armor_stands_tick = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-tick"] + if armor_stands_tick == "true" and "PetBlocks" not in plugins and "BlockBalls" not in plugins and "ArmorStandTools" not in plugins: + embed_var.add_field(name="❌ armor-stands-tick", + value="Disable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + per_player_mob_spawns = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + "per-player-mob-spawns"] + if per_player_mob_spawns == "false": + embed_var.add_field(name="❌ per-player-mob-spawns", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + alt_item_despawn_rate_enabled = \ + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["alt-item-despawn-rate"]["enabled"] + if alt_item_despawn_rate_enabled == "false": + embed_var.add_field(name="❌ alt-item-despawn-rate.enabled", + value="Enable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + no_tick_view_distance = int( + r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["viewdistances"][ + "no-tick-view-distance"]) + if no_tick_view_distance == -1: + spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"][ + "view-distance"] + if spigot_view_distance == "default": + view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) + if view_distance >= 4: embed_var.add_field(name="❌ no-tick-view-distance", value="Set a value in [paper.yml](http://bit.ly/paperconf). " - "Recommended: " + spigot_view_distance + ". And reduce view-distance in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") - except KeyError: - unchecked = unchecked + 1 - - try: - enable_treasure_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["enable-treasure-maps"] - already_discovered_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["treasure-maps-return-already-discovered"] - if enable_treasure_maps == "true" and already_discovered_maps == "false": - embed_var.add_field(name="❌ enable-treasure-maps", - value="Disable this in [paper.yml](http://bit.ly/paperconf).") - except KeyError: - unchecked = unchecked + 1 - - try: - projectile_load_save = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ - "projectile-load-save-per-chunk-limit"]) - if projectile_load_save == -1: - embed_var.add_field(name="❌ projectile-load-save-per-chunk-limit", - value="Set a value in [paper.yml](http://bit.ly/paperconf). Recommended: 8.") - except KeyError: - unchecked = unchecked + 1 - - try: - use_alternate_keepalive = r["timingsMaster"]["config"]["purpur"]["settings"]["use-alternate-keepalive"] - plugins = r["timingsMaster"]["plugins"] - if use_alternate_keepalive == "false" and "TCPShield" not in plugins: - embed_var.add_field(name="❌ use-alternate-keepalive", - value="Enable this in [purpur.yml](http://bit.ly/purpurc).") - if use_alternate_keepalive == "true" and "TCPShield" in plugins: - embed_var.add_field(name="❌ use-alternate-keepalive", - value="Disable this in [purpur.yml](http://bit.ly/purpurc). It causes issues with TCPShield.") - except KeyError: - unchecked = unchecked + 1 - - try: - dont_send_useless_entity_packets = r["timingsMaster"]["config"]["purpur"]["settings"][ - "dont-send-useless-entity-packets"] - if dont_send_useless_entity_packets == "false": - embed_var.add_field(name="❌ dont-send-useless-entity-packets", - value="Enable this in [purpur.yml](http://bit.ly/purpurc).") - except KeyError: - unchecked = unchecked + 1 - - try: - disable_treasure_searching = \ - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["dolphin"][ - "disable-treasure-searching"] - if disable_treasure_searching == "false": - embed_var.add_field(name="❌ dolphin.disable-treasure-searching", - value="Enable this in [purpur.yml](http://bit.ly/purpurc).") - except KeyError: - unchecked = unchecked + 1 - - try: - brain_ticks = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["brain-ticks"]) - if brain_ticks == 1: - embed_var.add_field(name="❌ villager.brain-ticks", - value="Increase this in [purpur.yml](http://bit.ly/purpurc). " - "Recommended: 4.") - except KeyError: - unchecked = unchecked + 1 - - try: - iron_golem_radius = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["radius"]) - if iron_golem_radius == 0: - embed_var.add_field(name="❌ spawn-iron-golem.radius", - value="Set a value in [purpur.yml](http://bit.ly/purpurc). " - "Recommended: 32.") - except KeyError: - unchecked = unchecked + 1 - - try: - iron_golem_limit = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["limit"]) - if iron_golem_limit == 0: - embed_var.add_field(name="❌ spawn-iron-golem.limit", - value="Set a value in [purpur.yml](http://bit.ly/purpurc). " - "Recommended: 5.") - except KeyError: - unchecked = unchecked + 1 - - try: - aggressive_towards_villager_when_lagging = \ - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["zombie"][ - "aggressive-towards-villager-when-lagging"] - if aggressive_towards_villager_when_lagging == "true": - embed_var.add_field(name="❌ zombie.aggresive-towards-villager-when-lagging", - value="Disable this in [purpur.yml](http://bit.ly/purpurc).") - except KeyError: - unchecked = unchecked + 1 - - try: - entities_can_use_portals = \ - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"][ - "entities-can-use-portals"] - if entities_can_use_portals == "true": - embed_var.add_field(name="❌ entities-can-use-portals", - value="Disable this in [purpur.yml](http://bit.ly/purpurc) to prevent players from creating chunk anchors.") - except KeyError: - unchecked = unchecked + 1 - - try: - lobotomize_enabled = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ - "lobotomize"]["enabled"] - if lobotomize_enabled == "false": - embed_var.add_field(name="❌ villager.lobotomize.enabled", - value="Enable this in [purpur.yml](http://bit.ly/purpurc).") - except KeyError: - unchecked = unchecked + 1 - - try: - teleport_if_outside_border = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["player"]["teleport-if-outside-border"] - if teleport_if_outside_border == "false": - embed_var.add_field(name="❌ player.teleport-if-outside-border", - value="Enable this in [purpur.yml](http://bit.ly/purpurc).") - except KeyError: - unchecked = unchecked + 1 - except ValueError: - embed_var.add_field(name="❌ Invalid Configuration", - value="At least one of your configuration files had an invalid data type.") - except TypeError: + "Recommended: " + str(view_distance) + ". And reduce view-distance from default (" + str(view_distance) + ") in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") + elif int(spigot_view_distance) >= 4: + embed_var.add_field(name="❌ no-tick-view-distance", + value="Set a value in [paper.yml](http://bit.ly/paperconf). " + "Recommended: " + spigot_view_distance + ". And reduce view-distance in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + enable_treasure_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["enable-treasure-maps"] + already_discovered_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["treasure-maps-return-already-discovered"] + if enable_treasure_maps == "true" and already_discovered_maps == "false": + embed_var.add_field(name="❌ enable-treasure-maps", + value="Disable this in [paper.yml](http://bit.ly/paperconf).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + projectile_load_save = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + "projectile-load-save-per-chunk-limit"]) + if projectile_load_save == -1: + embed_var.add_field(name="❌ projectile-load-save-per-chunk-limit", + value="Set a value in [paper.yml](http://bit.ly/paperconf). Recommended: 8.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + use_alternate_keepalive = r["timingsMaster"]["config"]["purpur"]["settings"]["use-alternate-keepalive"] + plugins = r["timingsMaster"]["plugins"] + if use_alternate_keepalive == "false" and "TCPShield" not in plugins: + embed_var.add_field(name="❌ use-alternate-keepalive", + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") + if use_alternate_keepalive == "true" and "TCPShield" in plugins: + embed_var.add_field(name="❌ use-alternate-keepalive", + value="Disable this in [purpur.yml](http://bit.ly/purpurc). It causes issues with TCPShield.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + dont_send_useless_entity_packets = r["timingsMaster"]["config"]["purpur"]["settings"][ + "dont-send-useless-entity-packets"] + if dont_send_useless_entity_packets == "false": + embed_var.add_field(name="❌ dont-send-useless-entity-packets", + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + disable_treasure_searching = \ + r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["dolphin"][ + "disable-treasure-searching"] + if disable_treasure_searching == "false": + embed_var.add_field(name="❌ dolphin.disable-treasure-searching", + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + brain_ticks = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["brain-ticks"]) + if brain_ticks == 1: + embed_var.add_field(name="❌ villager.brain-ticks", + value="Increase this in [purpur.yml](http://bit.ly/purpurc). " + "Recommended: 4.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + iron_golem_radius = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["radius"]) + if iron_golem_radius == 0: + embed_var.add_field(name="❌ spawn-iron-golem.radius", + value="Set a value in [purpur.yml](http://bit.ly/purpurc). " + "Recommended: 32.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + iron_golem_limit = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["limit"]) + if iron_golem_limit == 0: + embed_var.add_field(name="❌ spawn-iron-golem.limit", + value="Set a value in [purpur.yml](http://bit.ly/purpurc). " + "Recommended: 5.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + aggressive_towards_villager_when_lagging = \ + r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["zombie"][ + "aggressive-towards-villager-when-lagging"] + if aggressive_towards_villager_when_lagging == "true": + embed_var.add_field(name="❌ zombie.aggresive-towards-villager-when-lagging", + value="Disable this in [purpur.yml](http://bit.ly/purpurc).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + entities_can_use_portals = \ + r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"][ + "entities-can-use-portals"] + if entities_can_use_portals == "true": + embed_var.add_field(name="❌ entities-can-use-portals", + value="Disable this in [purpur.yml](http://bit.ly/purpurc) to prevent players from creating chunk anchors.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + lobotomize_enabled = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ + "lobotomize"]["enabled"] + if lobotomize_enabled == "false": + embed_var.add_field(name="❌ villager.lobotomize.enabled", + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + teleport_if_outside_border = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["player"]["teleport-if-outside-border"] + if teleport_if_outside_border == "false": + embed_var.add_field(name="❌ player.teleport-if-outside-border", + value="Enable this in [purpur.yml](http://bit.ly/purpurc).") + except KeyError: + unchecked = unchecked + 1 + except: embed_var.add_field(name="❌ Invalid Configuration", value="At least one of your configuration files had an invalid data type.") From aa410578dfe4b51f6b36778746384152c73c1f3b Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 12 Jan 2021 16:02:20 -0600 Subject: [PATCH 5/8] Update timings.py --- cogs/timings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 79b5f01..341f64f 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -22,7 +22,7 @@ class Timings(commands.Cog): "https://timings.spigotmc.org/?url="): embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) embed_var.add_field(name="❌ Spigot", - value="Spigot timings have limited information. Upgrade to [Purpur](https://purpur.pl3x.net/downloads/#1.16.4) for the most accurate timings analysis.") + value="Spigot timings have limited information. Upgrade to [Purpur](https://purpur.pl3x.net/downloads) for the most accurate timings analysis.") embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) embed_var.url = timings_url await message.reply(embed=embed_var) @@ -56,11 +56,11 @@ class Timings(commands.Cog): if using_yatopia: embed_var.add_field(name="❌ Yatopia", value="Yatopia is prone to bugs. " - "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).") + "Consider using [Purpur](https://purpur.pl3x.net/downloads).") elif "Paper" in version: embed_var.add_field(name="||❌ Paper||", value="||Purpur has more optimizations but is generally less supported. " - "Consider using [Purpur](https://purpur.pl3x.net/downloads/#1.16.4).||") + "Consider using [Purpur](https://purpur.pl3x.net/downloads).||") except KeyError: unchecked = unchecked + 1 except: @@ -1173,7 +1173,7 @@ class Timings(commands.Cog): if issue_count >= 25: embed_var.insert_field_at(index=24, name="Plus " + str(issue_count - 24) + " more recommendations", value="Create a new timings report after resolving some of the above issues to see more.") if unchecked > 0: - embed_var.description = "||" + str(unchecked) + " unchecked configuration optimizations due to your server version. Use the latest version of [Purpur](https://purpur.pl3x.net/downloads/#1.16.4) to resolve this.||" + embed_var.description = "||" + str(unchecked) + " unchecked configuration optimizations due to your server version. Use the latest version of [Purpur](https://purpur.pl3x.net/downloads) to resolve this.||" await message.reply(embed=embed_var) From fbc313aa861d2c482dea1199ae6ed0e235264796 Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:08:57 -0600 Subject: [PATCH 6/8] Update timings.py --- cogs/timings.py | 239 ++++++++++++++++++++++++------------------------ 1 file changed, 121 insertions(+), 118 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 341f64f..6e6a7f4 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -22,7 +22,7 @@ class Timings(commands.Cog): "https://timings.spigotmc.org/?url="): embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) embed_var.add_field(name="❌ Spigot", - value="Spigot timings have limited information. Upgrade to [Purpur](https://purpur.pl3x.net/downloads) for the most accurate timings analysis.") + value="Spigot timings have limited information. Switch to [Purpur](https://purpur.pl3x.net/downloads) for the best timings analysis.") embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) embed_var.url = timings_url await message.reply(embed=embed_var) @@ -39,8 +39,16 @@ class Timings(commands.Cog): embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) embed_var.url = timings_url - r = requests.get(timings_json).json() - if r is None: + r1 = requests.get(timings_json).json() + if r1 is None: + embed_var.add_field(name="❌ Invalid report", + value="Create a new timings report.") + await message.reply(embed=embed_var) + return + + timings_url = timings_url + "&raw=1" + r2 = requests.get(timings_url).json() + if r2 is None: embed_var.add_field(name="❌ Invalid report", value="Create a new timings report.") await message.reply(embed=embed_var) @@ -48,19 +56,18 @@ class Timings(commands.Cog): unchecked = 0 try: - version = r["timingsMaster"]["version"] + version = r1["timingsMaster"]["version"] if "1.16.4" not in version: embed_var.add_field(name="❌ Legacy Build", value="You are using " + version + ". Update to 1.16.4.") - using_yatopia = "yatopia" in r["timingsMaster"]["config"] + using_yatopia = "yatopia" in r1["timingsMaster"]["config"] if using_yatopia: embed_var.add_field(name="❌ Yatopia", value="Yatopia is prone to bugs. " "Consider using [Purpur](https://purpur.pl3x.net/downloads).") elif "Paper" in version: embed_var.add_field(name="||❌ Paper||", - value="||Purpur has more optimizations but is generally less supported. " - "Consider using [Purpur](https://purpur.pl3x.net/downloads).||") + value="||Purpur has more optimizations. Consider using [Purpur](https://purpur.pl3x.net/downloads).||") except KeyError: unchecked = unchecked + 1 except: @@ -68,10 +75,10 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - online_mode = r["timingsMaster"]["onlinemode"] - bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] - velocity_online_mode = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] - velocity_enabled = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] + online_mode = r1["timingsMaster"]["onlinemode"] + bungeecord = r1["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] + velocity_online_mode = r1["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] + velocity_enabled = r1["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): embed_var.add_field(name="❌ online-mode", @@ -83,7 +90,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - timing_cost = int(r["timingsMaster"]["system"]["timingcost"]) + timing_cost = int(r1["timingsMaster"]["system"]["timingcost"]) if timing_cost > 300: embed_var.add_field(name="❌ Timingcost", value="Your timingcost is " + str(timing_cost) + ". Find a [better host](https://www.birdflop.com).") @@ -94,7 +101,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - jvm_version = r["timingsMaster"]["system"]["jvmversion"] + jvm_version = r1["timingsMaster"]["system"]["jvmversion"] if jvm_version.startswith("1.8.") or jvm_version.startswith("9.") or jvm_version.startswith("10."): embed_var.add_field(name="❌ Java Version", value="You are using Java " + jvm_version + ". Update to [Java 11](https://adoptopenjdk.net/installation.html).") @@ -105,9 +112,9 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - flags = r["timingsMaster"]["system"]["flags"] + flags = r1["timingsMaster"]["system"]["flags"] if "-XX:+UseZGC" in flags: - jvm_version = r["timingsMaster"]["system"]["jvmversion"] + jvm_version = r1["timingsMaster"]["system"]["jvmversion"] java_version = jvm_version.split(".")[0] if int(java_version) < 14: embed_var.add_field(name="❌ Java " + java_version, @@ -157,7 +164,7 @@ class Timings(commands.Cog): embed_var.add_field(name="❌ Invalid Configuration", value="At least one of your configuration files had an invalid data type.") try: - cpu = int(r["timingsMaster"]["system"]["cpu"]) + cpu = int(r1["timingsMaster"]["system"]["cpu"]) if cpu == 1: embed_var.add_field(name="❌ Threads", value="You have only " + str(cpu) + " thread. Find a [better host](https://www.birdflop.com).") @@ -171,7 +178,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - plugins = r["timingsMaster"]["plugins"] + plugins = r1["timingsMaster"]["plugins"] if "ClearLag" in plugins: embed_var.add_field(name="❌ ClearLag", value="Plugins that claim to remove lag actually cause more lag. " @@ -270,7 +277,7 @@ class Timings(commands.Cog): embed_var.add_field(name="❌ DisableJoinMessage", value="You probably don't need DisableJoinMessage because Essentials already has its features. ") for plugin in plugins: - if "songoda" in r["timingsMaster"]["plugins"][plugin]["authors"].casefold(): + if "songoda" in r1["timingsMaster"]["plugins"][plugin]["authors"].casefold(): if plugin == "EpicHeads": embed_var.add_field(name="❌ EpicHeads", value="This plugin was made by Songoda. Songoda resources are poorly developed and often cause problems. You should find an alternative such as [HeadsPlus](spigotmc.org/resources/headsplus-»-1-8-1-16-4.40265/) or [HeadDatabase](https://www.spigotmc.org/resources/head-database.14280/).") @@ -288,9 +295,9 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - using_purpur = "purpur" in r["timingsMaster"]["config"] + using_purpur = "purpur" in r1["timingsMaster"]["config"] if using_purpur: - plugins = r["timingsMaster"]["plugins"] + plugins = r1["timingsMaster"]["plugins"] if "SilkSpawners" in plugins: embed_var.add_field(name="❌ SilkSpawners", value="You probably don't need SilkSpawners as Purpur already has its features. " @@ -310,9 +317,9 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - plugins = r["timingsMaster"]["plugins"] + plugins = r1["timingsMaster"]["plugins"] if "PhantomSMP" in plugins: - phantoms_only_insomniacs = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + phantoms_only_insomniacs = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ "phantoms-only-attack-insomniacs"] if phantoms_only_insomniacs == "false": embed_var.add_field(name="❌ PhantomSMP", @@ -330,8 +337,8 @@ class Timings(commands.Cog): try: network_compression_threshold = int( - r["timingsMaster"]["config"]["server.properties"]["network-compression-threshold"]) - bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] + r1["timingsMaster"]["config"]["server.properties"]["network-compression-threshold"]) + bungeecord = r1["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] if network_compression_threshold <= 256 and bungeecord == "false": embed_var.add_field(name="❌ network-compression-threshold", value="Increase this in [server.properties](http://bit.ly/servprop). Recommended: 512.") @@ -345,8 +352,26 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] - view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) + using_ntvd = True + worlds = r2["worlds"] + for world in worlds: + tvd = int(r2["worlds"][world]["ticking-distance"]) + ntvd = int(r2["worlds"][world]["notick-viewdistance"]) + if ntvd >= tvd >= 4: + using_ntvd = False + if not using_ntvd: + embed_var.add_field(name="❌ no-tick-view-distance", + value="Set a value in [paper.yml](http://bit.ly/paperconf). Recommended: " + str(tvd) + ". And reduce view-distance from default (" + str(tvd) + ") in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") + except KeyError: + print("KeyError") + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + + try: + spigot_view_distance = r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] + view_distance = int(r1["timingsMaster"]["config"]["server.properties"]["view-distance"]) if view_distance >= 10 and spigot_view_distance == "default": embed_var.add_field(name="❌ view-distance", value="Decrease this from default (10) in [spigot.yml](http://bit.ly/spiconf). " @@ -358,7 +383,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - chunk_gc_period = int(r["timingsMaster"]["config"]["bukkit"]["chunk-gc"]["period-in-ticks"]) + chunk_gc_period = int(r1["timingsMaster"]["config"]["bukkit"]["chunk-gc"]["period-in-ticks"]) if chunk_gc_period >= 600: embed_var.add_field(name="❌ chunk-gc.period-in-ticks", value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 400.") @@ -369,7 +394,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - ticks_per_monster_spawns = int(r["timingsMaster"]["config"]["bukkit"]["ticks-per"]["monster-spawns"]) + ticks_per_monster_spawns = int(r1["timingsMaster"]["config"]["bukkit"]["ticks-per"]["monster-spawns"]) if ticks_per_monster_spawns == 1: embed_var.add_field(name="❌ ticks-per.monster-spawns", value="Increase this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 4.") @@ -380,7 +405,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - monsters_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["monsters"]) + monsters_spawn_limit = int(r1["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["monsters"]) if monsters_spawn_limit >= 70: embed_var.add_field(name="❌ spawn-limits.monsters", value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 15.") @@ -391,7 +416,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - water_ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-ambient"]) + water_ambient_spawn_limit = int(r1["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-ambient"]) if water_ambient_spawn_limit >= 20: embed_var.add_field(name="❌ spawn-limits.water-ambient", value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") @@ -402,7 +427,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - ambient_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["ambient"]) + ambient_spawn_limit = int(r1["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["ambient"]) if ambient_spawn_limit >= 15: embed_var.add_field(name="❌ spawn-limits.ambient", value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 1.") @@ -413,7 +438,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["animals"]) + animals_spawn_limit = int(r1["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["animals"]) if animals_spawn_limit >= 10: embed_var.add_field(name="❌ spawn-limits.animals", value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 3.") @@ -424,7 +449,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - water_animals_spawn_limit = int(r["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-animals"]) + water_animals_spawn_limit = int(r1["timingsMaster"]["config"]["bukkit"]["spawn-limits"]["water-animals"]) if water_animals_spawn_limit >= 15: embed_var.add_field(name="❌ spawn-limits.water-animals", value="Decrease this in [bukkit.yml](https://bukkit.gamepedia.com/Bukkit.yml).\nRecommended: 2.") @@ -435,10 +460,10 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - mob_spawn_range = int(r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["mob-spawn-range"]) - spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] + mob_spawn_range = int(r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["mob-spawn-range"]) + spigot_view_distance = r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["view-distance"] if spigot_view_distance == "default": - view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) + view_distance = int(r1["timingsMaster"]["config"]["server.properties"]["view-distance"]) if mob_spawn_range >= 8 and view_distance <= 6: embed_var.add_field(name="❌ mob-spawn-range", value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " @@ -455,7 +480,7 @@ class Timings(commands.Cog): try: animals_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "animals"]) if animals_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.animals", @@ -469,7 +494,7 @@ class Timings(commands.Cog): try: monsters_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "monsters"]) if monsters_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.monsters", @@ -483,7 +508,7 @@ class Timings(commands.Cog): try: raiders_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "raiders"]) except KeyError: unchecked = unchecked + 1 @@ -493,7 +518,7 @@ class Timings(commands.Cog): try: misc_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["misc"]) + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["misc"]) if misc_entity_activation_range >= 16: embed_var.add_field(name="❌ entity-activation-range.misc", value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " @@ -506,7 +531,7 @@ class Timings(commands.Cog): try: water_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["water"]) + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"]["water"]) if water_entity_activation_range >= 16: embed_var.add_field(name="❌ entity-activation-range.water", value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " @@ -519,7 +544,7 @@ class Timings(commands.Cog): try: villagers_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "villagers"]) if villagers_entity_activation_range >= 32: embed_var.add_field(name="❌ entity-activation-range.villagers", @@ -533,7 +558,7 @@ class Timings(commands.Cog): try: flying_monsters_entity_activation_range = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "flying-monsters"]) except KeyError: unchecked = unchecked + 1 @@ -543,7 +568,7 @@ class Timings(commands.Cog): try: tick_inactive_villagers = \ - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "tick-inactive-villagers"] if tick_inactive_villagers == "true": embed_var.add_field(name="❌ tick-inactive-villagers", @@ -555,7 +580,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - nerf_spawner_mobs = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["nerf-spawner-mobs"] + nerf_spawner_mobs = r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["nerf-spawner-mobs"] if nerf_spawner_mobs == "false": embed_var.add_field(name="❌ nerf-spawner-mobs", value="Enable this in [spigot.yml](http://bit.ly/spiconf).") @@ -567,7 +592,7 @@ class Timings(commands.Cog): try: wake_up_inactive_villagers_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["villagers-every"]) except KeyError: unchecked = unchecked + 1 @@ -576,7 +601,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: wake_up_inactive_villagers_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["villagers-for"]) if wake_up_inactive_villagers_for >= 100: embed_var.add_field(name="❌ wake-up-inactive.villagers-for", @@ -590,7 +615,7 @@ class Timings(commands.Cog): try: wake_up_inactive_flying_monsters_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["flying-monsters-for"]) if wake_up_inactive_flying_monsters_for >= 100: embed_var.add_field(name="❌ wake-up-inactive.flying-monsters-for", @@ -604,7 +629,7 @@ class Timings(commands.Cog): try: wake_up_inactive_animals_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["animals-every"]) except KeyError: @@ -615,7 +640,7 @@ class Timings(commands.Cog): try: wake_up_inactive_villagers_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["villagers-max-per-tick"]) if wake_up_inactive_villagers_max_per_tick >= 4: embed_var.add_field(name="❌ wake-up-inactive.villagers-max-per-tick", @@ -629,7 +654,7 @@ class Timings(commands.Cog): try: wake_up_inactive_animals_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["animals-for"]) if wake_up_inactive_animals_for >= 100: embed_var.add_field(name="❌ wake-up-inactive.animals-for", @@ -643,7 +668,7 @@ class Timings(commands.Cog): try: wake_up_inactive_monsters_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["monsters-max-per-tick"]) if wake_up_inactive_monsters_max_per_tick >= 8: embed_var.add_field(name="❌ wake-up-inactive.monsters-max-per-tick", @@ -657,7 +682,7 @@ class Timings(commands.Cog): try: wake_up_inactive_flying_monsters_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["flying-monsters-max-per-tick"]) if wake_up_inactive_flying_monsters_max_per_tick >= 8: embed_var.add_field(name="❌ wake-up-inactive.flying-monsters-max-per-tick", @@ -671,7 +696,7 @@ class Timings(commands.Cog): try: wake_up_inactive_flying_monsters_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["flying-monsters-every"]) except KeyError: unchecked = unchecked + 1 @@ -681,7 +706,7 @@ class Timings(commands.Cog): try: wake_up_inactive_monsters_every = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["monsters-every"]) except KeyError: unchecked = unchecked + 1 @@ -691,7 +716,7 @@ class Timings(commands.Cog): try: wake_up_inactive_animals_max_per_tick = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["animals-max-per-tick"]) if wake_up_inactive_animals_max_per_tick >= 4: embed_var.add_field(name="❌ wake-up-inactive.animals-max-per-tick", @@ -705,7 +730,7 @@ class Timings(commands.Cog): try: wake_up_inactive_monsters_for = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["entity-activation-range"][ "wake-up-inactive"]["monsters-for"]) if wake_up_inactive_monsters_for >= 100: embed_var.add_field(name="❌ wake-up-inactive.monsters-for", @@ -719,7 +744,7 @@ class Timings(commands.Cog): try: arrow_despawn_rate = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["arrow-despawn-rate"]) + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["arrow-despawn-rate"]) if arrow_despawn_rate >= 1200: embed_var.add_field(name="❌ arrow-despawn-rate", value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " @@ -732,7 +757,7 @@ class Timings(commands.Cog): try: item_merge_radius = float( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["item"]) + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["item"]) if item_merge_radius <= 2.5: embed_var.add_field(name="❌ merge-radius.item", value="Increase this in [spigot.yml](http://bit.ly/spiconf). " @@ -745,7 +770,7 @@ class Timings(commands.Cog): try: exp_merge_radius = float( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["exp"]) + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["merge-radius"]["exp"]) if exp_merge_radius <= 3.0: embed_var.add_field(name="❌ merge-radius.exp", value="Increase this in [spigot.yml](http://bit.ly/spiconf). " @@ -758,7 +783,7 @@ class Timings(commands.Cog): try: max_entity_collisions = int( - r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["max-entity-collisions"]) + r1["timingsMaster"]["config"]["spigot"]["world-settings"]["default"]["max-entity-collisions"]) if max_entity_collisions >= 8: embed_var.add_field(name="❌ max-entity-collisions", value="Decrease this in [spigot.yml](http://bit.ly/spiconf). " @@ -771,7 +796,7 @@ class Timings(commands.Cog): try: max_auto_save_chunks_per_tick = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["max-auto-save-chunks-per-tick"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["max-auto-save-chunks-per-tick"]) if max_auto_save_chunks_per_tick >= 24: embed_var.add_field(name="❌ max-auto-save-chunks-per-tick", value="Decrease this in [paper.yml](http://bit.ly/paperconf). " @@ -783,7 +808,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - optimize_explosions = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + optimize_explosions = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ "optimize-explosions"] if optimize_explosions == "false": embed_var.add_field(name="❌ optimize-explosions", @@ -796,7 +821,7 @@ class Timings(commands.Cog): try: mob_spawner_tick_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["mob-spawner-tick-rate"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["mob-spawner-tick-rate"]) if mob_spawner_tick_rate == 1: embed_var.add_field(name="❌ mob-spawner-tick-rate", value="Increase this in [paper.yml](http://bit.ly/paperconf). " @@ -809,7 +834,7 @@ class Timings(commands.Cog): try: disable_chest_cat_detection = \ - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["game-mechanics"][ + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["game-mechanics"][ "disable-chest-cat-detection"] if disable_chest_cat_detection == "false": embed_var.add_field(name="❌ disable-chest-cat-detection", @@ -822,7 +847,7 @@ class Timings(commands.Cog): try: container_update_tick_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["container-update-tick-rate"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["container-update-tick-rate"]) if container_update_tick_rate == "false": embed_var.add_field(name="❌ container-update-tick-rate", value="Increase this in [paper.yml](http://bit.ly/paperconf). " @@ -835,7 +860,7 @@ class Timings(commands.Cog): try: grass_spread_tick_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["grass-spread-tick-rate"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["grass-spread-tick-rate"]) if grass_spread_tick_rate == 1: embed_var.add_field(name="❌ grass-spread-tick-rate", value="Increase this in [paper.yml](http://bit.ly/paperconf). " @@ -848,7 +873,7 @@ class Timings(commands.Cog): try: soft_despawn_range = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) if soft_despawn_range >= 32: embed_var.add_field(name="❌ despawn-ranges.soft", value="Decrease this in [paper.yml](http://bit.ly/paperconf). " @@ -860,7 +885,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - hard_despawn_range = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) + hard_despawn_range = int(r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["despawn-ranges"]["soft"]) if hard_despawn_range >= 128: embed_var.add_field(name="❌ despawn-ranges.hard", value="Decrease this in [paper.yml](http://bit.ly/paperconf). " @@ -872,9 +897,10 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - hopper_disable_move_event = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["hopper"][ + hopper_disable_move_event = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["hopper"][ "disable-move-event"] - if hopper_disable_move_event == "false": + plugins = r1["timingsMaster"]["plugins"] + if hopper_disable_move_event == "false" and "QuickShop" not in plugins: embed_var.add_field(name="❌ hopper.disable-move-event", value="Enable this in [paper.yml](http://bit.ly/paperconf).") except KeyError: @@ -885,7 +911,7 @@ class Timings(commands.Cog): try: non_player_arrow_despawn_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["non-player-arrow-despawn-rate"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["non-player-arrow-despawn-rate"]) if non_player_arrow_despawn_rate == -1: embed_var.add_field(name="❌ non-player-arrow-despawn-rate", value="Set a value in [paper.yml](http://bit.ly/paperconf). " @@ -898,7 +924,7 @@ class Timings(commands.Cog): try: creative_arrow_despawn_rate = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["creative-arrow-despawn-rate"]) + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["creative-arrow-despawn-rate"]) if creative_arrow_despawn_rate == -1: embed_var.add_field(name="❌ creative-arrow-despawn-rate", value="Set a value in [paper.yml](http://bit.ly/paperconf). " @@ -910,7 +936,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - prevent_moving_into_unloaded_chunks = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + prevent_moving_into_unloaded_chunks = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ "prevent-moving-into-unloaded-chunks"] if prevent_moving_into_unloaded_chunks == "false": embed_var.add_field(name="❌ prevent-moving-into-unloaded-chunks", @@ -922,7 +948,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - eigencraft_redstone = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + eigencraft_redstone = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ "use-faster-eigencraft-redstone"] if eigencraft_redstone == "false": embed_var.add_field(name="❌ use-faster-eigencraft-redstone", @@ -934,7 +960,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - fix_climbing_bypass_gamerule = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["fix-climbing-bypassing-cramming-rule"] + fix_climbing_bypass_gamerule = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["fix-climbing-bypassing-cramming-rule"] if fix_climbing_bypass_gamerule == "false": embed_var.add_field(name="❌ fix-climbing-bypassing-cramming-rule", value="Enable this in [paper.yml](http://bit.ly/paperconf).") @@ -945,7 +971,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - armor_stands_do_collision_entity_lookups = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-do-collision-entity-lookups"] + armor_stands_do_collision_entity_lookups = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-do-collision-entity-lookups"] if armor_stands_do_collision_entity_lookups == "true": embed_var.add_field(name="❌ armor-stands-do-collision-entity-lookups", value="Disable this in [paper.yml](http://bit.ly/paperconf).") @@ -956,8 +982,8 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - plugins = r["timingsMaster"]["plugins"] - armor_stands_tick = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-tick"] + plugins = r1["timingsMaster"]["plugins"] + armor_stands_tick = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["armor-stands-tick"] if armor_stands_tick == "true" and "PetBlocks" not in plugins and "BlockBalls" not in plugins and "ArmorStandTools" not in plugins: embed_var.add_field(name="❌ armor-stands-tick", value="Disable this in [paper.yml](http://bit.ly/paperconf).") @@ -968,7 +994,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - per_player_mob_spawns = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + per_player_mob_spawns = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ "per-player-mob-spawns"] if per_player_mob_spawns == "false": embed_var.add_field(name="❌ per-player-mob-spawns", @@ -981,7 +1007,7 @@ class Timings(commands.Cog): try: alt_item_despawn_rate_enabled = \ - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["alt-item-despawn-rate"]["enabled"] + r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["alt-item-despawn-rate"]["enabled"] if alt_item_despawn_rate_enabled == "false": embed_var.add_field(name="❌ alt-item-despawn-rate.enabled", value="Enable this in [paper.yml](http://bit.ly/paperconf).") @@ -992,31 +1018,8 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - no_tick_view_distance = int( - r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["viewdistances"][ - "no-tick-view-distance"]) - if no_tick_view_distance == -1: - spigot_view_distance = r["timingsMaster"]["config"]["spigot"]["world-settings"]["default"][ - "view-distance"] - if spigot_view_distance == "default": - view_distance = int(r["timingsMaster"]["config"]["server.properties"]["view-distance"]) - if view_distance >= 4: - embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in [paper.yml](http://bit.ly/paperconf). " - "Recommended: " + str(view_distance) + ". And reduce view-distance from default (" + str(view_distance) + ") in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") - elif int(spigot_view_distance) >= 4: - embed_var.add_field(name="❌ no-tick-view-distance", - value="Set a value in [paper.yml](http://bit.ly/paperconf). " - "Recommended: " + spigot_view_distance + ". And reduce view-distance in [spigot.yml](http://bit.ly/spiconf). Recommended: 3.") - except KeyError: - unchecked = unchecked + 1 - except: - embed_var.add_field(name="❌ Invalid Configuration", - value="At least one of your configuration files had an invalid data type.") - - try: - enable_treasure_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["enable-treasure-maps"] - already_discovered_maps = r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["treasure-maps-return-already-discovered"] + enable_treasure_maps = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["enable-treasure-maps"] + already_discovered_maps = r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["treasure-maps-return-already-discovered"] if enable_treasure_maps == "true" and already_discovered_maps == "false": embed_var.add_field(name="❌ enable-treasure-maps", value="Disable this in [paper.yml](http://bit.ly/paperconf).") @@ -1027,7 +1030,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - projectile_load_save = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ + projectile_load_save = int(r1["timingsMaster"]["config"]["paper"]["world-settings"]["default"][ "projectile-load-save-per-chunk-limit"]) if projectile_load_save == -1: embed_var.add_field(name="❌ projectile-load-save-per-chunk-limit", @@ -1039,8 +1042,8 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - use_alternate_keepalive = r["timingsMaster"]["config"]["purpur"]["settings"]["use-alternate-keepalive"] - plugins = r["timingsMaster"]["plugins"] + use_alternate_keepalive = r1["timingsMaster"]["config"]["purpur"]["settings"]["use-alternate-keepalive"] + plugins = r1["timingsMaster"]["plugins"] if use_alternate_keepalive == "false" and "TCPShield" not in plugins: embed_var.add_field(name="❌ use-alternate-keepalive", value="Enable this in [purpur.yml](http://bit.ly/purpurc).") @@ -1054,7 +1057,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - dont_send_useless_entity_packets = r["timingsMaster"]["config"]["purpur"]["settings"][ + dont_send_useless_entity_packets = r1["timingsMaster"]["config"]["purpur"]["settings"][ "dont-send-useless-entity-packets"] if dont_send_useless_entity_packets == "false": embed_var.add_field(name="❌ dont-send-useless-entity-packets", @@ -1067,7 +1070,7 @@ class Timings(commands.Cog): try: disable_treasure_searching = \ - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["dolphin"][ + r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["dolphin"][ "disable-treasure-searching"] if disable_treasure_searching == "false": embed_var.add_field(name="❌ dolphin.disable-treasure-searching", @@ -1079,7 +1082,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - brain_ticks = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["brain-ticks"]) + brain_ticks = int(r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["brain-ticks"]) if brain_ticks == 1: embed_var.add_field(name="❌ villager.brain-ticks", value="Increase this in [purpur.yml](http://bit.ly/purpurc). " @@ -1091,7 +1094,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - iron_golem_radius = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["radius"]) + iron_golem_radius = int(r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["radius"]) if iron_golem_radius == 0: embed_var.add_field(name="❌ spawn-iron-golem.radius", value="Set a value in [purpur.yml](http://bit.ly/purpurc). " @@ -1103,7 +1106,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - iron_golem_limit = int(r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["limit"]) + iron_golem_limit = int(r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["spawn-iron-golem"]["limit"]) if iron_golem_limit == 0: embed_var.add_field(name="❌ spawn-iron-golem.limit", value="Set a value in [purpur.yml](http://bit.ly/purpurc). " @@ -1116,7 +1119,7 @@ class Timings(commands.Cog): try: aggressive_towards_villager_when_lagging = \ - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["zombie"][ + r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["zombie"][ "aggressive-towards-villager-when-lagging"] if aggressive_towards_villager_when_lagging == "true": embed_var.add_field(name="❌ zombie.aggresive-towards-villager-when-lagging", @@ -1129,7 +1132,7 @@ class Timings(commands.Cog): try: entities_can_use_portals = \ - r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"][ + r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"][ "entities-can-use-portals"] if entities_can_use_portals == "true": embed_var.add_field(name="❌ entities-can-use-portals", @@ -1141,7 +1144,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - lobotomize_enabled = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ + lobotomize_enabled = r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"][ "lobotomize"]["enabled"] if lobotomize_enabled == "false": embed_var.add_field(name="❌ villager.lobotomize.enabled", @@ -1153,7 +1156,7 @@ class Timings(commands.Cog): value="At least one of your configuration files had an invalid data type.") try: - teleport_if_outside_border = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["player"]["teleport-if-outside-border"] + teleport_if_outside_border = r1["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["player"]["teleport-if-outside-border"] if teleport_if_outside_border == "false": embed_var.add_field(name="❌ player.teleport-if-outside-border", value="Enable this in [purpur.yml](http://bit.ly/purpurc).") From 87b19e60a45ec8e2e5e65dfa15618cfe5f03e67e Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Wed, 13 Jan 2021 05:20:19 -0600 Subject: [PATCH 7/8] Timings - User Discriminator --- cogs/timings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 6e6a7f4..0192c98 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -23,7 +23,7 @@ class Timings(commands.Cog): embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) embed_var.add_field(name="❌ Spigot", value="Spigot timings have limited information. Switch to [Purpur](https://purpur.pl3x.net/downloads) for the best timings analysis.") - embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) + embed_var.set_footer(text="Requested by " + message.author.name + "#" + message.author.discriminator, icon_url=message.author.avatar_url) embed_var.url = timings_url await message.reply(embed=embed_var) return @@ -36,7 +36,7 @@ class Timings(commands.Cog): timings_host, timings_id = timings_url.split("?id=") timings_json = timings_host + "data.php?id=" + timings_id embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff) - embed_var.set_footer(text="Requested by " + message.author.name, icon_url=message.author.avatar_url) + embed_var.set_footer(text="Requested by " + message.author.name + "#" + message.author.discriminator, icon_url=message.author.avatar_url) embed_var.url = timings_url r1 = requests.get(timings_json).json() From ec3ff6d1a536057eb9cfe2bfde843d13c2c09d8c Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Wed, 13 Jan 2021 05:21:44 -0600 Subject: [PATCH 8/8] Timings - Move online-mode check --- cogs/timings.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 0192c98..df619ed 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -74,21 +74,6 @@ class Timings(commands.Cog): embed_var.add_field(name="❌ Invalid Configuration", value="At least one of your configuration files had an invalid data type.") - try: - online_mode = r1["timingsMaster"]["onlinemode"] - bungeecord = r1["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] - velocity_online_mode = r1["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] - velocity_enabled = r1["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] - - if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): - embed_var.add_field(name="❌ online-mode", - value="Enable this in [server.properties](http://bit.ly/servprop) for security.") - except KeyError: - unchecked = unchecked + 1 - except: - embed_var.add_field(name="❌ Invalid Configuration", - value="At least one of your configuration files had an invalid data type.") - try: timing_cost = int(r1["timingsMaster"]["system"]["timingcost"]) if timing_cost > 300: @@ -335,6 +320,21 @@ class Timings(commands.Cog): embed_var.add_field(name="❌ Invalid Configuration", value="At least one of your configuration files had an invalid data type.") + try: + online_mode = r1["timingsMaster"]["onlinemode"] + bungeecord = r1["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] + velocity_online_mode = r1["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] + velocity_enabled = r1["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] + + if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): + embed_var.add_field(name="❌ online-mode", + value="Enable this in [server.properties](http://bit.ly/servprop) for security.") + except KeyError: + unchecked = unchecked + 1 + except: + embed_var.add_field(name="❌ Invalid Configuration", + value="At least one of your configuration files had an invalid data type.") + try: network_compression_threshold = int( r1["timingsMaster"]["config"]["server.properties"]["network-compression-threshold"])