mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 16:49:11 +00:00
Add world as a global variable for plugins.
This commit is contained in:
@@ -5,6 +5,7 @@ import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apollo.game.model.World;
|
||||
import org.jruby.embed.ScriptingContainer;
|
||||
|
||||
/**
|
||||
@@ -53,6 +54,7 @@ public final class RubyPluginEnvironment implements PluginEnvironment {
|
||||
@Override
|
||||
public void setContext(PluginContext context) {
|
||||
container.put("$ctx", context);
|
||||
container.put("$world", World.getWorld());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user