1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Merge pull request #3097 from Slimefun/chore/config-cleanup

Change config for consistency and improvement
This commit is contained in:
TheBusyBiscuit 2021-06-03 19:00:19 +02:00 committed by GitHub
commit ee14c513ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -256,13 +256,8 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
PaperLib.suggestPaper(this);
}
// Disabling backwards-compatibility for fresh Slimefun installs
if (!new File("data-storage/Slimefun").exists()) {
config.setValue("options.backwards-compatibility", false);
config.save();
isNewlyInstalled = true;
}
// If the server has no "data-storage" folder, it's _probably_ a new install. So mark it for metrics.
isNewlyInstalled = !new File("data-storage/Slimefun").exists();
// Creating all necessary Folders
getLogger().log(Level.INFO, "Creating directories...");
@ -1036,4 +1031,4 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
return instance.getServer().getScheduler().runTask(instance, runnable);
}
}
}

View File

@ -305,7 +305,7 @@ public class SlimefunItem implements Placeable {
* @return An {@link Optional} describing the result
*/
@SuppressWarnings("unchecked")
public <T> @Nonnull Optional<ItemSetting<T>> getItemSetting(@Nonnull String key, @Nonnull Class<T> c) {
public @Nonnull <T> Optional<ItemSetting<T>> getItemSetting(@Nonnull String key, @Nonnull Class<T> c) {
for (ItemSetting<?> setting : itemSettings) {
if (setting.getKey().equals(key) && setting.isType(c)) {
return Optional.of((ItemSetting<T>) setting);

View File

@ -5,7 +5,7 @@ options:
# You can download the latest stable build here: https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/
auto-update: true
backwards-compatibility: true
backwards-compatibility: false
chat-prefix: '&a&lSlimefun 4&7> '
armor-update-interval: 10
enable-armor-effects: true
@ -30,7 +30,7 @@ researches:
URID:
info-delay: 3000
custom-ticker-delay: 12
custom-ticker-delay: 10
enable-tickers: true
networks: