Inactive [DEV] PythonLoader v0.3.1 - Load Plugins written in Python [1.1-R6]

Discussion in 'Inactive/Unsupported Plugins' started by masteroftime, Aug 8, 2011.

  1. Offline


    PythonLoader 0.3
    This plugin allows developers to code bukkit plugins in the python programming language. The plugins in python can either use a thin wrapper to the standard Bukkit API, or the newer decorator API. For more detailed instructions for installing this plugin and how to code plugins, take a look into the Readme on Github.

    • Load bukkit plugins written in python.
    Put PythonLoader.jar into plugins directory and jython.jar into lib directory (within bukkit folder not plugins folder).

    Jython (By downloading and using Jython you accept the Jython License)
    Source Code

    I have to give special credits to @lahwran who created the whole decorator API and corrected many of my mistakes. :)

    Changelog: Version 0.3.1

    Version 0.3.1
    • Updated to CB 1.1-R6
    Version 0.3
    • Updated to CB 1.1-R1
    • Changed to new EventHandling System
    Version 0.2
    • Added decorator API
    • Invalid plugin exceptions are thrown when an invalid python plugin is loaded
    • Seperate Python Interpreter for each plugin
    • JavaPlugin's event executor creation is now directly used
    Version 0.1.1
    • Changed plugin.yaml to plugin.yml
    • Removed some debug output
    Version 0.1
    • First official release.
  2. Offline


    I wounder why that is , Every java plugin I use works fine with the python loader
  3. Offline


  4. Offline


    This is awesome! I'm learning Python currently and this just motivated even more to learn it and python plugin will be my first project when I learn python! :D
  5. Offline



    Attached Files:

  6. bukkit: 1060
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
    Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
  7. Offline


    Bukkit build I use is 1060. Java build is 1.6.0_26.
  8. Offline


    alright, my fork is on github. I'm working on documentation now. I'll stick a binary up later.
  9. Offline


    Bug report:

    CraftBukkit - Recommended Build (15-Aug-2011, 6:44GMT - Build 1060 for MC 1.7.3)

    java version "1.7.0"
    Java(TM) SE Runtime Environment (build 1.7.0-b147)
    Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

    The server starts up 100% fine with Essentials, Python Plugin, and the TestPlugin.
    My python plugin tho, causes the TestPlugin to fail with
    20:42:40 [SEVERE] Error loading plugin TestPlugin:
    java.lang.IllegalAccessError: tried to access field org.python.antlr.PythonParse
    r$comp_op_return.tree from class org.python.antlr.PythonParser
    and my plugin fails to start with this error:
    20:42:40 [SEVERE] Error occurred while enabling BucyrussTrees v0.1 (Is it up to date?): Event BLOCK_FORM is not supported
    It says its not supported?!

    I asked on #bukkitdev but they said it was probably an issue with Python Plugin Loader.
  10. Offline


    @clonetroop This issue will be resolved in the next release. This release will be bigger though and we are still completing/testing some features.
  11. Offline


    Nice job man, i'm pretty noob at python programming so i can't wait until the more in depth tutorial comes out (i don't understand how in the sample file you defined the command name, i understand how you made it do stuf though). Right now i'm just having a little fun with Listeners.

    EDIT: How long away is the next update?
  12. Oh my god, oh my god, oh my god - Python arrived at bukkit! Hookahey! =)
  13. Offline


    >.< I love Python. It is my absolute favorite. BUT, I am struggling to figure out how to use this. I want to develop a plugin, I know how to program, but I just can't get my head around this. Someone please PM me on how to do this, or at least an example of a Python Plugin. Thanks, Peace out.
  14. Erm...:
    Being able to read is a clear advantage... ;)
  15. Offline


    Any chance for an update to 1.8.1 ? :)
  16. Offline


    I originally planned to wait for a Bukkit pull request which would fix a problem, but as it doesn't seem to have been noticed after almost a month I'll investigate if there is another possibility to deal with the problem. However I'm currently very busy cause I've got a lot of projects starting and I'm trying to get at least a bit organized ;). I hope I can do it until next week but I can't promise.
    Zothen likes this.
  17. Offline


    Looking forward to an update...
  18. Hey,

    I am getting the following Error when using this line:

    World.dropItemNaturally(loc_saver[puid]['loc'], Torch(random.randint(5, 40)).toItemStack())

    TypeError: dropItemNaturally() expected 3 args; got 2

    Can anyone tell me what the hell has to be the 3rd Argument for this function?!

    In Docs are only 2 Parameters listed so I really don't know why it wants to have 3 Oo
  19. Offline


    Finally released the next version :)

    Sorry guys that it took so long but I wanted to wait for a bukkit pull request which deals with some possible issues with plugin loading. I almost gave up that it would be pulled at all but now it finally got into 1240.

    Many thanks to @lahwran!!! Without you there would have probably never been an update for this plugin, and I have to admit that there is more code from you inside it than from me. Thank you very much. :)
  20. Hey dude,

    Sorry but getting error whe using the new Version:

  21. Offline


    @Brainsucker Have you put the jython.jar inside the lib folder?
  22. Offline


    Thanks for this, didn't know something like this existed.

  23. I'll show you my folderstructure:

    .../minecraft_server/ (Main Directory)
  24. Offline


    EEK its here :D

    Im getting this problem

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  25. Offline


    @MalcolmLC @Brainsucker
    the jython.jar now has to be put into a folder called lib. So it should be
    <bukkit folder>/lib/jython.jar
  26. Offline


    Alright , i feel dumb now . It worked :D
  27. Offline


    Ok stupid questions prolly but before i start i need to know:

    How hard is it for this to import and use Spout? has anyone done it. I would like to take on a project that would require heavy use of the UI and spout seems to be the way to do it but i know nothing about java really (used to do java script back in the day) but I am actively using python so this is a god send ( btw huge props for making this its awesome) so i just need to know has anyone used Spout from python using this and is there anything i need to know before going into development that may help/save my ass with calling a lot of UI stuff.

    ie. for starters how do i import some spout class/methods that allow me to draw to the ui or something like that (sorry very very new to minecraft plugins and this kind of stuff i only know python)

    MalcolmLC likes this.
  28. Alright, now it seems to work, thanks a lot for the update :)

    But an advanced example how to use this would be very usefull... I still got couple of problems when trying to call some functions :/
  29. Offline


    I was kinda hoping for a more advanced one also . :D
  30. Offline


    And I shall third that good sir!

Share This Page