Skip to content

Commit

Permalink
Register the ExemptionSettings instance in use as generic instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Jan 15, 2018
1 parent dc4849f commit 7fdd6a5
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -24,6 +24,7 @@
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

import fr.neatmonster.nocheatplus.NCPAPIProvider;
import fr.neatmonster.nocheatplus.checks.CheckType;

/**
Expand Down Expand Up @@ -58,7 +59,9 @@ public static ExemptionSettings getExemptionSettings() {
* Set the settings to apply from that moment on. <br>
* Note that there is no cleanup, thus you should perform cleanup yourself,
* in case of passing a custom sub class of ExemptionSettings, for the case
* of your plugin disabling or NPC disabling.
* of your plugin disabling or NPC disabling. The given ExemptionSettings
* instance will be registered as a generic instance for the
* ExemptionSettings class.
*
* @param settings
* If null, the default implementation will be used, otherwise
Expand All @@ -67,6 +70,7 @@ public static ExemptionSettings getExemptionSettings() {
*/
public static void setExemptionSettings(ExemptionSettings settings) {
NCPExemptionManager.settings = settings;
NCPAPIProvider.getNoCheatPlusAPI().registerGenericInstance(ExemptionSettings.class, settings);
}

/**
Expand Down

0 comments on commit 7fdd6a5

Please sign in to comment.