This describes a permission-based system for SocketMC Instructions.
Changes
Set up mod component to have a screen for settings
API Hook with Mod Menu
Have #sendInstruction require a Plugin parameter to identify which plugin it wants to use
Provide two categories for settings: General and Plugins
Exposed API in core for an enum specifying permissions, default states, and descriptions (both stored and for JavaDoc)
General Settings
Send notifications when a new plugin has been registered (on by default)
Audit Log retention and date settings
Plugin Settings
Each plugin that sends a specific instruction will require it to pass its instance. This information is sent to the client to be stored locally (file system probably). If this is the plugin's first instruction (server-independent, meaning settings apply across servers for the same plugin), a new setting group will be created for each SocketMC permission. Plugins are identified by their main class location.
These will all default to a Default group at the top of the list, which will allow users to change default permissions when new plugins are added.
Example Permissions
Default state is included.
Draw on HUD (on)
Tweak Rendering (hand, block, etc) (on)
Arbitrary Code Execution (off)
File Read (off)
File Write (off)
Purpose
The purpose of this permission-based system is to provide the most functionality with the most safety. Private servers between trusted users will have more freedom to interact with the client, while Public servers face increased security to ensure player safety.
Feature Type
API Addition
Description of Feature
This describes a permission-based system for SocketMC Instructions.
Changes
#sendInstruction
require aPlugin
parameter to identify which plugin it wants to useGeneral
andPlugins
core
for an enum specifying permissions, default states, and descriptions (both stored and for JavaDoc)General Settings
Plugin Settings
Each plugin that sends a specific instruction will require it to pass its instance. This information is sent to the client to be stored locally (file system probably). If this is the plugin's first instruction (server-independent, meaning settings apply across servers for the same plugin), a new setting group will be created for each SocketMC permission. Plugins are identified by their main class location.
These will all default to a
Default
group at the top of the list, which will allow users to change default permissions when new plugins are added.Example Permissions
Default state is included.
Purpose
The purpose of this permission-based system is to provide the most functionality with the most safety. Private servers between trusted users will have more freedom to interact with the client, while Public servers face increased security to ensure player safety.