Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-08-24 (original capture). Home · Forum · All archived topics · Downloads
August 23, 2012, 08:11:20 PM

Author Topic: Python New Release [Minecraft]  (Read 59 times)

Offline Predz

  • WCS Developer
  • Level 7 Expert
  • *****
  • Posts: 326
  • Warcraft:SPE
Python New Release [Minecraft]
« on: August 22, 2012, 06:19:53 AM »
Minecraft Python Release

A Plugin Allowing for Minecraft Plugins to be Written in Python!


Okay, Firstly I have been waiting for something that does what this does FOREVER. It allows you to code Java in Python using the Jython Module for Python. Basically it changes the format to Python which generally is easier to code. Anyway now this has been released and "Masteroftime" has said he will try to keep this constantly updated for te Python Coders. Even SQL is Compatible! :)

For People who would like to learn how to use this there are some tutorials and they are easy to use if you have used Python before. The only difference is how to use Classes and the Paths to using Events are slightly more confusing. But as I say, I have been playing with it and found it AWESOME! Have a look below! :P

Code: [Select]
import org.bukkit as bukkit
from java.util.logging import Level
from java.util.logging import Logger

__plugin_name__ = "Example Plugin"
__plugin_version__ = "1.0A"
__plugin_mainclass__ = "Example Main Class"

def info(text):
    log = Logger.getLogger('minecraft')
    log.info("[%s]: %s" %(__plugin_name__,text)) ## Appears as the Console is Saying the Message
def severe(text):
    log = Logger.getLogger('minecraft')
    log.severe("[%s]: %s" %(__plugin_name__,text)) ## Text Appears as an ALERT Message

So if you were to run the Command in Python:

Code: [Select]
severe('Example Plugin Loaded')

It would Output:

[Example Plugin]: Example Plugin Loaded

Offline Kamiqawa

  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 471
Re: Python New Release [Minecraft]
« Reply #1 on: August 22, 2012, 07:40:18 AM »
Wow, this looks interesting thingy :o So what this does is that it enables some Java stuff to be coded in Python, right? Anyways, I would prefer it the other way, Java to Python as I'm way better in Java that Python, but this is nice anyways! Is there some official sites or anything to provide more detailed version of this and its possibilities? Or maybe I should just google it... ;)
Quote from: $Diablo$
You are banana dabass... Kami tried to proof point here and you ruin it >.>



Click here for wcs content made by me.


Offline Predz

  • WCS Developer
  • Level 7 Expert
  • *****
  • Posts: 326
  • Warcraft:SPE
Re: Python New Release [Minecraft]
« Reply #2 on: August 22, 2012, 08:42:14 AM »
If you are better at coding in Java then this is pointless for you. But I like using Python because I prefer to use Databases in Python. They are alot easier to configure in Python than Java and SQL's are easier to execute commands for.