Java "Console"

Discussion in 'Archived: Plugin Requests' started by NickFury, Jul 31, 2014.

  1. Offline

    NickFury

    I am wondering whether it would be possible for a plugin to be made where one types /java <text> and the <text> is executed as java code in Bukkit. For example, if I wanted to change something in the config, I would type /java org.bukkit.plugin.java.JavaPlugin plugin = org.bukkit.Bukkit.getPluginManager().getPlugin("MyPlugin");
    /java plugin.getConfig.set("parameter",true);
    /java plugin.saveConfig();
    /java plugin.reloadConfig();

    This would work as if it were its own class. It would be nice if command blocks could run it as well as players and the console.
     
  2. Offline

    timtower Administrator Administrator Moderator

    NickFury I am afraid that this won't be possible in the way you want it, nor will it be very safe to use.
     
  3. Offline

    NickFury

    timtower Why wouldn't it be possible? And I would know what I'm doing with it. In fact, it may eliminate the need for some of the simpler plugins on my server.
    For instance, if you press Ctrl+Shift+J in Chrome, it brings up an identically functioning JavaScript console.
     
  4. Offline

    Gamecube762

    NickFury Java is a compiled language, while JavaScript(2 whole different languages) can be read on the spot.
     
  5. NickFury Also, minecraft has a text limit :) But yeah - technically possible but really not recommended.
     
  6. Offline

    timtower Administrator Administrator Moderator

    NickFury Javascript is something else then java, java needs to be compiled before you are able to use it. Doing that in runtime is difficult.
    And Commandhelper might suit your needs, not the same, but can get close.
     
  7. Offline

    Hexxed_

    There are plugins like Sve that allow you to script in Bukkit ingame
     

Share This Page