-
Notifications
You must be signed in to change notification settings - Fork 3
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
✨ Feature: Reload Qib definitions #26
Comments
Yup, definitely an essential feature. I kinda do want to make my code much nicer first, because currently it's such a mess. Ideally this will be added in #21. |
Hey! Added In code you can do it with smth like: // Reload the config file (bukkit thingie)
reloadConfig();
// Rebuild the config object
var config = new NoxesiumUtilsConfigBuilder()
.withConfig(getConfig())
.withQibFolder(Path.of(getDataFolder().getPath(), "qibs").toFile())
.withLogger(getLogger())
.build();
// Update the config in the existing NoxesiumUtils object
noxesiumUtils.setConfig(config);
// Reload available commands
new CommandRegistrar(this, noxesiumUtils, updateChecker).registerCommands(); |
Either i'm compiling it wrong or there's something wrong. Currently getting this error when trying to load the commands. Server version: 1.21.1 If this info helps, the configs exist. Full error:
|
Could you share your config.yml? |
|
Seems like this is because you have no Qibs defined. I always had a couple in my config so let a bug slip. Try the latest build again, please. |
I got past enabling but i'm getting another error after changing the default server rules. The updated default rules also don't get sent. For this line specifically everytime you reload the number goes up by 1: Full error:
Config.yml:
|
Looks like this only happens if someone is on the server. It reloads fine whenever no one is on but i see no packets being sent whenever I join the server (except for outgoing: |
Yeah, that error is probably something that has to do with reregistering commands, but I don't think it actually breaks anything. I will see if I can do anything about it. About your default server rules not being applied. You have them off: # If true will send defaults to Noxesium Players on join.
sendDefaultsOnJoin: false # this should be true for you |
Yup, everything works normally even all commands. |
Is your feature request related to a problem? Please describe it.
Thought this might become a thing that is gonna come up once people start using Qibs
Describe your suggestion
A command to reload Qib definitions, and seeing as you want to make this usable as a dependency you could also make
loadQibEffectsAndDefinitions()
a public function.Additional context
Potentially a reload command in general (ex.:
/noxesiumutils reload
) that also reloads custom creative items (might cause issues looking at this bug Noxcrew/noxesium#106)The text was updated successfully, but these errors were encountered: