diff --git a/src/fr/neatmonster/nocheatplus/components/IComponentRegistry.java b/src/fr/neatmonster/nocheatplus/components/IComponentRegistry.java new file mode 100644 index 00000000..7f4a837b --- /dev/null +++ b/src/fr/neatmonster/nocheatplus/components/IComponentRegistry.java @@ -0,0 +1,18 @@ +package fr.neatmonster.nocheatplus.components; + +public interface IComponentRegistry { + /** + * Convenience method to add components according to implemented interfaces, + * like Listener, INotifyReload, INeedConfig.
+ * For the NoCheatPlus instance this must be done after the configuration has been initialized. + * @param obj + */ + public void addComponent(final Object onj); + + /** + * Remove a registered component.
+ * Does not unregister listeners currently. + * @param obj + */ + public void removeComponent(final Object obj); +} diff --git a/src/fr/neatmonster/nocheatplus/components/IData.java b/src/fr/neatmonster/nocheatplus/components/IData.java new file mode 100644 index 00000000..8c8ce1db --- /dev/null +++ b/src/fr/neatmonster/nocheatplus/components/IData.java @@ -0,0 +1,10 @@ +package fr.neatmonster.nocheatplus.components; + +/** + * Some (player-related) data is held here. + * @author mc_dev + * + */ +public interface IData { + +} diff --git a/src/fr/neatmonster/nocheatplus/components/IHaveCheckType.java b/src/fr/neatmonster/nocheatplus/components/IHaveCheckType.java new file mode 100644 index 00000000..5fac3bb2 --- /dev/null +++ b/src/fr/neatmonster/nocheatplus/components/IHaveCheckType.java @@ -0,0 +1,12 @@ +package fr.neatmonster.nocheatplus.components; + +import fr.neatmonster.nocheatplus.checks.CheckType; + +/** + * Interface to indicate a component is associated with a CheckType. + * @author mc_dev + * + */ +public interface IHaveCheckType { + public CheckType getCheckType(); +} diff --git a/src/fr/neatmonster/nocheatplus/components/INeedConfig.java b/src/fr/neatmonster/nocheatplus/components/INeedConfig.java new file mode 100644 index 00000000..215aa924 --- /dev/null +++ b/src/fr/neatmonster/nocheatplus/components/INeedConfig.java @@ -0,0 +1,11 @@ +package fr.neatmonster.nocheatplus.components; + +import fr.neatmonster.nocheatplus.command.INotifyReload; + +/** + * Indicate that a component needs config after time of creation but in onEnable. + * @author mc_dev + * + */ +public interface INeedConfig extends INotifyReload{ +} diff --git a/src/fr/neatmonster/nocheatplus/components/IRemoveData.java b/src/fr/neatmonster/nocheatplus/components/IRemoveData.java new file mode 100644 index 00000000..839b5e79 --- /dev/null +++ b/src/fr/neatmonster/nocheatplus/components/IRemoveData.java @@ -0,0 +1,20 @@ +package fr.neatmonster.nocheatplus.components; + +/** + * Interface for component registration to allow cleanup for player data. + * @author mc_dev + * + */ +public interface IRemoveData { + /** + * Remove the data of one player. + * @param playerName + * @return IData instance, if it was present. + */ + public IData removeData(String playerName); + + /** + * Remove the data of all players. + */ + public void removeAllData(); +} diff --git a/src/fr/neatmonster/nocheatplus/components/NoCheatPlusAPI.java b/src/fr/neatmonster/nocheatplus/components/NoCheatPlusAPI.java new file mode 100644 index 00000000..7c2edbf3 --- /dev/null +++ b/src/fr/neatmonster/nocheatplus/components/NoCheatPlusAPI.java @@ -0,0 +1,10 @@ +package fr.neatmonster.nocheatplus.components; + + + + +public interface NoCheatPlusAPI extends IComponentRegistry{ + + + +}