-
Notifications
You must be signed in to change notification settings - Fork 0
Integration
This page is meant to be read by server owners and plugin developers/maintainers. If you are not belonging to either one of them, none of this might be of interest for you.
Integration of your plugin into GDPRotect is very easy as we provide an abstract class you can extend from. In there you apply all your GDP measures at different stages:
- at server start
- on request
Your integration also shall return
- a short description of how personal data is handled / deleted in your plugin
- all data that are currently known to your plugin per player
Place a new file (like YourPluginIntegration.java) with the following content:
import de.cubenation.gdpr.api.GDPIntegration;
public class YourPluginIntegration extends GDPIntegration {
@Override
public boolean isEnabled() {
return true;
}
@Override
public void enable() {
// do things when the server is loading and enables this integration
// (based on the result of the isEnabled() method
}
@Override
public void deletePlayerData(AuditEvent auditEvent, UUID issuer, UUID subject) {
// delete player data on request
}
@Override
public String[] describe() {
return new String[0]{
"A description of what data is processed/stored, for how long these data are saved ",
"and some words on the auto-deletion policy.",
"Just tell them basically everything that might be relevant.
};
}
}
To make your integration work it has to be made known to the GDPRotect plugin. Do this on plugin initialization like so:
public void onEnable() {
JavaPlugin plugin = (JavaPlugin) Bukkit.getServer().getPluginManager().getPlugin("GDPRotect");
if (plugin != null) {
GDPRotect.getIntegrationManager().registerGDPRHandler(YourPluginIntegration.class);
}
}
The class GDPIntegration also provides an accessor method to the GDPRotect Audit Logger. Use this to log all relevant actions (deletions) of data for auditing of your data.
this.getAuditLogger().logMessage("your important audit log message");
Read more on audit logging here.