Ban Management

Ban Management

193k Downloads

Problem with hooks config

EvilOlaf opened this issue ยท 0 comments

commented

I was trying to set up a post warn command using the provided hooks but I could not manage to integrate them. Probably a very trivial formatting issue but I didn't get it.

hooks:
  enabled: true
  events:
    warn
      post:
      - cmd: 'say do sumding!'

Caused:

[12:38:30 INFO]: Olaf issued server command: /bmreload
[12:38:30 ERROR]: [BanManager] Invalid yaml file config.yml
[12:38:30 WARN]: org.bukkit.configuration.InvalidConfigurationException: mapping values are not allowed here
 in 'string', line 95, column 11:
          post:
              ^

[12:38:30 WARN]:        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57)
[12:38:30 WARN]:        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:226)
[12:38:30 WARN]:        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:169)
[12:38:30 WARN]:        at me.confuser.banmanager.bukkitutil.configs.Config.onLoad(Config.java:126)
[12:38:30 WARN]:        at me.confuser.banmanager.bukkitutil.configs.Config.load(Config.java:90)
[12:38:30 WARN]:        at me.confuser.banmanager.commands.ReloadCommand.onCommand(ReloadCommand.java:18)
[12:38:30 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[12:38:30 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
[12:38:30 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[12:38:30 WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[12:38:30 WARN]:        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:714)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:653)
[12:38:30 WARN]:        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:556)
[12:38:30 WARN]:        at java.lang.Thread.run(Thread.java:745)
[12:38:30 WARN]: Caused by: mapping values are not allowed here
 in 'string', line 95, column 11:
          post:
              ^

[12:38:30 WARN]:        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:871)
[12:38:30 WARN]:        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
[12:38:30 WARN]:        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
[12:38:30 WARN]:        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
[12:38:30 WARN]:        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
[12:38:30 WARN]:        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
[12:38:30 WARN]:        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:224)
[12:38:30 WARN]:        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155)
[12:38:30 WARN]:        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:229)
[12:38:30 WARN]:        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155)
[12:38:30 WARN]:        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
[12:38:30 WARN]:        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
[12:38:30 WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
[12:38:30 WARN]:        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:450)
[12:38:30 WARN]:        at org.yaml.snakeyaml.Yaml.load(Yaml.java:369)
[12:38:30 WARN]:        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55)
[12:38:30 WARN]:        ... 21 more