Python Plugin Loader
PythonLoader 0.3.4
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.
Features:
- Load bukkit plugins written in python.
Installation: Put PythonLoader.jar into plugins directory and jython.jar into lib directory (within bukkit folder not plugins folder).
Downloads:
- PythonLoader 0.3.4
- Jython (By downloading and using Jython you accept the Jython License)
- Source Code
Documentation
The Readme on github contains an introduction to creating plugins in python
Also make sure to check out @zaph34r's tutorial series
I have to give special credits to lahwran who created the whole decorator API and corrected many of my mistakes. :)
@zaph34r
Nevermind that, I got random to work by using the jython provided (i was using jython.jar from a normal jython install).
How would I proceed for using Vault perms though ?
@roblabla
importing random works fine for me, can you provide more code? Which version of jython are you using?
Also,
doesn't work. I suppose it's due to the fact that the standard python library isn't included. Any way to include it ?
How would i go about adding vault support ?
I got a problem in transforming the following in jython :
The problem is that, AFAIK, typechecking AND generics don't exist in python, and being a noob in java, i got no idea how to get this to work.
Thanks a ton for the changes in regards to multiple event handlers and decorating any callable. you rock :D Theres one problem with it though, while instance/class methods are decoratable, self/cls is not injected as a first argument, as is normally the case with bound methods. Could you correct that?
Regarding print/log:
To use the log directly do log = plugin.getLogger() and log.info(text) or log.severe(text)
if you wrap it in a global info(text) or severe(text) function, its also easy to add a prefix for your plugin :) like:
that way you keep the simplicity of print, but can also use other log levels like severe in the same way
@Themonkey180
Just print() it , make sure you read the readme on his github. It shows the basic stuff .
sorry have a hard time spelling. How do I print to the log using the class API not the hooks?
@Themonkey180
I'm sorry ,but what are you asking ? I don't think any one could understand what your asking from the way you typed it .
OK i did find out what maven is, but I still not able to get any code to work. Is there something I can look at to help me other than the simple plugin on the wiki. Dose anyone know way eclipse dose not like the python for that plugin?
What is maven? I am trying to use this for a final project in a computer science class. Can I use eclipse to write and build the plugin?
Its been a while since I tried learning this to use this plugin, and now that im trying it again , im understanding how to do simple things :D .Maybe I can make a plugin that does something useless :D
Just, wondering but do you think we could get some better documentation. It's just a little hard starting out xD! But tis a really great plugin!
awesome. awesomeawesomeawesomeawesomeawesome.
Might want to update the link to 0.3 to the Beta file you uploaded. Other than that, excellent work! :3
Are there example plugins? I looked at the wiki, copied the plugin examples and tried them, but the only feed back I get in the console is "sample plugin main file run"
More examples would certainly help people such as myself.
@UberTweakstor
:D yay i didnt noticed it updated
I <3 Python.
This made me cry when I saw this. I will always <3 python. Java will never replace it.
When I just saw a *Normal* class definition I was in tears (Sorta).
PYTHON FOREVER.
So this is how plugins pages are gonna look like now XD I was just getting used to the old way , Nice plugin :D
One more thing.. Does this support PYO files instead of PYC?
OH THANKS! Its grate!