7 |
import org.bukkit.plugin.PluginManager; |
import org.bukkit.plugin.PluginManager; |
8 |
import org.bukkit.plugin.java.JavaPlugin; |
import org.bukkit.plugin.java.JavaPlugin; |
9 |
|
|
10 |
|
import dk.thoerup.bukkit.hoeruputils.chests.AdvancedChest; |
11 |
|
import dk.thoerup.bukkit.hoeruputils.chests.ChestBean; |
12 |
import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; |
import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; |
13 |
import dk.thoerup.bukkit.hoeruputils.message.MessageBean; |
import dk.thoerup.bukkit.hoeruputils.message.MessageBean; |
14 |
import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; |
import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; |
15 |
import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; |
import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; |
16 |
import dk.thoerup.bukkit.hoeruputils.web.WebLoader; |
import dk.thoerup.bukkit.hoeruputils.web.WebLoader; |
17 |
|
import dk.thoerup.bukkit.hoeruputils.web.WebUser; |
18 |
|
import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand; |
19 |
|
|
20 |
public class HoerupUtilsPlugin extends JavaPlugin { |
public class HoerupUtilsPlugin extends JavaPlugin { |
21 |
|
|
69 |
PluginManager pm = getServer().getPluginManager(); |
PluginManager pm = getServer().getPluginManager(); |
70 |
|
|
71 |
|
|
72 |
|
MotdHandler motd = new MotdHandler(this); |
73 |
|
getCommand("motd").setExecutor( motd ); |
74 |
|
pm.registerEvents( motd, this); |
75 |
|
|
76 |
|
|
77 |
pm.registerEvents(logintimeHandler, this); |
pm.registerEvents(logintimeHandler, this); |
78 |
pm.registerEvents(logintimeHandler, this); |
pm.registerEvents(logintimeHandler, this); |
79 |
|
|
96 |
}; |
}; |
97 |
messageWrapper = new MessageWrapper(this, ddlInstaller); |
messageWrapper = new MessageWrapper(this, ddlInstaller); |
98 |
pm.registerEvents( messageWrapper, this); |
pm.registerEvents( messageWrapper, this); |
99 |
|
|
100 |
|
AdvancedChest locked = new AdvancedChest(this, ddlInstaller); |
101 |
|
getCommand("chest").setExecutor(locked); |
102 |
|
pm.registerEvents( locked, this); |
103 |
|
|
104 |
|
|
105 |
SnitchingChest snitch = new SnitchingChest(this, ddlInstaller); |
getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); |
|
getCommand("snitchingchest").setExecutor(snitch); |
|
|
pm.registerEvents( snitch, this); |
|
106 |
|
|
107 |
|
|
108 |
//register web plugins |
//register web plugins |
115 |
Class.forName("de.codeinfection.quickwango.ApiBukkit.ApiServer.ApiController"); //if it fails it throws an exception |
Class.forName("de.codeinfection.quickwango.ApiBukkit.ApiServer.ApiController"); //if it fails it throws an exception |
116 |
WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); |
WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); |
117 |
|
|
118 |
getLogger().warning("ApiBukkit found, status listener registered"); |
getLogger().info("ApiBukkit found, status listener registered"); |
119 |
|
|
120 |
} catch (ClassNotFoundException e) { |
} catch (ClassNotFoundException e) { |
121 |
getLogger().warning("Could not find ApiBukkit - web status is disabled" ); |
getLogger().warning("Could not find ApiBukkit - web status is disabled" ); |
140 |
//@SuppressWarnings({ "unchecked", "rawtypes" }) |
//@SuppressWarnings({ "unchecked", "rawtypes" }) |
141 |
@Override |
@Override |
142 |
public List<Class<?>> getDatabaseClasses() { |
public List<Class<?>> getDatabaseClasses() { |
|
System.out.println("getDatabaseClasses"); |
|
143 |
List<Class<?>> list = new ArrayList<Class<?>>(); |
List<Class<?>> list = new ArrayList<Class<?>>(); |
144 |
|
|
145 |
list.add(MessageBean.class); |
list.add(MessageBean.class); |
146 |
list.add(SnitchingChestBean.class); |
list.add(ChestBean.class); |
147 |
|
list.add(WebUser.class); |
148 |
|
|
149 |
return list; |
return list; |
150 |
} |
} |