From 7c60989f08da9ed012a795e8e221761f1494530c Mon Sep 17 00:00:00 2001 From: Aurora Date: Fri, 14 Aug 2020 18:10:30 +0200 Subject: [PATCH] Added config options for particles and holograms by default --- .../songoda/ultimaterepairing/listeners/BlockListeners.java | 4 ++-- .../com/songoda/ultimaterepairing/settings/Settings.java | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/ultimaterepairing/listeners/BlockListeners.java b/src/main/java/com/songoda/ultimaterepairing/listeners/BlockListeners.java index 5ab20f3..f73cfb7 100644 --- a/src/main/java/com/songoda/ultimaterepairing/listeners/BlockListeners.java +++ b/src/main/java/com/songoda/ultimaterepairing/listeners/BlockListeners.java @@ -28,8 +28,8 @@ public class BlockListeners implements Listener { } UAnvil anvil = instance.getAnvilManager().getAnvil(event.getBlock()); - anvil.setParticles(true); - anvil.setHologram(true); + anvil.setParticles(instance.getConfig().getBoolean("Main.Show Particles By Default")); + anvil.setHologram(instance.getConfig().getBoolean("Main.Show Holograms By Default")); anvil.setPermPlaced(true); } diff --git a/src/main/java/com/songoda/ultimaterepairing/settings/Settings.java b/src/main/java/com/songoda/ultimaterepairing/settings/Settings.java index 68f2a57..89be0a1 100644 --- a/src/main/java/com/songoda/ultimaterepairing/settings/Settings.java +++ b/src/main/java/com/songoda/ultimaterepairing/settings/Settings.java @@ -69,6 +69,12 @@ public class Settings { public static final ConfigSetting LANGUGE_MODE = new ConfigSetting(config, "System.Language Mode", "en_US", "The enabled language file.", "More language files (if available) can be found in the plugins data folder."); + + public static final ConfigSetting SHOW_PARTICLES_BY_DEFAULT = new ConfigSetting(config, "Main.Show Particles By Default", true, + "Should particles be enabled when an anvil is placed down?"); + + public static final ConfigSetting SHOW_HOLOGRAMS_BY_DEFAULT = new ConfigSetting(config, "Main.Show Holograms By Default", true, + "Should holograms be enabled when an anvil is placed down?"); /** * In order to set dynamic economy comment correctly, this needs to be