ServerInfo getServer(String server) { for (ServerInfo info : plugin.getData().getServers()) { if (info.getName().equals(server)) { return info; } } return null; }
void loadData() { this.config = plugin.getConfig(); this.offlineMessage = config.getString("offline-message"); this.showOfflineMsg = config.getBoolean("show-offline-message"); this.interval = config.getInt("interval"); this.timeout = config.getInt("timeout"); this.signsPerTick = config.getInt("sign-updates"); this.cooldown = config.getInt("cooldown"); this.debugmode = config.getBoolean("debug"); signLayouts = loadLayouts(); servers = loadServers(); loadSigns(); checkSigns(); }
void reloadData() { plugin.reloadConfig(); loadData(); }
protected PluginData(TeleportSigns plugin) { this.plugin = plugin; database = plugin.getDatabase(); this.config = plugin.getConfig(); plugin.saveDefaultConfig(); }
TeleportSign getSignForLocation(Location loc) { for (TeleportSign ts : plugin.getData().getSigns()) { if (ts.getLocation().equals(loc)) return ts; } return null; }