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

refactor config handling + added /sf reload #3908

Closed
wants to merge 2 commits into from

Conversation

J3fftw1
Copy link
Contributor

@J3fftw1 J3fftw1 commented Jul 11, 2023

Description

Supercedes #2822

This pull requests moves the config-related stuff from SlimefunRegistry to a dedicated Config Manager.
It also allows some basic reload functionality,, accessible via /sf reload (Many people requested this for a long time).
Note that this is not fully finished though, so not all changes are supported and a lot will still require a restart.

Changes

  • Added /sf reload
  • Added Config Manager to handle our configs
  • All relevant config files have been moved to this Config Manager class
  • All relevant cached data was moved to the Config Manager too

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@J3fftw1 J3fftw1 requested a review from a team as a code owner July 11, 2023 16:19
@github-actions github-actions bot added the 🧹 Chores Refactoring / Cleanup. label Jul 11, 2023
@github-actions
Copy link
Contributor

Your Pull Request was automatically labelled as: "🧹 Chores"
Thank you for contributing to this project! ❤️

@J3fftw1 J3fftw1 added the 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. label Jul 11, 2023
@github-actions
Copy link
Contributor

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: d0b92569

https://preview-builds.walshy.dev/download/Slimefun/3908/d0b92569

Note: This is not a supported build and is only here for the purposes of testing.
Do not run this on a live server and do not report bugs anywhere but this PR!

@sonarcloud
Copy link

sonarcloud bot commented Jul 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 18 Code Smells

41.6% 41.6% Coverage
0.0% 0.0% Duplication

@@ -14,6 +14,7 @@
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;

import io.github.bakedlibs.dough.config.Config;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import order

@@ -6,6 +6,7 @@
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;

import com.google.common.base.Preconditions;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import com.google.common.base.Preconditions;
import com.google.common.base.Preconditions;

@@ -10,6 +10,7 @@
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;

import io.github.bakedlibs.dough.config.Config;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import order

@J3fftw1 J3fftw1 marked this pull request as draft July 12, 2023 08:09
@J3fftw1 J3fftw1 closed this Jul 29, 2023
@variananora variananora removed the 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 Chores Refactoring / Cleanup.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants