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


    Has anyone had any success with Vault? I'm stuck at creating an instance... it says
    TypeError: can't instantiate abstract class (net.milkbowl.vault.permission.Permission)
    I have :
    from net.milkbowl.vault.permission import Permission
    perms = Permission()
    Then I use perms later on in the plugin... I know I have to put a object in Permssion's "()", but I can't seem to find out what...
  3. Offline


    Clem you cannot create an instance of Permission because it is an abstract class. Depending on what you want you can use one of the classes in the net.milkbowl.vault.permission.plugins package which are subclasses of Permission for different permission plugins.

    Or you can use the ServiceManager to retrieve it, which I found in the Vault documentation. Translated to python this would be:
    rsp = pyplugin.getServer().getServicesManager().getRegistration(Permission)
    if rsp:
        econ = rsp.getProvider()
        print "Error"
    This code has to be in the enabled method because all the plugins have to be loaded first
    Clem likes this.
  4. Offline


    masteroftime thanks. I'll be posting my plugins somewhere (Can you get a place where can post Python Plugins to help other people in the future?) and hopefully someone might find some use out of them :)
  5. Offline


    I have started a collection of Tutorials for Python Plugin Development, that might help some people getting started. They contain practical example plugins and a step-by-step walkthrough on how to create them and what each part does.

    Feel free to direct any requests for additional tutorial topics or specific things that you would like to have explained in more detail to me and i will see what i can do :)

    [Post copied from the PythonLoader bukkitdev page in case anyone only checks the forums, i check bukkitdev more often so any responses are better off there]
  6. Offline


    this already exists... It's called Java

Share This Page