myaac/plugins/example.json
slawkens c1d4b4f80c Make autoload of pages, commands and themes configurable
Not everyone might want them to autoload
2024-06-13 14:36:18 +02:00

51 lines
1.1 KiB
JSON

{
"enabled": 0,
"name": "Example Plugin",
"description": "This is just an example of a Plugin for MyAAC.",
"version": "1.0",
"author": "nobody",
"contact": "nobody@example.org",
"require": {
"myaac": "0.9.0",
"myaac_": ">=0.9,<1.0",
"php": "7.4",
"php_": ">7.4,<8.0",
"database": "21",
"php-ext": "curl",
"ext-curl": ">5.0",
"table": "accounts",
"column": "players.online"
},
"install": "plugins/example/install.php",
"uninstall": [
"plugins/example.json",
"plugins/example-directory",
"templates/other-directory"
],
"hooks": {
"Example Hook": {
"type": "BEFORE_PAGE",
"file": "plugins/example/before.php"
}
},
"routes": {
"First Route": {
"pattern": "/YourAwesomePage/{name:string}/{page:int}",
"file": "plugins/your-plugin/your-awesome-page.php",
"method": "GET",
"priority": "130"
},
"Redirect Example": {
"redirect_from": "/redirectExample",
"redirect_to": "account/manage"
}
},
"settings": "plugins/your-plugin-folder/settings.php",
"autoload": {
"pages": true,
"pagesSubFolders": false,
"commands": true,
"themes": true
}
}