21 |
import dk.thoerup.bukkit.hoeruputils.web.StatusListener; |
import dk.thoerup.bukkit.hoeruputils.web.StatusListener; |
22 |
import dk.thoerup.bukkit.hoeruputils.web.WebUser; |
import dk.thoerup.bukkit.hoeruputils.web.WebUser; |
23 |
import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand; |
import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand; |
24 |
|
import io.ebean.Ebean; |
25 |
|
|
26 |
@SuppressWarnings("restriction") |
@SuppressWarnings("restriction") |
27 |
public class HoerupUtilsPlugin extends JavaPlugin { |
public class HoerupUtilsPlugin extends JavaPlugin { |
40 |
@Override |
@Override |
41 |
public void onEnable() { |
public void onEnable() { |
42 |
System.out.println("Loading HoerupUtils plugin"); |
System.out.println("Loading HoerupUtils plugin"); |
43 |
|
|
44 |
|
Ebean.getDefaultServer(); |
45 |
|
|
46 |
getCommand("whereis").setExecutor(new WhereisCommand(getServer())); |
getCommand("whereis").setExecutor(new WhereisCommand(getServer())); |
47 |
//getCommand("mapgen").setExecutor(new MapgenCommand(this)); |
//getCommand("mapgen").setExecutor(new MapgenCommand(this)); |
48 |
getCommand("eternalday").setExecutor(new EternalDayCommand(this)); |
getCommand("eternalday").setExecutor(new EternalDayCommand(this)); |
121 |
getCommand("unmute").setExecutor(mute); |
getCommand("unmute").setExecutor(mute); |
122 |
|
|
123 |
|
|
124 |
Runnable ddlInstaller = new Runnable() { |
|
125 |
@Override |
messageWrapper = new MessageWrapper(this); |
|
public void run() { |
|
|
System.out.println("installddl"); |
|
|
installDDL(); |
|
|
} |
|
|
}; |
|
|
messageWrapper = new MessageWrapper(this, ddlInstaller); |
|
126 |
pm.registerEvents( messageWrapper, this); |
pm.registerEvents( messageWrapper, this); |
127 |
|
|
128 |
AdvancedChest locked = new AdvancedChest(this, ddlInstaller); |
AdvancedChest locked = new AdvancedChest(this); |
129 |
getCommand("chest").setExecutor(locked); |
getCommand("chest").setExecutor(locked); |
130 |
pm.registerEvents( locked, this); |
pm.registerEvents( locked, this); |
131 |
|
|
132 |
|
|
133 |
getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); |
getCommand("webuser").setExecutor( new WebUserCommand(this) ); |
134 |
|
|
135 |
|
|
136 |
//register web plugins |
//register web plugins |
180 |
return messageWrapper; |
return messageWrapper; |
181 |
} |
} |
182 |
|
|
|
//@SuppressWarnings({ "unchecked", "rawtypes" }) |
|
|
@Override |
|
|
public List<Class<?>> getDatabaseClasses() { |
|
|
List<Class<?>> list = new ArrayList<Class<?>>(); |
|
|
|
|
|
list.add(MessageBean.class); |
|
|
list.add(ChestBean.class); |
|
|
list.add(WebUser.class); |
|
183 |
|
|
184 |
return list; |
|
|
} |
|
185 |
|
|
186 |
|
/* |
187 |
private void deprecated() { |
private void deprecated() { |
188 |
/* |
|
189 |
getCommand("stoner").setExecutor( new StonerCommand() ); |
getCommand("stoner").setExecutor( new StonerCommand() ); |
190 |
getCommand("spawn").setExecutor( new SpawnCommand() ); |
getCommand("spawn").setExecutor( new SpawnCommand() ); |
191 |
getCommand("boom").setExecutor( new BoomCommand(this) ); |
getCommand("boom").setExecutor( new BoomCommand(this) ); |
211 |
//pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this); |
//pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this); |
212 |
//pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this); |
//pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this); |
213 |
|
|
214 |
*/ |
|
215 |
} |
} |
216 |
|
*/ |
217 |
|
|
218 |
} |
} |