Remove permission caching

This commit is contained in:
Alexander Söderberg 2020-07-24 13:01:38 +02:00
parent 0ea862b572
commit dc1f669a1f
3 changed files with 0 additions and 16 deletions

View File

@ -225,7 +225,6 @@ import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
@ -1203,12 +1202,6 @@ import java.util.regex.Pattern;
} }
} }
} }
if (Settings.Enabled_Components.PERMISSION_CACHE) {
try (final MetaDataAccess<Map<String, Boolean>> metaDataAccess =
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_PERMISSIONS)) {
metaDataAccess.remove();
}
}
Location location = pp.getLocation(); Location location = pp.getLocation();
PlotArea area = location.getPlotArea(); PlotArea area = location.getPlotArea();
if (location.isPlotArea()) { if (location.isPlotArea()) {

View File

@ -45,7 +45,6 @@ import com.plotsquared.core.util.task.RunnableVal3;
import java.util.Arrays; import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
/** /**
@ -233,12 +232,6 @@ public class MainCommand extends Command {
public CompletableFuture<Boolean> execute(final PlotPlayer<?> player, String[] args, public CompletableFuture<Boolean> execute(final PlotPlayer<?> player, String[] args,
RunnableVal3<Command, Runnable, Runnable> confirm, RunnableVal3<Command, Runnable, Runnable> confirm,
RunnableVal2<Command, CommandResult> whenDone) { RunnableVal2<Command, CommandResult> whenDone) {
// Clear perm caching //
try (final MetaDataAccess<Map<String, Boolean>> permAccess = player.accessTemporaryMetaData(
PlayerMetaDataKeys.TEMPORARY_PERMISSIONS)) {
permAccess.remove();
}
// Optional command scope // // Optional command scope //
Location location = null; Location location = null;
Plot plot = null; Plot plot = null;

View File

@ -34,7 +34,6 @@ import com.plotsquared.core.plot.PlotInventory;
import com.plotsquared.core.setup.SetupProcess; import com.plotsquared.core.setup.SetupProcess;
import java.util.List; import java.util.List;
import java.util.Map;
public final class PlayerMetaDataKeys { public final class PlayerMetaDataKeys {
@ -50,7 +49,6 @@ public final class PlayerMetaDataKeys {
public static final MetaDataKey<Boolean> TEMPORARY_IGNORE_EXPIRE_TASK = MetaDataKey.of("ignoreExpireTask", new TypeLiteral<Boolean>() {}); public static final MetaDataKey<Boolean> TEMPORARY_IGNORE_EXPIRE_TASK = MetaDataKey.of("ignoreExpireTask", new TypeLiteral<Boolean>() {});
public static final MetaDataKey<Plot> TEMPORARY_WORLD_EDIT_REGION_PLOT = MetaDataKey.of("WorldEditRegionPlot", new TypeLiteral<Plot>() {}); public static final MetaDataKey<Plot> TEMPORARY_WORLD_EDIT_REGION_PLOT = MetaDataKey.of("WorldEditRegionPlot", new TypeLiteral<Plot>() {});
public static final MetaDataKey<Boolean> TEMPORARY_AUTO = MetaDataKey.of(Auto.class.getName(), new TypeLiteral<Boolean>() {}); public static final MetaDataKey<Boolean> TEMPORARY_AUTO = MetaDataKey.of(Auto.class.getName(), new TypeLiteral<Boolean>() {});
public static final MetaDataKey<Map<String, Boolean>> TEMPORARY_PERMISSIONS = MetaDataKey.of("permissions", new TypeLiteral<Map<String, Boolean>>() {});
public static final MetaDataKey<List<String>> TEMPORARY_SCHEMATICS = MetaDataKey.of("plot_schematics", new TypeLiteral<List<String>>() {}); public static final MetaDataKey<List<String>> TEMPORARY_SCHEMATICS = MetaDataKey.of("plot_schematics", new TypeLiteral<List<String>>() {});
public static final MetaDataKey<Location> TEMPORARY_LOCATION = MetaDataKey.of("location", new TypeLiteral<Location>() {}); public static final MetaDataKey<Location> TEMPORARY_LOCATION = MetaDataKey.of("location", new TypeLiteral<Location>() {});
public static final MetaDataKey<CmdInstance> TEMPORARY_CONFIRM = MetaDataKey.of("cmdConfirm", new TypeLiteral<CmdInstance>() {}); public static final MetaDataKey<CmdInstance> TEMPORARY_CONFIRM = MetaDataKey.of("cmdConfirm", new TypeLiteral<CmdInstance>() {});