set Plugin Player Pref
Sets a plugin-specific preference value.
This method creates or updates a preference within a plugin's namespace. If the plugin namespace doesn't exist, it's created automatically. The operation marks the data as dirty for database persistence.
Namespace Management: Plugin namespaces are created on-demand using computeIfAbsent(), ensuring that each plugin has its own isolated preference space without conflicts between different plugins.
Usage Examples:
playerData.setPluginPlayerPref("MyPlugin", "enabled", true)
playerData.setPluginPlayerPref("Skills", "last_used", System.currentTimeMillis())
playerData.setPluginPlayerPref("RPG", "inventory_config", mapOf("sorted" to true))Side Effects:
Creates plugin namespace if it doesn't exist
Updates or creates the preference key within the namespace
Marks PlayerData as dirty for database persistence
Value must be JSON-serializable for database storage
Parameters
The plugin identifier/namespace
The specific preference key within the plugin namespace
The value to store (must be JSON-serializable)