Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite ChunkUnloading logic #1148

Open
yannicklamprecht opened this issue Jan 2, 2020 · 4 comments
Open

Rewrite ChunkUnloading logic #1148

yannicklamprecht opened this issue Jan 2, 2020 · 4 comments

Comments

@yannicklamprecht
Copy link

In 1.15+ the chunkloadevent isn't cancelable anymore. This mechanic is replaced by flagging the chunk as force-loaded.
We need to find the places in code where the following is set and replace the call with the force-loaded flag.

List<Field> fields = plugin.getForceFieldManager().getSourceFieldsInChunk(new ChunkVec(event.getChunk()), FieldFlag.KEEP_CHUNKS_LOADED);

https://github.com/NathanWolf/PreciousStones/blob/master/src/main/java/net/sacredlabyrinth/Phaed/PreciousStones/listeners/PSWorldListener.java#L49

@Zikye
Copy link

Zikye commented Jan 7, 2020

Hi, why do I get this error when I run the latest version of PreciousStones on my server 1.15.1?

[12:41:58] [Server thread/ERROR]: Error occurred while enabling PreciousStones v15.0 (Is it up to date?)
java.lang.NoClassDefFoundError: br/net/fabiozumbi12/RedProtect/Bukkit/RedProtect
at net.sacredlabyrinth.Phaed.PreciousStones.managers.RedProtectManager.(RedProtectManager.java:25) ~[?:?]
at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.onEnable(PreciousStones.java:151) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:456) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:266) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:783) [spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.ClassNotFoundException: br.net.fabiozumbi12.RedProtect.Bukkit.RedProtect
at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:135) ~[spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:81) ~[spigot-1.15.1.jar:git-Spigot-2ee05fe-d31f05f]
at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
... 11 more

@yannicklamprecht
Copy link
Author

This Plugin requires RedProtect in your plugin folder.

@Zikye
Copy link

Zikye commented Jan 7, 2020

What? why now you have to add the plugin?

@yannicklamprecht
Copy link
Author

Never used this plugin. I just updated it to the latest version. PR changes into it if you want to make it optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants