SpectatorPlus

SpectatorPlus

34.1k Downloads

Default values not right in /spec config

pgmann opened this issue ยท 6 comments

commented

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.

commented

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.

commented

A lot of toggles seem to be wrong. Both onSpectatorModeChanged.teleportation... entries seem to be wrong. I haven't managed to check them all...

commented

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
commented

Heh nice. Do you have time to check if the others are ok?

commented

I will :) .

commented

Thanks. I'm testing the plugin (as I haven't really used it for a while) on a server at pgmann.cf. Just found another bug ;) You can come on and help if you have time now.