Anti World Fly

Anti World Fly

72.4k Downloads

Plugin does not work on my server and i do not know why

MorotGamer opened this issue ยท 5 comments

commented

Plugin does not work on my server and i do not know why

Plugin Version: AntiWorldFly-2.4.1

Minecraft Version: Minecraft 1.16.5

Spigot/CraftBukkit version: git-Paper-788

Expected Behavior

The plugin should load properly

Current Behavior

The plugin does not load properly

error that happens on CMD

[23:37:27 ERROR]: [AntiWorldFly] Error while loading configuration file, disabling plugin.
[23:37:27 ERROR]: [AntiWorldFly] Verify your syntax by visiting yaml-online-parser.appspot.com and using the following logs:
org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
 in 'string', line 1, column 1:
    antiFlyWorlds:
    ^
expected <block end>, but found '<block sequence start>'
 in 'string', line 6, column 3:
      - /fly
      ^

        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:59) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[patched_1.16.5.jar:git-Paper-788]
        at com.hm.mcshared.file.CommentedYamlConfiguration.loadConfiguration(CommentedYamlConfiguration.java:139) ~[?:?]        at com.hm.antiworldfly.AntiWorldFly.extractParametersFromConfig(AntiWorldFly.java:142) ~[?:?]
        at com.hm.antiworldfly.AntiWorldFly.onEnable(AntiWorldFly.java:108) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:594) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1069) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-788]
        at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
 in 'string', line 1, column 1:
    antiFlyWorlds:
    ^
expected <block end>, but found '<block sequence start>'
 in 'string', line 6, column 3:
      - /fly
      ^

        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:235) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:95) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:119) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:150) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:490) ~[patched_1.16.5.jar:git-Paper-788]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:416) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57) ~[patched_1.16.5.jar:git-Paper-788]
        ... 14 more
[23:37:27 INFO]: [AntiWorldFly] Disabling AntiWorldFly v2.4.1
[23:37:27 INFO]: [AntiWorldFly] AntiWorldFly has been disabled.
[23:37:27 ERROR]: Error occurred while enabling AntiWorldFly v2.4.1 (Is it up to date?)
java.lang.IllegalStateException: zip file closed
        at java.util.zip.ZipFile.ensureOpen(ZipFile.java:829) ~[?:?]
        at java.util.zip.ZipFile.getEntry(ZipFile.java:328) ~[?:?]
        at java.util.jar.JarFile.getEntry(JarFile.java:519) ~[?:?]
        at java.util.jar.JarFile.getJarEntry(JarFile.java:474) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:167) ~[patched_1.16.5.jar:git-Paper-788]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:586) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-788]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
        at com.hm.antiworldfly.AntiWorldFly.onEnable(AntiWorldFly.java:112) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.16.5.jar:git-Paper-788]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:594) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1069) ~[patched_1.16.5.jar:git-Paper-788]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-788]
        at java.lang.Thread.run(Thread.java:831) [?:?]

Context (Environment)

I want to prevent player from using fly-hacks, the plugin should kick them when they are flying so i wont need staff on my server, i want everything automatic

commented

The error you've posted here shows that something is wrong in your config file, specifically:

antiFlyWorlds:
^
expected , but found ''
in 'string', line 6, column 3:
- /fly
^

If you need help identifying the issue with your config file, feel free to post it here and I can assist you.

I want to prevent player from using fly-hacks

One more thing, I think there is a misunderstanding of what this plugin does. It simply prevents players from using the fly command/permission in specified worlds. AntiWorldFly doesn't act as an anti-cheat so for that you'd have to look elsewhere.

commented

The plugin does not function as an anti-cheat. It also does not report flight to the logs as it doesn't really have a need to. AntiWorldFly only prevents players from flying if you have authorized them to fly using a permissions plugin or some other method of enabling flight in survival without client-side modifications. It doesn't detect hacks.

How the plugin identifies that a player is flying?

It listens for players using Minecraft's built-in flight mechanics, for further info, you can check out the event listeners https://github.com/PyvesB/AntiWorldFly/tree/master/src/main/java/com/hm/antiworldfly/listener

commented
antiFlyWorlds: 
  - world
  - world_nether
  - world_the_end
otherBlockedCommands: []
  - /fly
elytraDisabled: fly
chatMessage: true
titleMessage: true
antiFlyCreative: false
notifyNotFlying: true
toggleFlyingInNonBlockedWorlds: false
icon: '\u06DE'
languageFileName: lang.yml
checkForUpdate: true
commented

You'll need to remove the [] from line 5. Example: https://pastebin.com/wvAWAFwA

commented

How the plugin identifies that a player is flying? Where do i find that information? The server or the plugin will give me an information that such player is flying on the server? or the plugin only put messages on the screen about flying?