/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/WebLoader.java
ViewVC logotype

Annotation of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/WebLoader.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1803 - (hide annotations) (download)
Mon May 28 14:32:53 2012 UTC (12 years ago) by torben
File size: 1146 byte(s)
offline messages should also register the sender
1 torben 1760 package dk.thoerup.bukkit.hoeruputils.web;
2    
3     import org.bukkit.configuration.Configuration;
4     import org.bukkit.plugin.Plugin;
5     import org.bukkit.plugin.PluginManager;
6    
7     import de.codeinfection.quickwango.ApiBukkit.ApiServer.ApiManager;
8     import dk.thoerup.bukkit.hoeruputils.HoerupUtilsPlugin;
9    
10     public class WebLoader {
11 torben 1762
12     private static WebLoader instance = null;
13     /* Singleton */
14     public static WebLoader getInstance() {
15     if (instance == null) {
16     instance = new WebLoader();
17     }
18     return instance;
19     }
20 torben 1760
21 torben 1762 public void load(HoerupUtilsPlugin plugin, Configuration logintimeConfig, Configuration homeConfig) {
22 torben 1760
23     PluginManager pm = plugin.getServer().getPluginManager();
24     Plugin api = pm.getPlugin("ApiBukkit") ;
25     if ( api != null) {
26     StatusListener status = new StatusListener(plugin, plugin.getServer(), logintimeConfig, homeConfig );
27     // api.setRequestController("webstatus", status );hi
28    
29 torben 1803 BanListener ban = new BanListener(plugin, plugin.getServer() );
30 torben 1760
31 torben 1803
32 torben 1760 ApiManager.getInstance().registerController( status );
33 torben 1803 ApiManager.getInstance().registerController( ban );
34 torben 1760 } else {
35     System.out.println("Could not find ApiBukkit");
36     }
37    
38     }
39     }

  ViewVC Help
Powered by ViewVC 1.1.20