mirror of
https://github.com/asphyxia-core/plugin-template.git
synced 2026-04-25 15:58:00 -05:00
Update example for v1.19
This commit is contained in:
parent
27f1a259b5
commit
96805263fc
13
index.ts
13
index.ts
|
|
@ -14,6 +14,13 @@ export function register() {
|
||||||
default: 'EVENT_1',
|
default: 'EVENT_1',
|
||||||
options: ['EVENT_1', 'EVENT_2'],
|
options: ['EVENT_1', 'EVENT_2'],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
Register user-provided datafile
|
||||||
|
This will allow user to upload their own data to the root of your plugin
|
||||||
|
This file, for example, will be uploaded to "plugins/example@identifier/uploaded/data.xml"
|
||||||
|
*/
|
||||||
|
R.DataFile('uploaded/data.xml');
|
||||||
|
|
||||||
/* Register your routes */
|
/* Register your routes */
|
||||||
R.Route('example.method', example);
|
R.Route('example.method', example);
|
||||||
|
|
@ -39,4 +46,10 @@ export function register() {
|
||||||
|
|
||||||
/* Use --dev argument to enable console output. */
|
/* Use --dev argument to enable console output. */
|
||||||
console.log('Plugin Registered');
|
console.log('Plugin Registered');
|
||||||
|
|
||||||
|
/*
|
||||||
|
You can check the version of CORE using CORE_VERSION_MAJOR and CORE_VERSION_MINOR
|
||||||
|
Note: these value can be undefined, which means the CORE is version v1.18 and under
|
||||||
|
*/
|
||||||
|
console.log(`Core Version: v${CORE_VERSION_MAJOR}.${CORE_VERSION_MINOR}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user