Autorank

Autorank

380k Downloads

Merge old "AdvancedConfig.yml" to "Paths.yml"

Imothep80 opened this issue · 7 comments

commented

Hi,
i try to merge my old advanced config to the new paths config. But it seems not work. In your wiki i cant find a Resolution. Maybe that you have a idea how to rewrite this:

`ranks:`
`    default:`
`        requirements:`
`            time:`
`                value: 1m`
`        results:`
`            rank change: default; Beginner`
`            command: 'kit Neuling &p; say &p ist jetzt ein neuer Mitspieler. :); pex user &p group set `Beginner; adjustbonusclaimblocks &p 400'`
`            message: 'Willkommen! :)'`
`    Beginner:`
`        requirements:`
`            time:`
`                value: 1d`
`        results:`
`            rank change: Beginner; Spieler`
`            message: 'Du bist aufgestiegen. Danke für deine Spielzeit.; pex user &p group set Spieler'`

...this is just a snipset. I try to make this:

`default:`
`  prerequisites:`
`    in group:`
`    value: default`
`  requirements:`
`    global time: 1m`
`  results:`
`    rank change: default; Beginner`
`    command: say &p ist jetzt ein neuer Mitspieler. :)`
`    command2: pex user &p group set Beginner`
`    message: Willkommen! :)`
`  options:`
`    display name: Auf dem weg zum Beginner`

And i got an error during reload:

>ar reload [10:18:51 WARN]: Unexpected exception while parsing console command "ar reload" org.bukkit.command.CommandException: Unhandled exception executing command 'ar' in plugin Autorank v4.0.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(CraftServer.java:636) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:437) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] Caused by: java.lang.NullPointerException at me.armar.plugins.autorank.config.PathsConfig.getResults(PathsConfig.java:377) ~[?:?] at me.armar.plugins.autorank.pathbuilder.PathBuilder.initialisePaths(PathBuilder.java:135) ~[?:?] at me.armar.plugins.autorank.pathbuilder.PathManager.initialiseFromConfigs(PathManager.java:154) ~[?:?] at me.armar.plugins.autorank.commands.ReloadCommand.onCommand(ReloadCommand.java:41) ~[?:?] at me.armar.plugins.autorank.commands.manager.CommandsManager.onCommand(CommandsManager.java:169) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20] ... 8 more

commented

It seems your Paths.yml is fine. Try avoid using the /ar reload command. It can be buggy.

commented

Try restarting your server and see what happens.

commented

ar check Imothep80
[12:05:29 INFO]: -------------------------------------
[12:05:29 INFO]: There are multiple ranking paths, please choose one with '/ar choose'.
[12:05:29 INFO]: You can always change later if you want, but you'll lose your progress.
[12:05:29 INFO]: To check what each path looks like, use '/ar view'.
[12:05:29 INFO]: You can see a list of paths with '/ar view list'.
[12:05:29 INFO]: -------------------------------------
ar view list
[12:05:36 INFO]: There are no paths that you can choose.
ar reload
[12:06:00 WARN]: Unexpected exception while parsing console command "ar reload"
org.bukkit.command.CommandException: Unhandled exception executing command 'ar' in plugin Autorank v4.0.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(CraftServer.java:636) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:437) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Caused by: java.lang.IllegalArgumentException: Prerequisite 'value' of path 'default' is unknown!
at me.armar.plugins.autorank.pathbuilder.PathBuilder.initialisePaths(PathBuilder.java:246) ~[?:?]
at me.armar.plugins.autorank.pathbuilder.PathManager.initialiseFromConfigs(PathManager.java:154) ~[?:?]
at me.armar.plugins.autorank.commands.ReloadCommand.onCommand(ReloadCommand.java:41) ~[?:?]
at me.armar.plugins.autorank.commands.manager.CommandsManager.onCommand(CommandsManager.java:169) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
... 8 more

nope

commented

Prerequisite 'value' of path 'default' is unknown! Can you provide your complete Paths.yml file?

commented

testet with 4.0.2

# Paths file - This file will contain all paths that a player is allowed to take. Previously known as 'AdvancedConfig.yml'.
# This file contains (by default) a Test group that shows the basic syntax of this file. 
# For more information, go to https://github.com/Armarr/Autorank-2/wiki/How-to-configure-the-Paths.yml-file%3F.
default:
  prerequisites:
    value: default
  requirements:
    global time: 1m
  results:
    rank change: default; Beginner
    command: say &p ist jetzt ein neuer Mitspieler. :)
    command2: pex user &p group set Beginner
    message: Willkommen! :)
  options:
    display name: Auf dem weg zum Beginner

message by /ar reload:

[17:25:23 WARN]: Unexpected exception while parsing console command "ar reload"
org.bukkit.command.CommandException: Unhandled exception executing command 'ar' in plugin Autorank v4.0.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(CraftServer.java:636) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:437) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Caused by: java.lang.IllegalArgumentException: Result 'rank change' of group 'default' is unknown!
        at me.armar.plugins.autorank.pathbuilder.PathBuilder.initialisePaths(PathBuilder.java:139) ~[?:?]
        at me.armar.plugins.autorank.pathbuilder.PathManager.initialiseFromConfigs(PathManager.java:154) ~[?:?]
        at me.armar.plugins.autorank.commands.ReloadCommand.onCommand(ReloadCommand.java:41) ~[?:?]
        at me.armar.plugins.autorank.commands.manager.CommandsManager.onCommand(CommandsManager.java:169) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-4d3bf20]
        ... 8 more
>
commented

Result 'rank change' of group 'default' is unknown!

I temporarily removed the rank change as it was very buggy. You should try using a command result that sets the permission group of the player instead.

commented

okay. as Workaround accept!