mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-28 05:35:45 +01:00
Exclude current classloader
This commit is contained in:
parent
ead03ae510
commit
1fd631de49
@ -178,8 +178,6 @@ public class Citizens extends JavaPlugin {
|
||||
// Register commands
|
||||
registerCommands();
|
||||
|
||||
registerScriptHelpers();
|
||||
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new NPCUpdater(npcManager), 0, 1);
|
||||
|
||||
Messaging.log("v" + getDescription().getVersion() + " enabled.");
|
||||
@ -191,6 +189,7 @@ public class Citizens extends JavaPlugin {
|
||||
public void run() {
|
||||
try {
|
||||
setupNPCs();
|
||||
registerScriptHelpers();
|
||||
} catch (NPCLoadException ex) {
|
||||
Messaging.log(Level.SEVERE, "Issue when loading NPCs: " + ex.getMessage());
|
||||
}
|
||||
@ -239,7 +238,7 @@ public class Citizens extends JavaPlugin {
|
||||
private void registerScriptHelpers() {
|
||||
ScriptCompiler compiler = CitizensAPI.getScriptCompiler();
|
||||
compiler.registerGlobalContextProvider(new EventRegistrar(this));
|
||||
compiler.addToClasspath(new File("plugins"));
|
||||
compiler.addToClasspath(this.getClassLoader(), new File("plugins"));
|
||||
}
|
||||
|
||||
public void reload() throws NPCLoadException {
|
||||
|
Loading…
Reference in New Issue
Block a user