mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Merge pull request #3097 from Slimefun/chore/config-cleanup
Change config for consistency and improvement
This commit is contained in:
commit
ee14c513ba
@ -256,13 +256,8 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
|
|||||||
PaperLib.suggestPaper(this);
|
PaperLib.suggestPaper(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabling backwards-compatibility for fresh Slimefun installs
|
// If the server has no "data-storage" folder, it's _probably_ a new install. So mark it for metrics.
|
||||||
if (!new File("data-storage/Slimefun").exists()) {
|
isNewlyInstalled = !new File("data-storage/Slimefun").exists();
|
||||||
config.setValue("options.backwards-compatibility", false);
|
|
||||||
config.save();
|
|
||||||
|
|
||||||
isNewlyInstalled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Creating all necessary Folders
|
// Creating all necessary Folders
|
||||||
getLogger().log(Level.INFO, "Creating directories...");
|
getLogger().log(Level.INFO, "Creating directories...");
|
||||||
|
@ -305,7 +305,7 @@ public class SlimefunItem implements Placeable {
|
|||||||
* @return An {@link Optional} describing the result
|
* @return An {@link Optional} describing the result
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@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) {
|
for (ItemSetting<?> setting : itemSettings) {
|
||||||
if (setting.getKey().equals(key) && setting.isType(c)) {
|
if (setting.getKey().equals(key) && setting.isType(c)) {
|
||||||
return Optional.of((ItemSetting<T>) setting);
|
return Optional.of((ItemSetting<T>) setting);
|
||||||
|
@ -5,7 +5,7 @@ options:
|
|||||||
# You can download the latest stable build here: https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/
|
# You can download the latest stable build here: https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/
|
||||||
|
|
||||||
auto-update: true
|
auto-update: true
|
||||||
backwards-compatibility: true
|
backwards-compatibility: false
|
||||||
chat-prefix: '&a&lSlimefun 4&7> '
|
chat-prefix: '&a&lSlimefun 4&7> '
|
||||||
armor-update-interval: 10
|
armor-update-interval: 10
|
||||||
enable-armor-effects: true
|
enable-armor-effects: true
|
||||||
@ -30,7 +30,7 @@ researches:
|
|||||||
|
|
||||||
URID:
|
URID:
|
||||||
info-delay: 3000
|
info-delay: 3000
|
||||||
custom-ticker-delay: 12
|
custom-ticker-delay: 10
|
||||||
enable-tickers: true
|
enable-tickers: true
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
Loading…
Reference in New Issue
Block a user