Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Java like approach

Hoi Dmytro edited this page May 24, 2020 · 1 revision

Minimum requirements:

  • The main class has to be extended from PythonPlugin class. (You don't have to import it, because it is auto imported on startup of loader plugin).
  • Your main class must have onEnable() and onDisable() methods.

File: /plugin.yml


name: SamplePlugin
main: SampleClass
version: 0.1-dev
commands:
    samplecommand:
        description: send a sample message
        usage: /<command>

File: /plugin.py


class SampleClass(PythonPlugin):
    def onEnable(self):
        print "sample plugin enabled"

    def onDisable(self):
        print "sample plugin disabled"

Next steps to make your own plugin you can find on official Spigot plugin development page or official Spigot javadoc.

Clone this wiki locally