@@ -1,67 +1,31 @@
|
||||
package org.bukkit.fillr;
|
||||
import org.bukkit.*;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.plugin.*;
|
||||
import org.bukkit.plugin.java.*;
|
||||
import org.bukkit.event.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Fillr {
|
||||
public class Fillr extends JavaPlugin {
|
||||
private Logger log;
|
||||
private String name = "Fillr";
|
||||
private FillrListener listener;
|
||||
public static String name = "Fillr";
|
||||
public static String version = "1.0";
|
||||
public Server server;
|
||||
private static Fillr singleton;
|
||||
public static String directory = "plugins";
|
||||
|
||||
private Fillr(Server server) {
|
||||
this.server = server;
|
||||
public Fillr(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File plugin, ClassLoader cLoader) {
|
||||
super(pluginLoader, instance, desc, plugin, cLoader);
|
||||
registerEvents();
|
||||
}
|
||||
|
||||
public Fillr createInstance(Server server) {
|
||||
singleton = new Fillr(server);
|
||||
return singleton;
|
||||
}
|
||||
public void onDisable() {}
|
||||
public void onEnable() {}
|
||||
|
||||
public static Fillr getInstance() {
|
||||
return singleton;
|
||||
public void registerEvents() {
|
||||
listener = new FillrListener(this.getServer());
|
||||
getServer().getPluginManager().registerEvent(Event.Type.PLAYER_COMMAND, listener, Event.Priority.Normal, this);
|
||||
}
|
||||
|
||||
//TODO Get command hooks in somehow...
|
||||
/*public class UpdatrListener extends PluginListener {
|
||||
|
||||
public boolean onCommand(Player player, String[] split) {
|
||||
if (split[0].equalsIgnoreCase("/check")
|
||||
&& player.canUseCommand("/check")) {
|
||||
new Checker().check(player);
|
||||
return true;
|
||||
}
|
||||
if (split[0].equalsIgnoreCase("/updateAll")
|
||||
&& player.canUseCommand("/updateAll")) {
|
||||
new Updater().updateAll(player);
|
||||
return true;
|
||||
}
|
||||
if (split[0].equalsIgnoreCase("/update")
|
||||
&& player.canUseCommand("/update")) {
|
||||
if (split.length == 1) {
|
||||
player.sendMessage(premessage + "Usage is /update <name>");
|
||||
} else {
|
||||
new Updater().update(split[1], player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (split[0].equalsIgnoreCase("/download")
|
||||
&& player.canUseCommand("/download")) {
|
||||
if (split.length == 1) {
|
||||
player.sendMessage(premessage + "Usage is /download <name>");
|
||||
} else {
|
||||
try {
|
||||
new Downloader().downloadFile(split[1], player);
|
||||
} catch(Exception e) {
|
||||
player.sendMessage("There was an error downloading "+ split[1]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user