mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-10-31 23:59:35 +01:00
Code cleanup for production
This commit is contained in:
parent
ced16e6c7e
commit
431005e01a
@ -43,7 +43,6 @@ import java.util.concurrent.TimeUnit;
|
||||
public class AnchorManager {
|
||||
private static final String ERR_WORLD_NOT_READY = "EpicAnchors has not finished initializing that world yet";
|
||||
private static final String NBT_TICKS_KEY = "EpicAnchors_Ticks".toLowerCase();
|
||||
private static SongodaPlugin staticPluginInstance; // For internal use only TODO: Find a better way for doing this
|
||||
|
||||
private final SongodaPlugin plugin;
|
||||
private final DataManager dataManager;
|
||||
@ -57,8 +56,6 @@ public class AnchorManager {
|
||||
public AnchorManager(SongodaPlugin plugin, DataManager dataManager) {
|
||||
this.plugin = Objects.requireNonNull(plugin);
|
||||
this.dataManager = Objects.requireNonNull(dataManager);
|
||||
|
||||
staticPluginInstance = plugin;
|
||||
}
|
||||
|
||||
protected void saveAll() {
|
||||
@ -471,11 +468,4 @@ public class AnchorManager {
|
||||
private static void removeHologram(Anchor anchor) {
|
||||
HologramManager.removeHologram(anchor.getLocation());
|
||||
}
|
||||
|
||||
/**
|
||||
* <b>For internal use only</b>
|
||||
*/
|
||||
public static SongodaPlugin getPlugin() {
|
||||
return staticPluginInstance;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ import com.songoda.epicanchors.files.migration.AnchorMigration;
|
||||
import com.songoda.epicanchors.files.migration._1_InitialMigration;
|
||||
import com.songoda.epicanchors.listener.AnchorListener;
|
||||
import com.songoda.epicanchors.listener.BlockListener;
|
||||
import com.songoda.epicanchors.listener.DebugListener;
|
||||
import com.songoda.epicanchors.listener.WorldListener;
|
||||
import com.songoda.epicanchors.tasks.AnchorTask;
|
||||
import com.songoda.epicanchors.tasks.VisualizeTask;
|
||||
@ -30,7 +29,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
@ -94,11 +92,6 @@ public final class EpicAnchors extends SongodaPlugin {
|
||||
new SettingsCommand(this, this.guiManager),
|
||||
new ShowCommand(this)
|
||||
);
|
||||
|
||||
// TODO: remove debug
|
||||
if (!new File(getDataFolder(), "no-debug.txt").exists()) {
|
||||
Bukkit.getPluginManager().registerEvents(new DebugListener(this), this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,14 +5,14 @@ import com.songoda.core.compatibility.CompatibleParticleHandler;
|
||||
import com.songoda.core.configuration.Config;
|
||||
import com.songoda.core.configuration.ConfigSetting;
|
||||
import com.songoda.core.hooks.EconomyManager;
|
||||
import com.songoda.epicanchors.AnchorManager;
|
||||
import com.songoda.epicanchors.EpicAnchors;
|
||||
|
||||
public class Settings {
|
||||
private Settings() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
public static final Config config = AnchorManager.getPlugin().getCoreConfig();
|
||||
public static final Config config = EpicAnchors.getPlugin(EpicAnchors.class).getCoreConfig();
|
||||
|
||||
public static final ConfigSetting NAME_TAG = new ConfigSetting(config, "Main.Name Tag",
|
||||
"&6Anchor &8(&7{REMAINING}&8)",
|
||||
|
Loading…
Reference in New Issue
Block a user