ItsLewizzz / DeluxeHub

:floppy_disk: All-in-one, essential and professional hub core solution.
https://www.spigotmc.org/resources/49425/
GNU General Public License v3.0
88 stars 74 forks source link

[BUG] Lobby Location Does Not Persist After Restart #6

Open elsell opened 4 years ago

elsell commented 4 years ago

ISSSUE DESCRIPTION After restarting the server, the Lobby (hub) location seems to not be set. After the restart, running /lobby results in the message saying that the Lobby is not set, and to use /setlobby.

SERVER INFORMATION I am using Multiverse and the lobby location is set in a world named Spawn. I assume that the issue is caused by DeluxeHub loading before Multiverse and therefore not being able to find the non-default-named world Spawn.

Here are the versions for the applicable plugins:

> paper version
[18:43:30 INFO]: This server is running Paper version git-Paper-375 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)

> version DeluxeHub
[18:43:44 INFO]: DeluxeHub version 3.3.7

> version Multiverse-Core
[18:43:56 INFO]: Multiverse-Core version 4.1.0-b775

CONSOLE ERROR Upon starting the server, there is the very telling console error:

[18:40:20 INFO]: [DeluxeHub] Enabling DeluxeHub v3.3.7
[18:40:20 INFO]: [DeluxeHub]  _   _            _          _    _
[18:40:20 INFO]: [DeluxeHub] | \ |_ |  | | \/ |_ |_| | | |_)   _)
[18:40:20 INFO]: [DeluxeHub] |_/ |_ |_ |_| /\ |_ | | |_| |_)   _)
[18:40:20 INFO]: [DeluxeHub]
[18:40:20 INFO]: [DeluxeHub] Version: 3.3.7
[18:40:20 INFO]: [DeluxeHub] Author: ItsLewizzz
[18:40:20 INFO]: [DeluxeHub]
[18:40:20 INFO]: [DeluxeHub]  Hooked into PlaceholderAPI
[18:40:20 ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.Location org.bukkit.Location.deserialize(java.util.Map)' of class org.bukkit.Location for deserialization
java.lang.IllegalArgumentException: unknown world
        at org.bukkit.Location.deserialize(Location.java:1123) ~[patched_1.15.2.jar:git-Paper-375]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
        at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeViaMethod(ConfigurationSerialization.java:85) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.serialization.ConfigurationSerialization.deserialize(ConfigurationSerialization.java:127) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeObject(ConfigurationSerialization.java:207) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:37) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:216) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:205) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:465) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:184) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:446) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:521) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:28) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:216) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:205) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:164) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:148) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:525) ~[patched_1.15.2.jar:git-Paper-375]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:438) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:54) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[patched_1.15.2.jar:git-Paper-375]
        at fun.lewisdev.deluxehub.config.ConfigHandler.saveDefaultConfig(ConfigHandler.java:31) ~[?:?]
        at java.util.HashMap$Values.forEach(HashMap.java:981) ~[?:1.8.0_252]
        at fun.lewisdev.deluxehub.config.ConfigManager.loadFiles(ConfigManager.java:26) ~[?:?]
        at fun.lewisdev.deluxehub.DeluxeHub.onEnable(DeluxeHub.java:73) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:472) ~[patched_1.15.2.jar:git-Paper-375]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:386) ~[patched_1.15.2.jar:git-Paper-375]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:488) ~[patched_1.15.2.jar:git-Paper-375]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.15.2.jar:git-Paper-375]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:908) ~[patched_1.15.2.jar:git-Paper-375]
elsell commented 3 years ago

@Bad on Discord helped me figure this out.

The plugin.yml for DeluxeHub must include Multiverse-Core as a depend, not just soft-depend. See below for the relevant parts:

plugin.yml

name: DeluxeHub
author: ItsLewizzz
version: 3.3.9
description: An all-in-one hub management system
website: https://www.spigotmc.org/resources/deluxehub.49425/
api-version: 1.13
main: fun.lewisdev.deluxehub.DeluxeHub
loadbefore: [Essentials]
softdepend: [PlaceholderAPI, HeadDatabase, Multiverse-Core]
depend: [Multiverse-Core]  <---------------------------------------------- Added this line
permissions:
  deluxehub.*:
    description: Gives access to all Deluxe
Rocket012 commented 1 year ago

I see exactly the same thing, I tried the solution and it didn't work. Can someone please help me!