summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/bukkit/craftbukkit/CraftServer.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/org/bukkit/craftbukkit/CraftServer.java b/src/org/bukkit/craftbukkit/CraftServer.java
index 7467dee2..9af29a4d 100644
--- a/src/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/org/bukkit/craftbukkit/CraftServer.java
@@ -28,13 +28,16 @@ public final class CraftServer implements Server {
server = console.f;
pluginManager.RegisterInterface(JavaPluginLoader.class);
-
- try {
- pluginManager.loadPlugin(new File("SamplePlugin.jar"));
- } catch (InvalidPluginException ex) {
- Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, null, ex);
- } catch (Throwable ex) {
- Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "(Did you extract the lib folder?)", ex);
+
+ File pluginFolder = new File("plugins");
+ if (pluginFolder.exists()) {
+ try {
+ pluginManager.loadPlugins(pluginFolder);
+ } catch (Throwable ex) {
+ Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "(Did you extract the lib folder?)", ex);
+ }
+ } else {
+ pluginFolder.mkdir();
}
}