Giter Club home page Giter Club logo

jxpl's People

Contributors

angelsl avatar holic avatar myers avatar verrier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

jxpl's Issues

Depending on Java plugins

Is it possible to make a script'sdepend: [ "SomePlugin" ] work when that plugin is a Java plugin? Every time I try, I get an UnknownDependencyException. I'm using a few functions to overcome this in the meantime by waiting for the depend to load, but it's not an ideal solution.

Issues with getFileContents (which subsequently cause issues with importScript)

It seems evaluating the return value of helper.getFileContents() is failing, both via helper.importScript() and eval() from within the script. I got it to work by replacing the importScript method with this:

public boolean includeScript(File f) { 
     try { 
          ((ScriptEngine) ScriptPlugin.this.sEngine).eval(new FileReader(f)); 
          return true; 
     } catch (Throwable t) { 
          // do something with the exception please! 
          return false; 
     } 
}

jxpl stalls onDisable in latest Craftbukkit

I assume the new changes to event registration, listeners, etc. are causing issues. Attempting to disable jxpl via stop or reload causes it to stall and eat CPU.

Server thread stacktrace during stall:

Server thread [RUNNABLE] CPU time: 12:52 
org.angelsl.bukkit.jxpl.Utils.getFieldHelper(Object, String) 
org.angelsl.bukkit.jxpl.ScriptPlugin.deregisterListeners() 
org.angelsl.bukkit.jxpl.ScriptPlugin.onDisable() 
org.angelsl.bukkit.jxpl.ScriptLoader.disablePlugin(Plugin) 
org.bukkit.plugin.SimplePluginManager.disablePlugin(Plugin) 
org.angelsl.bukkit.jxpl.JxplPlugin.onDisable() 
org.bukkit.plugin.java.JavaPlugin.setEnabled(boolean) 
org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(Plugin) 
org.bukkit.plugin.SimplePluginManager.disablePlugin(Plugin) 
org.bukkit.plugin.SimplePluginManager.disablePlugins() 
org.bukkit.plugin.SimplePluginManager.clearPlugins() 
org.bukkit.craftbukkit.CraftServer.reload() 
org.bukkit.Bukkit.reload() 
org.bukkit.command.defaults.ReloadCommand.execute(CommandSender, String, String[]) 
org.bukkit.command.SimpleCommandMap.dispatch(CommandSender, String) 
org.bukkit.craftbukkit.CraftServer.dispatchCommand(CommandSender, String) 
org.bukkit.craftbukkit.CraftServer.dispatchCommand(CommandSender, ServerCommand) 
net.minecraft.server.MinecraftServer.b() 
net.minecraft.server.MinecraftServer.w() 
net.minecraft.server.MinecraftServer.run() 
net.minecraft.server.ThreadServerApplication.run() 

the java SPI stuff .. isn't generated

Hi ...

This project is very useful ...

I've used the basic version that supports rhino1.7R3 ... the jar is correctly generated but is missed the folder /META-INF/services/javax.script.ScriptEngineFactory

is it the right behaviour?

ScriptEngine plugins loading multiple times on reload

There is a bug that occurs when you issue a "reload" command to the server, which causes all plugins to reload. Doing this causes any script plugins that are loaded to be loaded multiple times.

For example, if you issue "reload" in the console 5 times, you will see:
2011-02-25 23:20:33 [INFO] Initialising jxpl...
2011-02-25 23:20:33 [INFO] Adding file extension ".js" for scripting engine "Mozilla Rhino".
2011-02-25 23:20:33 [INFO] Loaded script MOTD.js
2011-02-25 23:20:33 [INFO] Loaded script MOTD.js
2011-02-25 23:20:33 [INFO] Loaded script MOTD.js
2011-02-25 23:20:33 [INFO] Loaded script MOTD.js
2011-02-25 23:20:33 [INFO] Loaded script MOTD.js

It appears that the script plugins are being loaded multiple times, however as near as we can tell, the onEnable for each plugin is only being called once.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.