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 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
|
SnitchingChest snitch = new SnitchingChest(this); |
|
|
getCommand("snitchingchest").setExecutor(snitch); |
|
|
pm.registerEvents( snitch, this); |
|
82 |
|
|
83 |
|
|
84 |
|
|
90 |
} |
} |
91 |
}; |
}; |
92 |
messageWrapper = new MessageWrapper(this, ddlInstaller); |
messageWrapper = new MessageWrapper(this, ddlInstaller); |
93 |
pm.registerEvents( messageWrapper, this); |
pm.registerEvents( messageWrapper, this); |
94 |
|
|
95 |
|
AdvancedChest locked = new AdvancedChest(this, ddlInstaller); |
96 |
|
getCommand("chest").setExecutor(locked); |
97 |
|
pm.registerEvents( locked, this); |
98 |
|
|
99 |
|
|
100 |
|
getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); |
101 |
|
|
102 |
|
|
103 |
//register web plugins |
//register web plugins |
104 |
//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); |
110 |
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 |
111 |
WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); |
WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); |
112 |
|
|
113 |
getLogger().warning("ApiBukkit found, status listener registered"); |
getLogger().info("ApiBukkit found, status listener registered"); |
114 |
|
|
115 |
} catch (ClassNotFoundException e) { |
} catch (ClassNotFoundException e) { |
116 |
getLogger().warning("Could not find ApiBukkit - web status is disabled" ); |
getLogger().warning("Could not find ApiBukkit - web status is disabled" ); |
132 |
return messageWrapper; |
return messageWrapper; |
133 |
} |
} |
134 |
|
|
135 |
@SuppressWarnings({ "unchecked", "rawtypes" }) |
//@SuppressWarnings({ "unchecked", "rawtypes" }) |
136 |
@Override |
@Override |
137 |
public List<Class<?>> getDatabaseClasses() { |
public List<Class<?>> getDatabaseClasses() { |
138 |
System.out.println("getDatabaseClasses"); |
List<Class<?>> list = new ArrayList<Class<?>>(); |
|
List list = new ArrayList(); |
|
139 |
|
|
140 |
list.add(MessageBean.class); |
list.add(MessageBean.class); |
141 |
|
list.add(ChestBean.class); |
142 |
|
list.add(WebUser.class); |
143 |
|
|
144 |
return list; |
return list; |
145 |
} |
} |