mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Merge remote-tracking branch 'origin/v5' into v5
This commit is contained in:
commit
904f5485ab
@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>com.plotsquared</groupId>
|
||||
<artifactId>PlotSquared-Core</artifactId>
|
||||
<version>5.12.3</version>
|
||||
<version>5.12.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -1618,6 +1618,35 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
public void onBlockDispense(BlockDispenseEvent event) {
|
||||
Material type = event.getItem().getType();
|
||||
switch (type) {
|
||||
case SHULKER_BOX:
|
||||
case WHITE_SHULKER_BOX:
|
||||
case ORANGE_SHULKER_BOX:
|
||||
case MAGENTA_SHULKER_BOX:
|
||||
case LIGHT_BLUE_SHULKER_BOX:
|
||||
case YELLOW_SHULKER_BOX:
|
||||
case LIME_SHULKER_BOX:
|
||||
case PINK_SHULKER_BOX:
|
||||
case GRAY_SHULKER_BOX:
|
||||
case LIGHT_GRAY_SHULKER_BOX:
|
||||
case CYAN_SHULKER_BOX:
|
||||
case PURPLE_SHULKER_BOX:
|
||||
case BLUE_SHULKER_BOX:
|
||||
case BROWN_SHULKER_BOX:
|
||||
case GREEN_SHULKER_BOX:
|
||||
case RED_SHULKER_BOX:
|
||||
case BLACK_SHULKER_BOX:
|
||||
case CARVED_PUMPKIN:
|
||||
case WITHER_SKELETON_SKULL:
|
||||
case FLINT_AND_STEEL:
|
||||
case BONE_MEAL:
|
||||
case SHEARS:
|
||||
case GLASS_BOTTLE:
|
||||
case GLOWSTONE:
|
||||
case COD_BUCKET:
|
||||
case PUFFERFISH_BUCKET:
|
||||
case SALMON_BUCKET:
|
||||
case TROPICAL_FISH_BUCKET:
|
||||
case BUCKET:
|
||||
case WATER_BUCKET:
|
||||
case LAVA_BUCKET: {
|
||||
if (event.getBlock().getType() == Material.DROPPER) {
|
||||
@ -1864,8 +1893,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
Plot plot = location.getPlotAbs();
|
||||
BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer());
|
||||
if (plot == null) {
|
||||
if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class)
|
||||
&& !Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
||||
if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) && !Permissions
|
||||
.hasPermission(pp, "plots.admin.interact.road")) {
|
||||
MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
||||
e.setCancelled(true);
|
||||
}
|
||||
@ -2601,8 +2630,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if ((plot != null && !plot.isAdded(pp.getUUID())) || area
|
||||
.isRoadFlags()) {
|
||||
} else if ((plot != null && !plot.isAdded(pp.getUUID())) || (plot == null && area
|
||||
.isRoadFlags())) {
|
||||
final Entity entity = event.getRightClicked();
|
||||
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
||||
BukkitAdapter.adapt(entity.getType());
|
||||
|
@ -259,6 +259,7 @@ public class PlotSquared {
|
||||
if (Settings.Enabled_Components.CHUNK_PROCESSOR) {
|
||||
this.IMP.registerChunkProcessor();
|
||||
}
|
||||
startExpiryTasks();
|
||||
// Create Event utility class
|
||||
eventDispatcher = new EventDispatcher();
|
||||
// create Hybrid utility class
|
||||
|
@ -84,7 +84,7 @@ public class HomeCommand extends Command {
|
||||
|
||||
@NotNull private PlotQuery query(@NotNull final PlotPlayer<?> player) {
|
||||
// everything plots need to have in common here
|
||||
return PlotQuery.newQuery().ownedBy(player).whereBasePlot();
|
||||
return PlotQuery.newQuery().ownedBy(player);
|
||||
}
|
||||
|
||||
@Override public CompletableFuture<Boolean> execute(PlotPlayer<?> player, String[] args,
|
||||
@ -107,6 +107,7 @@ public class HomeCommand extends Command {
|
||||
PlotQuery query = query(player);
|
||||
int page = 1; // page = index + 1
|
||||
String identifier;
|
||||
boolean basePlotOnly = true;
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
identifier = args[0];
|
||||
@ -124,6 +125,7 @@ public class HomeCommand extends Command {
|
||||
Plot fromId = MainUtil.getPlotFromString(player, identifier, false);
|
||||
if (fromId != null && fromId.isOwner(player.getUUID())) {
|
||||
// it was a valid plot id
|
||||
basePlotOnly = false;
|
||||
query.withPlot(fromId);
|
||||
break;
|
||||
}
|
||||
@ -165,12 +167,16 @@ public class HomeCommand extends Command {
|
||||
break;
|
||||
}
|
||||
// as the query already filters by owner, this is fine
|
||||
basePlotOnly = false;
|
||||
query.withPlot(plot);
|
||||
break;
|
||||
case 0:
|
||||
query.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||
break;
|
||||
}
|
||||
if (basePlotOnly) {
|
||||
query.whereBasePlot();
|
||||
}
|
||||
home(player, query, page, confirm, whenDone);
|
||||
return CompletableFuture.completedFuture(true);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ ext {
|
||||
git = Grgit.open(dir: new File(rootDir.toString() + "/.git"))
|
||||
}
|
||||
|
||||
def ver = "5.12.3"
|
||||
def ver = "5.12.4"
|
||||
def versuffix = ""
|
||||
ext {
|
||||
if (project.hasProperty("versionsuffix")) {
|
||||
|
Loading…
Reference in New Issue
Block a user