Default values not right in /spec config
pgmann opened this issue ยท 6 comments
I downloaded the plugin, generated fresh config and tried spec config. As far as I can see the /spec config
command is often wrong about the default value, if not always. It seems to like saying false
but even when it says the current value is true
. I have not changed the value of these toggles.
Example?
The default values are not read from the config.yml
file inside the JAR, but from the second argument of the configuration entries in the Toggles
class. The divergences may come from this, if I entered wrong default values.
A lot of toggles seem to be wrong. Both onSpectatorModeChanged.teleportation...
entries seem to be wrong. I haven't managed to check them all...
I switched these default values to false
to avoid unwanted spawn teleportation when the spectator mode is changed, considering more players use this as a simple spectating tool that as a full lobby & arenas manager.
There is indeed an incoherence between the Toggles
and the config.yml
for the keys you mentionned.
public static final ConfigurationItem<Boolean> ONSPECMODECHANGED_TELEPORTATION_TOSPAWN = ConfigurationItem.item("onSpectatorModeChanged.teleportation.toSpawnWithoutLobby", false, "teleportToSpawnOnSpecChangeWithoutLobby");
public static final ConfigurationItem<Boolean> ONSPECMODECHANGED_TELEPORTATION_WITHSPAWNCMD = ConfigurationItem.item("onSpectatorModeChanged.teleportation.usingSpawnCommand", false, "useSpawnCommandToTeleport");
# What to do when the spectator mode is changed (enabled or disabled)?
onSpectatorModeChanged:
teleportation:
# Teleport the player to the spawn if there isn't any Main Lobby set
toSpawnWithoutLobby: true
# When teleporting the players to the spawn (without a main lobby set), use the /spawn command, or
# the spawn point of the current world?
usingSpawnCommand: true