mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 20:56:45 +01:00
Merge branch 'v6' into feature/v6/pipeline-queue
This commit is contained in:
commit
cf13f13fbf
@ -95,6 +95,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
super(plotAreaManager, eventDispatcher, econHandler, permissionHandler);
|
||||
this.player = player;
|
||||
this.econHandler = econHandler;
|
||||
this.setupPermissionProfile();
|
||||
if (realPlayer) {
|
||||
super.populatePersistentMetaMap();
|
||||
}
|
||||
|
@ -44,8 +44,6 @@ import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import com.sk89q.worldedit.world.gamemode.GameMode;
|
||||
import com.sk89q.worldedit.world.gamemode.GameModes;
|
||||
import com.sk89q.worldedit.world.item.ItemType;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -67,6 +65,7 @@ public class ConsolePlayer extends PlotPlayer<Actor> {
|
||||
@Nonnull final PermissionHandler permissionHandler) {
|
||||
super(plotAreaManager, eventDispatcher, econHandler, permissionHandler);
|
||||
this.actor = actor;
|
||||
this.setupPermissionProfile();
|
||||
final PlotArea[] areas = plotAreaManager.getAllPlotAreas();
|
||||
final PlotArea area;
|
||||
if (areas.length > 0) {
|
||||
|
@ -100,13 +100,19 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer
|
||||
private final PlotAreaManager plotAreaManager;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
private final EconHandler econHandler;
|
||||
private final PermissionProfile permissionProfile;
|
||||
private final PermissionHandler permissionHandler;
|
||||
// Delayed initialisation
|
||||
private PermissionProfile permissionProfile;
|
||||
|
||||
public PlotPlayer(@Nonnull final PlotAreaManager plotAreaManager, @Nonnull final EventDispatcher eventDispatcher, @Nullable final EconHandler econHandler,
|
||||
@Nonnull final PermissionHandler permissionHandler) {
|
||||
this.plotAreaManager = plotAreaManager;
|
||||
this.eventDispatcher = eventDispatcher;
|
||||
this.econHandler = econHandler;
|
||||
this.permissionHandler = permissionHandler;
|
||||
}
|
||||
|
||||
protected void setupPermissionProfile() {
|
||||
this.permissionProfile = permissionHandler.getPermissionProfile(this).orElse(
|
||||
NullPermissionProfile.INSTANCE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user