Used new Bukkit constructor format.
This commit is contained in:
parent
8a24ae87f0
commit
b5adcd03ef
2 changed files with 5 additions and 10 deletions
|
|
@ -41,12 +41,6 @@ public class DynmapPlugin extends JavaPlugin {
|
||||||
private Configuration configuration;
|
private Configuration configuration;
|
||||||
|
|
||||||
public static File tilesDirectory;
|
public static File tilesDirectory;
|
||||||
public static File dataRoot;
|
|
||||||
|
|
||||||
public DynmapPlugin(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File folder, File plugin, ClassLoader cLoader) {
|
|
||||||
super(pluginLoader, instance, desc, folder, plugin, cLoader);
|
|
||||||
dataRoot = folder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public World getWorld() {
|
public World getWorld() {
|
||||||
return getServer().getWorlds().get(0);
|
return getServer().getWorlds().get(0);
|
||||||
|
|
@ -69,7 +63,7 @@ public class DynmapPlugin extends JavaPlugin {
|
||||||
tilesDirectory = getFile(configuration.getString("tilespath", "web/tiles"));
|
tilesDirectory = getFile(configuration.getString("tilespath", "web/tiles"));
|
||||||
tilesDirectory.mkdirs();
|
tilesDirectory.mkdirs();
|
||||||
|
|
||||||
playerList = new PlayerList(getServer());
|
playerList = new PlayerList(getServer(), getFile("hiddenplayers.txt"));
|
||||||
playerList.load();
|
playerList.load();
|
||||||
|
|
||||||
mapManager = new MapManager(configuration);
|
mapManager = new MapManager(configuration);
|
||||||
|
|
@ -148,7 +142,7 @@ public class DynmapPlugin extends JavaPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public File getFile(String path) {
|
public File getFile(String path) {
|
||||||
return combinePaths(DynmapPlugin.dataRoot, path);
|
return combinePaths(getDataFolder(), path);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadDebuggers() {
|
protected void loadDebuggers() {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ import org.bukkit.entity.Player;
|
||||||
public class PlayerList {
|
public class PlayerList {
|
||||||
private Server server;
|
private Server server;
|
||||||
private HashSet<String> hiddenPlayerNames = new HashSet<String>();
|
private HashSet<String> hiddenPlayerNames = new HashSet<String>();
|
||||||
private File hiddenPlayersFile = new File(DynmapPlugin.dataRoot, "hiddenplayers.txt");
|
private File hiddenPlayersFile;
|
||||||
|
|
||||||
public PlayerList(Server server) {
|
public PlayerList(Server server, File hiddenPlayersFile) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
|
this.hiddenPlayersFile = hiddenPlayersFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue