From dd3a78ada8fd89b6b621a95e7453754b0d01cdb7 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 3 Dec 2016 11:08:47 +0000 Subject: [PATCH] Fix #65 --- .../lucko/luckperms/sponge/contexts/SpongeCalculatorLink.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/contexts/SpongeCalculatorLink.java b/sponge/src/main/java/me/lucko/luckperms/sponge/contexts/SpongeCalculatorLink.java index 2e22cacfa..f9902b539 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/contexts/SpongeCalculatorLink.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/contexts/SpongeCalculatorLink.java @@ -31,6 +31,7 @@ import me.lucko.luckperms.sponge.service.base.Util; import org.spongepowered.api.service.context.Context; import org.spongepowered.api.service.permission.Subject; +import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -40,10 +41,9 @@ public class SpongeCalculatorLink extends ContextCalculator { @Override public MutableContextSet giveApplicableContext(Subject subject, MutableContextSet accumulator) { - Set contexts = Util.convertContexts(accumulator); + Set contexts = new HashSet<>(); calculator.accumulateContexts(subject, contexts); - accumulator.clear(); accumulator.addAll(Util.convertContexts(contexts)); return accumulator; }