mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-21 12:07:39 +01:00
Fix claim context calculators.
This commit is contained in:
parent
eca403bf1d
commit
ebe0e49745
@ -54,6 +54,7 @@ public void calculate(@NonNull Player player, @NonNull ContextConsumer contextSe
|
||||
} else {
|
||||
contextSet.accept(sourceClaim.getContext().getKey(), sourceClaim.getContext().getValue());
|
||||
}
|
||||
contextSet.accept("server", GriefDefenderPlugin.getInstance().getPermissionProvider().getServerName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@
|
||||
import com.griefdefender.api.permission.flag.Flag;
|
||||
import com.griefdefender.api.permission.option.Option;
|
||||
import com.griefdefender.cache.PermissionHolderCache;
|
||||
import com.griefdefender.claim.ClaimContextCalculator;
|
||||
import com.griefdefender.claim.GDClaim;
|
||||
import com.griefdefender.permission.GDPermissionHolder;
|
||||
import com.griefdefender.permission.GDPermissionResult;
|
||||
@ -110,6 +111,7 @@ public int compare(Set<Context> s1, Set<Context> s2) {
|
||||
|
||||
public LuckPermsProvider() {
|
||||
this.luckPermsApi = Bukkit.getServicesManager().getRegistration(LuckPerms.class).getProvider();
|
||||
this.luckPermsApi.getContextManager().registerCalculator(new ClaimContextCalculator());
|
||||
}
|
||||
|
||||
public LuckPerms getApi() {
|
||||
|
@ -60,6 +60,7 @@ public void accumulateContexts(Subject calculable, Set<Context> accumulator) {
|
||||
} else {
|
||||
accumulator.add(sourceClaim.getSpongeContext());
|
||||
}
|
||||
accumulator.add(new Context("server", GriefDefenderPlugin.getInstance().getPermissionProvider().getServerName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user