Luka967 / OgarII

FOSS implementation of a private Agar.io gameserver, made with Node.js.
Other
66 stars 38 forks source link

plugins [high priority] #17

Open SuperOP535 opened 6 years ago

SuperOP535 commented 6 years ago

(I recommend you to fs.readdir a folder to get all .js files, then require them (they should export a class)|provide a function for adding plugin classes), in this class there will be a constructor defining this.info (or super()) like plugin name, version, author, api version etc. and in the class they'll define specified function like onPacketRecieve(player, packet) { code.. }, your system will check if this function exists in the plugins class (so that people will not have to define every single function) then call it like class.onPacketRecieve(player, packet);

A plugin system would be nice, here are some..

Suggested events/functions:

access for writer.js and reader.js should be given

retroscepter commented 6 years ago

Already a thing, it’s called a Mode. Modes don’t support all of the above events, but it’s relatively easy to add them.

Niall7459 commented 5 years ago

plugins [high priority]

Niall7459 commented 5 years ago

[high priority]

TheMKDev commented 5 years ago

[high priority]

Niall7459 commented 5 years ago

[high priority]

SuperOP535 commented 5 years ago

1 year soon:tm: