use of fr.neatmonster.nocheatplus.components.data.IDataOnRemoveSubCheckData in project NoCheatPlus by NoCheatPlus.
the class RegisterInstance method removeSubCheckData.
/**
* Register for sub check removal.
*
* @param checkType
* @param withDescendantCheckTypes
* @return
*/
public RegisterInstance<T, A> removeSubCheckData(final CheckType checkType, final boolean withDescendantCheckTypes) {
if (!IDataOnRemoveSubCheckData.class.isAssignableFrom(type)) {
throw new UnsupportedOperationException();
}
final Collection<CheckType> checkTypes = withDescendantCheckTypes ? CheckTypeUtil.getWithDescendants(checkType) : Arrays.asList(checkType);
items.add(new IDoRegister() {
@SuppressWarnings("unchecked")
@Override
public void doRegister() {
factoryRegistry.addToGroups(checkTypes, (Class<? extends IDataOnRemoveSubCheckData>) type, IDataOnRemoveSubCheckData.class);
}
});
return this;
}
Aggregations