Also remove data for CheckType.ALL for components that don't implement

IHaveCheckType.
This commit is contained in:
asofold 2013-01-13 21:23:25 +01:00
parent b492bd5ac0
commit 32c376455a

View File

@ -234,6 +234,10 @@ public class DataManager implements Listener, INotifyReload, INeedConfig, Compon
final CheckType refType = ((IHaveCheckType) rmd).getCheckType();
if (refType == checkType || APIUtils.isParent(checkType, refType)) rmd.removeAllData();
}
else if (checkType == CheckType.ALL){
// Not sure this is really good, though.
rmd.removeAllData();
}
}
ViolationHistory.clear(checkType);
}
@ -281,6 +285,10 @@ public class DataManager implements Listener, INotifyReload, INeedConfig, Compon
if (rmd.removeData(PlayerName) != null) removed = true;
}
}
else if (checkType == CheckType.ALL){
// Not sure this is really good, though.
if (rmd.removeData(PlayerName) != null) removed = true;
}
}
return removed;
}
@ -321,9 +329,9 @@ public class DataManager implements Listener, INotifyReload, INeedConfig, Compon
*/
public void onDisable() {
clearData(CheckType.ALL);
for (IRemoveData rmd : iRemoveData){
if (!(rmd instanceof IHaveCheckType)) rmd.removeAllData();
}
// for (IRemoveData rmd : iRemoveData){
// if (!(rmd instanceof IHaveCheckType)) rmd.removeAllData();
// }
iRemoveData.clear();
clearConfigs();
lastLogout.clear();