mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
Re implement tab completion list (Close #47)
This commit is contained in:
1 parent
1601ce6949
commit
4cc19cb71b
14 files changed
+123
-47
No files matched your search
@@ -35,6 +35,7 @@ import me.william278.huskhomes2.integrations.VaultIntegration;
|
||||
import me.william278.huskhomes2.listeners.PlayerListener;
|
||||
import me.william278.huskhomes2.listeners.PluginMessageListener;
|
||||
import me.william278.huskhomes2.teleport.SettingHandler;
|
||||
import me.william278.huskhomes2.util.PlayerList;
|
||||
import org.bstats.bukkit.MetricsLite;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@@ -71,6 +72,10 @@ public final class HuskHomes extends JavaPlugin {
|
||||
return settings;
|
||||
}
|
||||
|
||||
// Player list managing
|
||||
private static PlayerList playerList;
|
||||
public static PlayerList getPlayerList() { return playerList; }
|
||||
|
||||
|
||||
/**
|
||||
* Returns the HuskHomes API
|
||||
@@ -163,12 +168,8 @@ public final class HuskHomes extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
// Fetch config file
|
||||
saveDefaultConfig();
|
||||
|
||||
// Plugin startup logic
|
||||
getLogger().info("Enabling HuskHomes version " + this.getDescription().getVersion());
|
||||
|
||||
// Load the config
|
||||
settings.reload();
|
||||
|
||||
// Load the messages (in the right language)
|
||||
@@ -213,11 +214,21 @@ public final class HuskHomes extends JavaPlugin {
|
||||
|
||||
// bStats initialisation
|
||||
new MetricsLite(this, 8430);
|
||||
|
||||
// Setup player list
|
||||
playerList = new PlayerList();
|
||||
playerList.initialize();
|
||||
|
||||
// Log a message
|
||||
getLogger().info("Enabled HuskHomes version " + this.getDescription().getVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
// Plugin shutdown logic
|
||||
// Cancel remaining tasks
|
||||
Bukkit.getServer().getScheduler().cancelTasks(this);
|
||||
|
||||
// Log a message
|
||||
getLogger().info("Disabled HuskHomes version " + this.getDescription().getVersion());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user