Forums - Open Redstone Engineers
I want to help make some plugins. - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html)
+--- Forum: Programming (https://forum.openredstone.org/forum-8.html)
+--- Thread: I want to help make some plugins. (/thread-1736.html)



I want to help make some plugins. - qwerasd205 - 12-27-2013

Okay now, lets get this straight, I want to know the basics of the ORE PyUtils so i can make plugins for the server.

(I need to know the basics like basically a script that would produce a /helloworld command would be awesome to get me started.)


RE: I want to help make some plugins. - Chibill - 12-27-2013

its on github we use the PythonLoader plugin.


RE: I want to help make some plugins. - xdot - 12-27-2013

As chi said, we use PythonLoader to load our python plugins. The github repo can be found here:
https://github.com/OpenRedstoneEngineers/OREUtilsV2

Now, to get started, I recommend learning python 2.6 (if you haven't already - http://docs.python.org/release/2.6.1/tutorial/) and reading the PythonLoader docuementation (https://github.com/masteroftime/Python-Plugin-Loader/blob/master/readme.md).


RE: I want to help make some plugins. - qwerasd205 - 12-29-2013

(12-27-2013, 05:03 PM)xdot Wrote: As chi said, we use PythonLoader to load our python plugins. The github repo can be found here:
https://github.com/OpenRedstoneEngineers/OREUtilsV2

Now, to get started, I recommend learning python 2.6 (if you haven't already - http://docs.python.org/release/2.6.1/tutorial/) and reading the PythonLoader docuementation (https://github.com/masteroftime/Python-Plugin-Loader/blob/master/readme.md).

I do know python, thanks.

I made my first plugin, all it does is add a /hashtag command that outputs
"[player] #[argument]-ed"
Frankly I was just too lazy to include a plugin.yml file so how do i put it onto teh OREs?

it needs to be switched to a .py again before you add it.


RE: I want to help make some plugins. - qwerasd205 - 12-30-2013

Two downloads.... so does that mean an admin is currently putting it on ORE? xD


RE: I want to help make some plugins. - VirtualPineapple - 12-30-2013

(12-27-2013, 03:14 PM)qwerasd205 Wrote: so i can make plugins for the server.
Probably not


RE: I want to help make some plugins. - xdot - 12-30-2013

Some errors in your code:
  • @hook.command is a generic command hook. You can use it, but it is less efficient and you got the footprint wrong. You need to hook to the actual "hashtag" command.
  • The "print" keyword will print a line to the standard output; in this case, the server console. You should use broadcastMessage from the bukkit API instead. (By they way, that syntax is 3.3 - We use 2.6)
  • "sender" is an object (a CommandSender instance - usually a Player). You cannot concatenate objects and strings.
  • "args" is a (java) list. You need to actually join the arg strings together (' '.join(args)) before you print.
  • "true" should be "True"

(12-29-2013, 04:09 PM)qwerasd205 Wrote: Frankly I was just too lazy to include a plugin.yml file so how do i put it onto teh OREs?

If you want to contribute, fork our github repository, commit your changes, make sure everything works as intended and submit a pull request. Then we can judge whether we should merge it to upstream or not.


RE: I want to help make some plugins. - qwerasd205 - 12-30-2013

um I'ma take a look at one of the other command files and see how it's doing things, you confuse me. also I'm too lazy to downgrade my python....

Meh whatever nvm, too un-like python, and i'm used to 3.3


RE: I want to help make some plugins. - Chibill - 12-30-2013

I will finish my inventory saver/presets.