Euphillya / Skyllia

Skyblock Plugin for Folia (Minecraft) and PaperMC
MIT License
44 stars 6 forks source link

Some Problems During Create the Island #9

Closed haha252 closed 9 months ago

haha252 commented 9 months ago

Thank you very much for releasing the first version! In our test with my friend, we first introduced a single-block sky island.


Problem 1

We found that if we set the value of island-types.example in the configuration file from 50.0 to 50, this will cause a plugin error. The configuration file (others are not attached because there is no other modification except for the modification and correctness of the database information) is as follows:

[island-types]
    [island-types.example]
        size = 50
        name = "example"
        max-members = 3
[config]
    max-island = 1000 

Error as follows:

[16:49:57 FATAL]: [fr.euphyllia.skyfolia.configuration.ConfigToml] Lecture des config
[16:49:57 FATAL]: [fr.euphyllia.skyfolia.configuration.ConfigToml] Erreur de lecture !
java.lang.reflect.InvocationTargetException: null
        at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:109) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
        at fr.euphyllia.skyfolia.configuration.ConfigToml.readConfig(ConfigToml.java:67) ~[SkyFolia-1.0-alpha.1-all.jar:?]
        at fr.euphyllia.skyfolia.configuration.ConfigToml.init(ConfigToml.java:50) ~[SkyFolia-1.0-alpha.1-all.jar:?]
        at fr.euphyllia.skyfolia.api.InterneAPI.setupConfigs(InterneAPI.java:92) ~[SkyFolia-1.0-alpha.1-all.jar:?]
        at fr.euphyllia.skyfolia.Main.onEnable(Main.java:34) ~[SkyFolia-1.0-alpha.1-all.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[folia-api-1.20.2-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.20.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugin(CraftServer.java:650) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugins(CraftServer.java:561) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:670) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:452) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:343) ~[folia-1.20.2.jar:git-Folia-"28bd3f7"]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Double (java.lang.Integer and java.lang.Double are in module java.base of loader 'bootstrap')
        at fr.euphyllia.skyfolia.configuration.ConfigToml.getDouble(ConfigToml.java:100) ~[SkyFolia-1.0-alpha.1-all.jar:?]
        at fr.euphyllia.skyfolia.configuration.ConfigToml.typeIsland(ConfigToml.java:190) ~[SkyFolia-1.0-alpha.1-all.jar:?]
        at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
        ... 17 more
[16:49:57 FATAL]: [fr.euphyllia.skyfolia.configuration.LanguageToml] Lecture des config

Problem 2

If this value is set to 500.0, it will prompt "Size Exceed". The configuration file is as follows:

[island-types]
    [island-types.example]
        size = 500.0
        name = "example"
        max-members = 3
[config]
    max-island = 1000

Error as follows:

[16:51:59 INFO]: LuoXiaoHei issued server command: /skyfolia create
[16:51:59 FATAL]: [fr.euphyllia.skyfolia.managers.skyblock.SkyblockManager] Size exceeded !

Problem 3

We directly generated an empty island under the original configuration. When we joined to the island, we found that we could not place or destroy blocks, even if we were Owner level. Next, we tried to teleport to each other's islands and authorize them. We used /skyfolia premission for authorization. Give visitor and member the permission to place and destroy blocks (we are sure that the execution is successful), but we still cannot destroy and place blocks.


Hope to fix it!

Euphillya commented 9 months ago

https://github.com/Euphillya/SkyFolia/commit/1ceccdd06b12d8f002d616189d83eb6d3376067a https://github.com/Euphillya/SkyFolia/commit/e8fa484b8ab519a3e5e2772053d53113dbe0b8f0