Browse Source

more updates :)

master
Purpur 4 years ago
committed by GitHub
parent
commit
a32c384985
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 367
      bot.py

367
bot.py

@ -70,6 +70,8 @@ async def analyze_timings(message):
await message.channel.send(embed=embed_var) await message.channel.send(embed=embed_var)
return return
embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff)
try:
version = r["timingsMaster"]["version"] version = r["timingsMaster"]["version"]
online_mode = r["timingsMaster"]["onlinemode"] online_mode = r["timingsMaster"]["onlinemode"]
timing_cost = int(r["timingsMaster"]["system"]["timingcost"]) timing_cost = int(r["timingsMaster"]["system"]["timingcost"])
@ -145,17 +147,15 @@ async def analyze_timings(message):
no_tick_view_distance = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["viewdistances"]["no-tick-view-distance"]) no_tick_view_distance = int(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["viewdistances"]["no-tick-view-distance"])
phantoms_only_insomniacs = bool(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["phantoms-only-attack-insomniacs"]) phantoms_only_insomniacs = bool(r["timingsMaster"]["config"]["paper"]["world-settings"]["default"]["phantoms-only-attack-insomniacs"])
embed_var = discord.Embed(title="Timings Analysis", color=0x55ffff)
if "Yatopia" in version: if "Yatopia" in version:
embed_var.add_field(name="⚠ Yatopia", embed_var.add_field(name="⚠ Yatopia",
value="Yatopia may be more optimized but it is prone to bugs. " value="Yatopia may be more optimized but it is prone to bugs. "
"Consider using [Purpur](https://ci.pl3x.net/job/Purpur/).", "Consider using [Purpur](https://ci.pl3x.net/job/Purpur/).",
inline=True) inline=True)
elif "Paper" in version: 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/).",
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/).||",
inline=True) inline=True)
if "1.16.4" not in version: if "1.16.4" not in version:
embed_var.add_field(name="⚠ Legacy Build", embed_var.add_field(name="⚠ Legacy Build",
@ -186,10 +186,10 @@ async def analyze_timings(message):
for flag in flaglist: for flag in flaglist:
if flag.startswith("-Xmx"): if flag.startswith("-Xmx"):
max_mem = flag.split("-Xmx")[1] max_mem = flag.split("-Xmx")[1]
if "G" in max_mem:
max_mem = max_mem.replace("G", "000") max_mem = max_mem.replace("G", "000")
if "M" in max_mem:
max_mem = max_mem.replace("M", "") max_mem = max_mem.replace("M", "")
max_mem = max_mem.replace("g", "000")
max_mem = max_mem.replace("m", "")
if int(max_mem) < 5400: if int(max_mem) < 5400:
embed_var.add_field(name="⚠ Low Memory", embed_var.add_field(name="⚠ Low Memory",
value="Allocate at least 6-10GB of ram to your server if you can afford it.", value="Allocate at least 6-10GB of ram to your server if you can afford it.",
@ -213,12 +213,151 @@ async def analyze_timings(message):
if network_compression_threshold == 256: if network_compression_threshold == 256:
if bungeecord == "false": if bungeecord == "false":
embed_var.add_field(name="⚠ network-compression-threshold", embed_var.add_field(name="⚠ network-compression-threshold",
value="Increase this in server.properties.\nRecommended: 512.",
value="Increase this in server.properties. Recommended: 512.",
inline=True) inline=True)
else: else:
embed_var.add_field(name="⚠ network-compression-threshold", 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 for a bungee server like yours.",
inline=True) inline=True)
# Plugins
if "ClearLag" in plugins:
embed_var.add_field(name="⚠ ClearLag",
value="Plugins that claim to remove lag actually cause more lag. "
"Remove ClearLag.",
inline=True)
if "LagAssist" in plugins:
embed_var.add_field(name="⚠ LagAssist",
value="Plugins that claim to remove lag actually cause more lag. "
"Remove LagAssist.",
inline=True)
if "NoChunkLag" in plugins:
embed_var.add_field(name="⚠ NoChunkLag",
value="Plugins that claim to remove lag actually cause more lag. "
"Remove NoChunkLag.",
inline=True)
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.",
inline=True)
if "VillagerOptimizer" in plugins:
embed_var.add_field(name="⚠ VillagerOptimizer",
value="You probably don't need VillagerOptimizer as Paper already adds its features. "
"See entity-activation-range in spigot.yml.",
inline=True)
if "VillagerLobotomizatornator" in plugins and "Purpur" in version:
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.",
inline=True)
if "StackMob" in plugins:
embed_var.add_field(name="⚠ StackMob",
value="Stacking plugins actually cause more lag. "
"Remove StackMob.",
inline=True)
if "MobStacker" in plugins:
embed_var.add_field(name="⚠ MobStacker",
value="Stacking plugins actually cause more lag. "
"Remove MobStacker.",
inline=True)
if "WildStacker" in plugins:
embed_var.add_field(name="⚠ WildStacker",
value="Stacking plugins actually cause more lag. "
"Remove WildStacker.",
inline=True)
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.",
inline=True)
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).",
inline=True)
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).",
inline=True)
if "Spartan" in plugins:
embed_var.add_field(name="⚠ Spartan",
value="Spartan is a laggy anticheat. "
"Consider replacing it with [Matrix](https://matrix.rip/).",
inline=True)
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.",
inline=True)
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.",
inline=True)
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.",
inline=True)
if "PhantomSMP" in plugins:
if phantoms_only_insomniacs:
embed_var.add_field(name="⚠ PhantomSMP",
value="You probably don't need PhantomSMP as Paper already has its features. "
"Remove PhantomSMP.",
inline=True)
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",
inline=True)
if "SilkSpawners" in plugins and "Purpur" in version:
embed_var.add_field(name="⚠ SilkSpawners",
value="You probably don't need SilkSpawners as Purpur already has its features. "
"Remove SilkSpawners.",
inline=True)
if "MineableSpawners" in plugins and "Purpur" in version:
embed_var.add_field(name="⚠ MineableSpawners",
value="You probably don't need MineableSpawners as Purpur already has its features. "
"Remove MineableSpawners.",
inline=True)
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.",
inline=True)
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 [DrMap](https://www.spigotmc.org/resources/drmap.87368/).",
inline=True)
if "CrazyActions" in plugins:
embed_var.add_field(name="⚠ CrazyAuctions",
value="CrazyAuctions is a laggy plugin. "
"Consider replacing it with [AuctionHouse](https://www.spigotmc.org/resources/auctionhouse.61836/).",
inline=True)
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).",
inline=True)
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).",
inline=True)
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).",
inline=True)
for plugin in plugins:
if "Songoda" in r["timingsMaster"]["plugins"][plugin]["authors"]:
embed_var.add_field(name="" + plugin,
value="This plugin was made by Songoda. You should remove it.",
inline=True)
if monsters_spawn_limit == 70: if monsters_spawn_limit == 70:
embed_var.add_field(name="⚠ spawn-limits.monsters", embed_var.add_field(name="⚠ spawn-limits.monsters",
value="Decrease this in bukkit.yml.\nRecommended: 15.", value="Decrease this in bukkit.yml.\nRecommended: 15.",
@ -249,7 +388,8 @@ async def analyze_timings(message):
inline=True) inline=True)
if view_distance == 10 and spigot_view_distance == "default": if view_distance == 10 and spigot_view_distance == "default":
embed_var.add_field(name="⚠ view-distance", embed_var.add_field(name="⚠ view-distance",
value="Decrease this from default (10) in spigot.yml.\nRecommended: 3.",
value="Decrease this from default (10) in spigot.yml. "
"Recommended: 3.",
inline=True) inline=True)
if save_user_cache_on_stop_only == "false": if save_user_cache_on_stop_only == "false":
embed_var.add_field(name="⚠ save-user-cache-on-stop-only", embed_var.add_field(name="⚠ save-user-cache-on-stop-only",
@ -258,31 +398,38 @@ async def analyze_timings(message):
if mob_spawn_range == 8 and type(view_distance) == "int" and view_distance < 7 and type(spigot_view_distance) == "int" and spigot_view_distance < 7: if mob_spawn_range == 8 and type(view_distance) == "int" and view_distance < 7 and type(spigot_view_distance) == "int" and spigot_view_distance < 7:
if spigot_view_distance == -1: if spigot_view_distance == -1:
embed_var.add_field(name="⚠ mob-spawn-range", embed_var.add_field(name="⚠ mob-spawn-range",
value="Decrease this in spigot.yml.\nRecommended: " + str(view_distance - 1) + ".",
value="Decrease this in spigot.yml. "
"Recommended: " + str(view_distance - 1) + ".",
inline=True) inline=True)
else: else:
embed_var.add_field(name="⚠ mob-spawn-range", embed_var.add_field(name="⚠ mob-spawn-range",
value="Decrease this in spigot.yml.\nRecommended: " + str(spigot_view_distance - 1) + ".",
value="Decrease this in spigot.yml. "
"Recommended: " + str(spigot_view_distance - 1) + ".",
inline=True) inline=True)
if animals_entity_activation_range == 32: if animals_entity_activation_range == 32:
embed_var.add_field(name="⚠ entity-activation-range.animals", embed_var.add_field(name="⚠ entity-activation-range.animals",
value="Decrease this in spigot.yml.\nRecommended: 6.",
value="Decrease this in spigot.yml. "
"Recommended: 6.",
inline=True) inline=True)
if monsters_entity_activation_range == 32: if monsters_entity_activation_range == 32:
embed_var.add_field(name="⚠ entity-activation-range.monsters", embed_var.add_field(name="⚠ entity-activation-range.monsters",
value="Decrease this in spigot.yml.\nRecommended: 16.",
value="Decrease this in spigot.yml. "
"Recommended: 16.",
inline=True) inline=True)
if misc_entity_activation_range == 16: if misc_entity_activation_range == 16:
embed_var.add_field(name="⚠ entity-activation-range.misc", embed_var.add_field(name="⚠ entity-activation-range.misc",
value="Decrease this in spigot.yml.\nRecommended: 4.",
value="Decrease this in spigot.yml. "
"Recommended: 4.",
inline=True) inline=True)
if water_entity_activation_range == 16: if water_entity_activation_range == 16:
embed_var.add_field(name="⚠ entity-activation-range.water", embed_var.add_field(name="⚠ entity-activation-range.water",
value="Decrease this in spigot.yml.\nRecommended: 12.",
value="Decrease this in spigot.yml. "
"Recommended: 12.",
inline=True) inline=True)
if villagers_entity_activation_range == 32: if villagers_entity_activation_range == 32:
embed_var.add_field(name="⚠ entity-activation-range.villagers", embed_var.add_field(name="⚠ entity-activation-range.villagers",
value="Decrease this in spigot.yml.\nRecommended: 16.",
value="Decrease this in spigot.yml. "
"Recommended: 16.",
inline=True) inline=True)
if tick_inactive_villagers == "true": if tick_inactive_villagers == "true":
embed_var.add_field(name="⚠ tick-inactive-villagers", embed_var.add_field(name="⚠ tick-inactive-villagers",
@ -290,43 +437,53 @@ async def analyze_timings(message):
inline=True) inline=True)
if wake_up_inactive_animals_max_per_tick == 4: if wake_up_inactive_animals_max_per_tick == 4:
embed_var.add_field(name="⚠ wake-up-inactive.animals-max-per-tick", embed_var.add_field(name="⚠ wake-up-inactive.animals-max-per-tick",
value="Decrease this in spigot.yml.\nRecommended: 2.",
value="Decrease this in spigot.yml. "
"Recommended: 2.",
inline=True) inline=True)
if wake_up_inactive_animals_for == 100: if wake_up_inactive_animals_for == 100:
embed_var.add_field(name="⚠ wake-up-inactive.animals-for", embed_var.add_field(name="⚠ wake-up-inactive.animals-for",
value="Decrease this in spigot.yml.\nRecommended: 40.",
value="Decrease this in spigot.yml. "
"Recommended: 40.",
inline=True) inline=True)
if wake_up_inactive_monsters_max_per_tick == 8: if wake_up_inactive_monsters_max_per_tick == 8:
embed_var.add_field(name="⚠ wake-up-inactive.monsters-max-per-tick", embed_var.add_field(name="⚠ wake-up-inactive.monsters-max-per-tick",
value="Decrease this in spigot.yml.\nRecommended: 4.",
value="Decrease this in spigot.yml. "
"Recommended: 4.",
inline=True) inline=True)
if wake_up_inactive_monsters_for == 100: if wake_up_inactive_monsters_for == 100:
embed_var.add_field(name="⚠ wake-up-inactive.monsters-for", embed_var.add_field(name="⚠ wake-up-inactive.monsters-for",
value="Decrease this in spigot.yml.\nRecommended: 60.",
value="Decrease this in spigot.yml. "
"Recommended: 60.",
inline=True) inline=True)
if wake_up_inactive_villagers_max_per_tick == 4: if wake_up_inactive_villagers_max_per_tick == 4:
embed_var.add_field(name="⚠ wake-up-inactive.villagers-max-per-tick", embed_var.add_field(name="⚠ wake-up-inactive.villagers-max-per-tick",
value="Decrease this in spigot.yml.\nRecommended: 1.",
value="Decrease this in spigot.yml. "
"Recommended: 1.",
inline=True) inline=True)
if wake_up_inactive_villagers_for == 100: if wake_up_inactive_villagers_for == 100:
embed_var.add_field(name="⚠ wake-up-inactive.villagers-for", embed_var.add_field(name="⚠ wake-up-inactive.villagers-for",
value="Decrease this in spigot.yml.\nRecommended: 20.",
value="Decrease this in spigot.yml. "
"Recommended: 20.",
inline=True) inline=True)
if wake_up_inactive_flying_monsters_max_per_tick == 8: if wake_up_inactive_flying_monsters_max_per_tick == 8:
embed_var.add_field(name="⚠ wake-up-inactive.flying-monsters-max-per-tick", embed_var.add_field(name="⚠ wake-up-inactive.flying-monsters-max-per-tick",
value="Decrease this in spigot.yml.\nRecommended: 1.",
value="Decrease this in spigot.yml. "
"Recommended: 1.",
inline=True) inline=True)
if wake_up_inactive_flying_monsters_for == 100: if wake_up_inactive_flying_monsters_for == 100:
embed_var.add_field(name="⚠ wake-up-inactive.flying-monsters-for", embed_var.add_field(name="⚠ wake-up-inactive.flying-monsters-for",
value="Decrease this in spigot.yml.\nRecommended: 60.",
value="Decrease this in spigot.yml. "
"Recommended: 60.",
inline=True) inline=True)
if item_merge_radius == "true": if item_merge_radius == "true":
embed_var.add_field(name="⚠ merge-radius.item", embed_var.add_field(name="⚠ merge-radius.item",
value="Increase this in spigot.yml.\nRecommended: 4.0.",
value="Increase this in spigot.yml. "
"Recommended: 4.0.",
inline=True) inline=True)
if exp_merge_radius == "true": if exp_merge_radius == "true":
embed_var.add_field(name="⚠ merge-radius.exp", embed_var.add_field(name="⚠ merge-radius.exp",
value="Increase this in spigot.yml.\nRecommended: 6.0.",
value="Increase this in spigot.yml. "
"Recommended: 6.0.",
inline=True) inline=True)
if nerf_spawner_mobs == "false": if nerf_spawner_mobs == "false":
embed_var.add_field(name="⚠ nerf-spawner-mobs", embed_var.add_field(name="⚠ nerf-spawner-mobs",
@ -334,15 +491,18 @@ async def analyze_timings(message):
inline=True) inline=True)
if arrow_despawn_rate == 1200: if arrow_despawn_rate == 1200:
embed_var.add_field(name="⚠ arrow-despawn-rate", embed_var.add_field(name="⚠ arrow-despawn-rate",
value="Decrease this in spigot.yml.\nRecommended: 300.",
value="Decrease this in spigot.yml. "
"Recommended: 300.",
inline=True) inline=True)
if max_entity_collisions == 8: if max_entity_collisions == 8:
embed_var.add_field(name="⚠ max-entity-collisions", embed_var.add_field(name="⚠ max-entity-collisions",
value="Decrease this in spigot.yml.\nRecommended: 2.",
value="Decrease this in spigot.yml. "
"Recommended: 2.",
inline=True) inline=True)
if max_auto_save_chunks_per_tick == 24: if max_auto_save_chunks_per_tick == 24:
embed_var.add_field(name="⚠ max-auto-save-chunks-per-tick", embed_var.add_field(name="⚠ max-auto-save-chunks-per-tick",
value="Decrease this in paper.yml.\nRecommended: 6.",
value="Decrease this in paper.yml. "
"Recommended: 6.",
inline=True) inline=True)
if optimize_explosions == "false": if optimize_explosions == "false":
embed_var.add_field(name="⚠ optimize-explosions", embed_var.add_field(name="⚠ optimize-explosions",
@ -350,7 +510,8 @@ async def analyze_timings(message):
inline=True) inline=True)
if mob_spawner_tick_rate == 1: if mob_spawner_tick_rate == 1:
embed_var.add_field(name="⚠ mob-spawner-tick-rate", embed_var.add_field(name="⚠ mob-spawner-tick-rate",
value="Increase this in paper.yml.\nRecommended: 2.",
value="Increase this in paper.yml. "
"Recommended: 2.",
inline=True) inline=True)
if disable_chest_cat_detection == "false": if disable_chest_cat_detection == "false":
embed_var.add_field(name="⚠ disable_chest_cat_detection", embed_var.add_field(name="⚠ disable_chest_cat_detection",
@ -358,19 +519,23 @@ async def analyze_timings(message):
inline=True) inline=True)
if container_update_tick_rate == "false": if container_update_tick_rate == "false":
embed_var.add_field(name="⚠ container-update-tick-rate", embed_var.add_field(name="⚠ container-update-tick-rate",
value="Increase this in paper.yml.\nRecommended: 3.",
value="Increase this in paper.yml. "
"Recommended: 3.",
inline=True) inline=True)
if grass_spread_tick_rate == 1: if grass_spread_tick_rate == 1:
embed_var.add_field(name="⚠ grass-spread-tick-rate", embed_var.add_field(name="⚠ grass-spread-tick-rate",
value="Increase this in paper.yml.\nRecommended: 4",
value="Increase this in paper.yml. "
"Recommended: 4",
inline=True) inline=True)
if soft_despawn_range == 32: if soft_despawn_range == 32:
embed_var.add_field(name="⚠ despawn-ranges.soft", embed_var.add_field(name="⚠ despawn-ranges.soft",
value="Decrease this in paper.yml.\nRecommended: 28",
value="Decrease this in paper.yml. "
"Recommended: 28",
inline=True) inline=True)
if hard_despawn_range == 128: if hard_despawn_range == 128:
embed_var.add_field(name="⚠ despawn-ranges.hard", embed_var.add_field(name="⚠ despawn-ranges.hard",
value="Decrease this in paper.yml.\nRecommended: 96",
value="Decrease this in paper.yml. "
"Recommended: 96",
inline=True) inline=True)
if hopper_disable_move_event == "false": if hopper_disable_move_event == "false":
embed_var.add_field(name="⚠ hopper.disable-move-event", embed_var.add_field(name="⚠ hopper.disable-move-event",
@ -378,11 +543,13 @@ async def analyze_timings(message):
inline=True) inline=True)
if non_player_arrow_despawn_rate == -1: if non_player_arrow_despawn_rate == -1:
embed_var.add_field(name="⚠ non-player-arrow-despawn-rate", embed_var.add_field(name="⚠ non-player-arrow-despawn-rate",
value="Set a value in paper.yml.\nRecommended: 60",
value="Set a value in paper.yml. "
"Recommended: 60",
inline=True) inline=True)
if creative_arrow_despawn_rate == -1: if creative_arrow_despawn_rate == -1:
embed_var.add_field(name="⚠ creative-arrow-despawn-rate", embed_var.add_field(name="⚠ creative-arrow-despawn-rate",
value="Set a value in paper.yml.\nRecommended: 60",
value="Set a value in paper.yml. "
"Recommended: 60",
inline=True) inline=True)
if prevent_moving_into_unloaded_chunks == "false": if prevent_moving_into_unloaded_chunks == "false":
embed_var.add_field(name="⚠ prevent-moving-into-unloaded-chunks", embed_var.add_field(name="⚠ prevent-moving-into-unloaded-chunks",
@ -413,16 +580,19 @@ async def analyze_timings(message):
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"])
aggressive_towards_villager_when_lagging = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["zombie"]["aggressive-towards-villager-when-lagging"] aggressive_towards_villager_when_lagging = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["zombie"]["aggressive-towards-villager-when-lagging"]
entities_can_use_portals = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["entities-can-use-portals"] entities_can_use_portals = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["gameplay-mechanics"]["entities-can-use-portals"]
lobotomize_enabled = r["timingsMaster"]["config"]["purpur"]["world-settings"]["default"]["mobs"]["villager"]["lobotomize"]["enabled"]
if no_tick_view_distance == -1: if no_tick_view_distance == -1:
if spigot_view_distance != "default" or view_distance != 10: if spigot_view_distance != "default" or view_distance != 10:
if spigot_view_distance == "default" and view_distance > 3: if spigot_view_distance == "default" and view_distance > 3:
embed_var.add_field(name="⚠ no-tick-view-distance", embed_var.add_field(name="⚠ no-tick-view-distance",
value="Set a value in paper.yml.\nRecommended: " + str(view_distance) + ". And reduce view-distance in server.properties.\nRecommended: 3.",
value="Set a value in paper.yml. "
"Recommended: " + str(view_distance) + ". And reduce view-distance in server.properties. Recommended: 3.",
inline=True) inline=True)
elif spigot_view_distance > 3:
elif type(spigot_view_distance) == "int" and int(spigot_view_distance) > 3:
embed_var.add_field(name="⚠ no-tick-view-distance", embed_var.add_field(name="⚠ no-tick-view-distance",
value="Set a value in paper.yml.\nRecommended: " + str(spigot_view_distance) + ". And reduce view-distance in spigot.yml.\nRecommended: 3.",
value="Set a value in paper.yml. "
"Recommended: " + str(spigot_view_distance) + ". And reduce view-distance in spigot.yml. Recommended: 3.",
inline=True) inline=True)
if use_alternate_keepalive == "false" and "TCPShield" not in plugins: if use_alternate_keepalive == "false" and "TCPShield" not in plugins:
embed_var.add_field(name="⚠ use-alternate-keepalive", embed_var.add_field(name="⚠ use-alternate-keepalive",
@ -442,15 +612,18 @@ async def analyze_timings(message):
inline=True) inline=True)
if brain_ticks == 1: if brain_ticks == 1:
embed_var.add_field(name="⚠ villager.brain-ticks", embed_var.add_field(name="⚠ villager.brain-ticks",
value="Increase this in purpur.yml.\nRecommended: 4.",
value="Increase this in purpur.yml. "
"Recommended: 4.",
inline=True) inline=True)
if iron_golem_radius == 0: if iron_golem_radius == 0:
embed_var.add_field(name="⚠ spawn-iron-golem.radius", embed_var.add_field(name="⚠ spawn-iron-golem.radius",
value="Set a value in purpur.yml.\nRecommended: 32.",
value="Set a value in purpur.yml. "
"Recommended: 32.",
inline=True) inline=True)
if iron_golem_limit == 0: if iron_golem_limit == 0:
embed_var.add_field(name="⚠ spawn-iron-golem.limit", embed_var.add_field(name="⚠ spawn-iron-golem.limit",
value="Set a value in purpur.yml.\nRecommended: 5.",
value="Set a value in purpur.yml. "
"Recommended: 5.",
inline=True) inline=True)
if aggressive_towards_villager_when_lagging == "true": if aggressive_towards_villager_when_lagging == "true":
embed_var.add_field(name="⚠ zombie.aggresive-towards-villager-when-lagging", embed_var.add_field(name="⚠ zombie.aggresive-towards-villager-when-lagging",
@ -460,110 +633,11 @@ async def analyze_timings(message):
embed_var.add_field(name="⚠ entities-can-use-portals", 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 to prevent players from creating chunk anchors.",
inline=True) inline=True)
# Plugins
if "ClearLag" in plugins:
embed_var.add_field(name="⚠ ClearLag",
value="Plugins that claim to remove lag actually cause more lag. "
"Remove ClearLag.",
inline=True)
if "LagAssist" in plugins:
embed_var.add_field(name="⚠ LagAssist",
value="Plugins that claim to remove lag actually cause more lag. "
"Remove LagAssist.",
inline=True)
if "NoChunkLag" in plugins:
embed_var.add_field(name="⚠ NoChunkLag",
value="Plugins that claim to remove lag actually cause more lag. "
"Remove NoChunkLag.",
inline=True)
if "StackMob" in plugins:
embed_var.add_field(name="⚠ StackMob",
value="Stacking plugins actually cause more lag. "
"Remove StackMob.",
inline=True)
if "MobStacker" in plugins:
embed_var.add_field(name="⚠ MobStacker",
value="Stacking plugins actually cause more lag. "
"Remove MobStacker.",
inline=True)
if "WildStacker" in plugins:
embed_var.add_field(name="⚠ WildStacker",
value="Stacking plugins actually cause more lag. "
"Remove WildStacker.",
inline=True)
if "SuggestionBlocker" in plugins:
embed_var.add_field(name="⚠ SuggestionBlocker",
value="There is a good chance that you don't need SuggestionBlocker as Spigot already adds its features. "
"Set tab-complete to -1 in spigot.yml.",
inline=True)
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).",
inline=True)
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) and [HologrpahicDisplays](https://dev.bukkit.org/projects/holographic-displays).",
inline=True)
if "Spartan" in plugins:
embed_var.add_field(name="⚠ Spartan",
value="Spartan is a laggy anticheat. "
"Consider replacing it with [Matrix](https://matrix.rip/).",
inline=True)
if "IllegalStack" in plugins:
embed_var.add_field(name="⚠ IllegalStack",
value="There is a good chance that you don't need IllegalStack as Paper already has its features.",
inline=True)
if "ExploitFixer" in plugins:
embed_var.add_field(name="⚠ ExploitFixer",
value="There is a good chance that you don't need ExploitFixer as Paper already has its features.",
inline=True)
if "EntityTrackerFixer" in plugins:
embed_var.add_field(name="⚠ EntityTrackerFixer",
value="There is a good chance that you don't need EntityTrackerFixer as Paper already has its features.",
inline=True)
if "PhantomSMP" in plugins:
if phantoms_only_insomniacs:
embed_var.add_field(name="⚠ PhantomSMP",
value="There is a good chance that you don't need PhantomSMP as Paper already has its features.",
inline=True)
else:
embed_var.add_field(name="⚠ PhantomSMP",
value="There is a good chance that you don't need PhantomSMP as Paper already has its features. "
"Enable phantoms-only-attack-insomniacs in paper.yml",
inline=True)
if "SilkSpawners" in plugins and "Purpur" in version:
embed_var.add_field(name="⚠ SilkSpawners",
value="There is a good chance that you don't need SilkSpawners as Purpur already has its features.",
inline=True)
if "MineableSpawners" in plugins and "Purpur" in version:
embed_var.add_field(name="⚠ MineableSpawners",
value="There is a good chance that you don't need MineableSpawners as Purpur already has its features.",
inline=True)
if "Orebfuscator" in plugins:
embed_var.add_field(name="⚠ Orebfuscator",
value="There is a good chance that you don't need Orebfuscator as Paper already has its features.",
inline=True)
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 [DrMap](https://www.spigotmc.org/resources/drmap.87368/).",
inline=True)
if "CrazyActions" in plugins:
embed_var.add_field(name="⚠ CrazyAuctions",
value="CrazyAuctions is a laggy plugin. "
"Consider replacing it with [AuctionHouse](https://www.spigotmc.org/resources/auctionhouse.61836/).",
inline=True)
for plugin in plugins:
if "Songoda" in r["timingsMaster"]["plugins"][plugin]["authors"]:
embed_var.add_field(name="" + plugin,
value="This plugin was made by Songoda. You should remove it.",
if lobotomize_enabled == "false":
embed_var.add_field(name="⚠ villager.lobotomize.enabled",
value="Enable this in purpur.yml.",
inline=True) inline=True)
if len(embed_var.fields) == 0: if len(embed_var.fields) == 0:
embed_var.add_field(name="✅ All good", embed_var.add_field(name="✅ All good",
value="Analyzed with no issues") value="Analyzed with no issues")
@ -574,6 +648,11 @@ async def analyze_timings(message):
embed_var.description = "Showing 25 of " + str(issue_count) + " recommendations." embed_var.description = "Showing 25 of " + str(issue_count) + " recommendations."
else: else:
embed_var.description = "Showing " + str(issue_count) + " of " + str(issue_count) + " recommendations." embed_var.description = "Showing " + str(issue_count) + " of " + str(issue_count) + " recommendations."
except KeyError:
embed_var.add_field(name="⚠ Outdated",
value="Please update.",
inline=True)
await message.channel.send(embed=embed_var) await message.channel.send(embed=embed_var)

Loading…
Cancel
Save