pie_flavor

ExamplePlugin.plugin

Aug 13th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. [id] = 'exampleplugin' -- properties about the plugin
  2. [path] = 'com.example.exampleplugin' -- lua comment syntax
  3. [name] = 'ExamplePlugin'
  4. [version] = '1.0.0'
  5. [description] = 'An example plugin.' -- single quotes for string
  6.  
  7. Logger logger >>injected -- >> is sort of an annotation
  8. Event GameState|Initialization (
  9. logger:info['Game initialized!']
  10. )
  11. Command test >>autoregistered[args = { make|arg|string["playername"] } ( -- automatically register this command
  12. string name = arg|singular['playername']~ -- tilde is .get() without checking
  13. #source:sendMessage["$(color.green)Hello world, $[name]!"] -- #name is variables in a specific construct like commands, double quotes for Text
  14. result|success -- the command result
  15. )
Add Comment
Please, Sign In to add comment