Browse Source

Timings - Better error handling

master
DrBot7 4 years ago
parent
commit
60ea835da2
  1. 226
      cogs/timings.py

226
cogs/timings.py

@ -2,6 +2,7 @@ import discord
from discord.ext import commands
import requests
class Timings(commands.Cog):
def __init__(self, bot):
@ -49,7 +50,6 @@ 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
unchecked = 0
try:
try:
version = r["timingsMaster"]["version"]
if "1.16.4" not in version:
@ -66,6 +66,9 @@ class Timings(commands.Cog):
"Consider using [Purpur](https://ci.pl3x.net/job/Purpur/).||")
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"]
@ -78,6 +81,9 @@ class Timings(commands.Cog):
value="Enable this in server.properties 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"])
@ -86,6 +92,9 @@ class Timings(commands.Cog):
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"]
@ -94,6 +103,9 @@ class Timings(commands.Cog):
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"]
@ -144,6 +156,9 @@ class Timings(commands.Cog):
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:
@ -154,6 +169,9 @@ class Timings(commands.Cog):
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"]
@ -270,6 +288,9 @@ class Timings(commands.Cog):
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"]
@ -289,6 +310,9 @@ class Timings(commands.Cog):
"Enable villager.lobotomize.enabled in purpur.yml.")
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"]
@ -305,6 +329,9 @@ class Timings(commands.Cog):
"Enable phantoms-only-attack-insomniacs in paper.yml.")
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(
@ -318,6 +345,9 @@ class Timings(commands.Cog):
value="Set this to -1 in server.properties 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"]
@ -328,6 +358,9 @@ class Timings(commands.Cog):
"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"])
@ -336,6 +369,9 @@ class Timings(commands.Cog):
value="Decrease this in 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"])
@ -344,6 +380,9 @@ class Timings(commands.Cog):
value="Increase this in 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"])
@ -352,6 +391,9 @@ class Timings(commands.Cog):
value="Decrease this in 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"])
@ -360,6 +402,9 @@ class Timings(commands.Cog):
value="Decrease this in 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"])
@ -368,6 +413,9 @@ class Timings(commands.Cog):
value="Decrease this in 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"])
@ -376,6 +424,9 @@ class Timings(commands.Cog):
value="Decrease this in 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"])
@ -384,6 +435,9 @@ class Timings(commands.Cog):
value="Decrease this in 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"])
@ -400,6 +454,9 @@ class Timings(commands.Cog):
"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(
@ -411,6 +468,9 @@ class Timings(commands.Cog):
"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(
@ -422,6 +482,9 @@ class Timings(commands.Cog):
"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(
@ -429,6 +492,9 @@ class Timings(commands.Cog):
"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(
@ -439,6 +505,9 @@ class Timings(commands.Cog):
"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(
@ -449,6 +518,9 @@ class Timings(commands.Cog):
"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(
@ -460,6 +532,9 @@ class Timings(commands.Cog):
"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(
@ -467,6 +542,9 @@ class Timings(commands.Cog):
"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 = \
@ -477,6 +555,9 @@ class Timings(commands.Cog):
value="Disable this in spigot.yml.")
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"]
@ -485,6 +566,9 @@ class Timings(commands.Cog):
value="Enable this in spigot.yml.")
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(
@ -492,6 +576,9 @@ class Timings(commands.Cog):
"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"][
@ -502,6 +589,9 @@ class Timings(commands.Cog):
"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(
@ -513,6 +603,9 @@ class Timings(commands.Cog):
"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(
@ -521,6 +614,9 @@ class Timings(commands.Cog):
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(
@ -532,6 +628,9 @@ class Timings(commands.Cog):
"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(
@ -543,6 +642,9 @@ class Timings(commands.Cog):
"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(
@ -554,6 +656,9 @@ class Timings(commands.Cog):
"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(
@ -565,6 +670,9 @@ class Timings(commands.Cog):
"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(
@ -572,6 +680,9 @@ class Timings(commands.Cog):
"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(
@ -579,6 +690,9 @@ class Timings(commands.Cog):
"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(
@ -590,6 +704,9 @@ class Timings(commands.Cog):
"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(
@ -601,6 +718,9 @@ class Timings(commands.Cog):
"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(
@ -611,6 +731,9 @@ class Timings(commands.Cog):
"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(
@ -621,6 +744,9 @@ class Timings(commands.Cog):
"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(
@ -631,6 +757,9 @@ class Timings(commands.Cog):
"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(
@ -641,6 +770,9 @@ class Timings(commands.Cog):
"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(
@ -651,6 +783,9 @@ class Timings(commands.Cog):
"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"][
@ -660,6 +795,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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(
@ -670,6 +808,9 @@ class Timings(commands.Cog):
"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 = \
@ -680,6 +821,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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(
@ -690,6 +834,9 @@ class Timings(commands.Cog):
"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(
@ -700,6 +847,9 @@ class Timings(commands.Cog):
"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(
@ -710,6 +860,9 @@ class Timings(commands.Cog):
"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"])
@ -719,6 +872,9 @@ class Timings(commands.Cog):
"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"][
@ -728,6 +884,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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(
@ -738,6 +897,9 @@ class Timings(commands.Cog):
"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(
@ -748,6 +910,9 @@ class Timings(commands.Cog):
"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"][
@ -757,6 +922,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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"][
@ -766,6 +934,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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"]
@ -774,6 +945,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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"]
@ -782,6 +956,9 @@ class Timings(commands.Cog):
value="Disable this in paper.yml.")
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"]
@ -791,6 +968,9 @@ class Timings(commands.Cog):
value="Disable this in paper.yml.")
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"][
@ -800,6 +980,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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 = \
@ -809,6 +992,9 @@ class Timings(commands.Cog):
value="Enable this in paper.yml.")
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(
@ -829,6 +1015,9 @@ class Timings(commands.Cog):
"Recommended: " + spigot_view_distance + ". And reduce view-distance in spigot.yml. 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"][
@ -838,6 +1027,9 @@ class Timings(commands.Cog):
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.")
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"][
@ -847,6 +1039,9 @@ class Timings(commands.Cog):
value="Set a value in paper.yml. 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"]
@ -859,6 +1054,9 @@ class Timings(commands.Cog):
value="Disable this in purpur.yml. 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"][
@ -868,6 +1066,9 @@ class Timings(commands.Cog):
value="Enable this in purpur.yml.")
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 = \
@ -878,6 +1079,9 @@ class Timings(commands.Cog):
value="Enable this in purpur.yml.")
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(
@ -889,6 +1093,9 @@ class Timings(commands.Cog):
"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(
@ -900,6 +1107,9 @@ class Timings(commands.Cog):
"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(
@ -911,6 +1121,9 @@ class Timings(commands.Cog):
"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 = \
@ -921,6 +1134,9 @@ class Timings(commands.Cog):
value="Disable this in purpur.yml.")
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 = \
@ -931,6 +1147,9 @@ class Timings(commands.Cog):
value="Disable this in purpur.yml 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"][
@ -940,6 +1159,9 @@ class Timings(commands.Cog):
value="Enable this in purpur.yml.")
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"]
@ -948,7 +1170,7 @@ class Timings(commands.Cog):
value="Enable this in purpur.yml.")
except KeyError:
unchecked = unchecked + 1
except ValueError:
except:
embed_var.add_field(name="❌ Invalid Configuration",
value="At least one of your configuration files had an invalid data type.")

Loading…
Cancel
Save