Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
No longer hardcoding sample plugin, now uses plugins dir
Dieser Commit ist enthalten in:
Ursprung
c8b9f833d9
Commit
cc734a3aa6
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren