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.LockedChest; |
11 |
|
import dk.thoerup.bukkit.hoeruputils.chests.LockedChestBean; |
12 |
|
import dk.thoerup.bukkit.hoeruputils.chests.SnitchingChest; |
13 |
|
import dk.thoerup.bukkit.hoeruputils.chests.SnitchingChestBean; |
14 |
import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; |
import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; |
15 |
import dk.thoerup.bukkit.hoeruputils.message.MessageBean; |
import dk.thoerup.bukkit.hoeruputils.message.MessageBean; |
16 |
import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; |
import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; |
17 |
import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; |
import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; |
18 |
import dk.thoerup.bukkit.hoeruputils.web.WebLoader; |
import dk.thoerup.bukkit.hoeruputils.web.WebLoader; |
19 |
|
import dk.thoerup.bukkit.hoeruputils.web.WebUser; |
20 |
|
import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand; |
21 |
|
|
22 |
public class HoerupUtilsPlugin extends JavaPlugin { |
public class HoerupUtilsPlugin extends JavaPlugin { |
23 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
|
SnitchingChest snitch = new SnitchingChest(this); |
|
|
getCommand("snitchingchest").setExecutor(snitch); |
|
|
pm.registerEvents( snitch, this); |
|
84 |
|
|
85 |
|
|
86 |
|
|
92 |
} |
} |
93 |
}; |
}; |
94 |
messageWrapper = new MessageWrapper(this, ddlInstaller); |
messageWrapper = new MessageWrapper(this, ddlInstaller); |
95 |
pm.registerEvents( messageWrapper, this); |
pm.registerEvents( messageWrapper, this); |
96 |
|
|
97 |
|
SnitchingChest snitch = new SnitchingChest(this, ddlInstaller); |
98 |
|
getCommand("snitchingchest").setExecutor(snitch); |
99 |
|
pm.registerEvents( snitch, this); |
100 |
|
|
101 |
|
LockedChest locked = new LockedChest(this, ddlInstaller); |
102 |
|
getCommand("lockedchest").setExecutor(locked); |
103 |
|
pm.registerEvents( locked, this); |
104 |
|
|
105 |
|
|
106 |
|
getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); |
107 |
|
|
108 |
|
|
109 |
//register web plugins |
//register web plugins |
110 |
//pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this); |
//pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this); |
116 |
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 |
117 |
WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); |
WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); |
118 |
|
|
119 |
getLogger().warning("ApiBukkit found, status listener registered"); |
getLogger().info("ApiBukkit found, status listener registered"); |
120 |
|
|
121 |
} catch (ClassNotFoundException e) { |
} catch (ClassNotFoundException e) { |
122 |
getLogger().warning("Could not find ApiBukkit - web status is disabled" ); |
getLogger().warning("Could not find ApiBukkit - web status is disabled" ); |
138 |
return messageWrapper; |
return messageWrapper; |
139 |
} |
} |
140 |
|
|
141 |
@SuppressWarnings({ "unchecked", "rawtypes" }) |
//@SuppressWarnings({ "unchecked", "rawtypes" }) |
142 |
@Override |
@Override |
143 |
public List<Class<?>> getDatabaseClasses() { |
public List<Class<?>> getDatabaseClasses() { |
144 |
System.out.println("getDatabaseClasses"); |
List<Class<?>> list = new ArrayList<Class<?>>(); |
|
List list = new ArrayList(); |
|
145 |
|
|
146 |
list.add(MessageBean.class); |
list.add(MessageBean.class); |
147 |
|
list.add(SnitchingChestBean.class); |
148 |
|
list.add(LockedChestBean.class); |
149 |
|
list.add(WebUser.class); |
150 |
|
|
151 |
return list; |
return list; |
152 |
} |
} |