Added simple start for server-side components.

This commit is contained in:
FrozenCow 2011-05-19 11:06:19 +02:00
parent 5b5b217be2
commit 38c8254707
5 changed files with 71 additions and 0 deletions

View file

@ -56,6 +56,7 @@ public class DynmapPlugin extends JavaPlugin {
public HashSet<String> enabledTriggers = new HashSet<String>();
public PermissionProvider permissions;
public HeroChatHandler hchand;
public ComponentManager componentManager = new ComponentManager();
public Timer timer;
@ -82,6 +83,11 @@ public class DynmapPlugin extends JavaPlugin {
configuration = new ConfigurationNode(bukkitConfiguration);
loadDebuggers();
// Load components.
for(Component component : configuration.<Component>createInstances("components", new Class<?>[] { DynmapPlugin.class }, new Object[] { this })) {
componentManager.add(component);
}
tilesDirectory = getFile(configuration.getString("tilespath", "web/tiles"));
if (!tilesDirectory.isDirectory() && !tilesDirectory.mkdirs()) {