Properly implement ContextManager#unregisterCalculator (#1422)

This commit is contained in:
Luck 2019-02-09 11:50:00 +00:00
parent dae64fc8c4
commit 4ef3d50965
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ public class ApiContextManager implements me.lucko.luckperms.api.context.Context
@Override
public void unregisterCalculator(@NonNull ContextCalculator<?> calculator) {
Objects.requireNonNull(calculator, "calculator");
this.handle.unregisterCalculator(calculator);
}
@Override

View File

@ -190,7 +190,7 @@ public abstract class ContextManager<T> {
protected Contexts calculate(T subject) {
MutableContextSet accumulator = MutableContextSet.create();
for (ContextCalculator<? super T> calculator : ContextManager.this.calculators) {
for (ContextCalculator<? super T> calculator : this.calculators) {
try {
MutableContextSet ret = calculator.giveApplicableContext(subject, accumulator);
if (ret == null) {