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>
|
<dependency>
|
||||||
<groupId>com.plotsquared</groupId>
|
<groupId>com.plotsquared</groupId>
|
||||||
<artifactId>PlotSquared-Core</artifactId>
|
<artifactId>PlotSquared-Core</artifactId>
|
||||||
<version>5.12.3</version>
|
<version>5.12.4</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -1618,6 +1618,35 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
public void onBlockDispense(BlockDispenseEvent event) {
|
public void onBlockDispense(BlockDispenseEvent event) {
|
||||||
Material type = event.getItem().getType();
|
Material type = event.getItem().getType();
|
||||||
switch (type) {
|
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 WATER_BUCKET:
|
||||||
case LAVA_BUCKET: {
|
case LAVA_BUCKET: {
|
||||||
if (event.getBlock().getType() == Material.DROPPER) {
|
if (event.getBlock().getType() == Material.DROPPER) {
|
||||||
@ -1864,8 +1893,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
Plot plot = location.getPlotAbs();
|
Plot plot = location.getPlotAbs();
|
||||||
BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer());
|
BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer());
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class)
|
if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) && !Permissions
|
||||||
&& !Permissions.hasPermission(pp, "plots.admin.interact.road")) {
|
.hasPermission(pp, "plots.admin.interact.road")) {
|
||||||
MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
@ -2601,8 +2630,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED);
|
Captions.PERMISSION_ADMIN_INTERACT_UNOWNED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else if ((plot != null && !plot.isAdded(pp.getUUID())) || area
|
} else if ((plot != null && !plot.isAdded(pp.getUUID())) || (plot == null && area
|
||||||
.isRoadFlags()) {
|
.isRoadFlags())) {
|
||||||
final Entity entity = event.getRightClicked();
|
final Entity entity = event.getRightClicked();
|
||||||
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
||||||
BukkitAdapter.adapt(entity.getType());
|
BukkitAdapter.adapt(entity.getType());
|
||||||
|
@ -259,6 +259,7 @@ public class PlotSquared {
|
|||||||
if (Settings.Enabled_Components.CHUNK_PROCESSOR) {
|
if (Settings.Enabled_Components.CHUNK_PROCESSOR) {
|
||||||
this.IMP.registerChunkProcessor();
|
this.IMP.registerChunkProcessor();
|
||||||
}
|
}
|
||||||
|
startExpiryTasks();
|
||||||
// Create Event utility class
|
// Create Event utility class
|
||||||
eventDispatcher = new EventDispatcher();
|
eventDispatcher = new EventDispatcher();
|
||||||
// create Hybrid utility class
|
// create Hybrid utility class
|
||||||
|
@ -84,7 +84,7 @@ public class HomeCommand extends Command {
|
|||||||
|
|
||||||
@NotNull private PlotQuery query(@NotNull final PlotPlayer<?> player) {
|
@NotNull private PlotQuery query(@NotNull final PlotPlayer<?> player) {
|
||||||
// everything plots need to have in common here
|
// 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,
|
@Override public CompletableFuture<Boolean> execute(PlotPlayer<?> player, String[] args,
|
||||||
@ -107,6 +107,7 @@ public class HomeCommand extends Command {
|
|||||||
PlotQuery query = query(player);
|
PlotQuery query = query(player);
|
||||||
int page = 1; // page = index + 1
|
int page = 1; // page = index + 1
|
||||||
String identifier;
|
String identifier;
|
||||||
|
boolean basePlotOnly = true;
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
identifier = args[0];
|
identifier = args[0];
|
||||||
@ -124,6 +125,7 @@ public class HomeCommand extends Command {
|
|||||||
Plot fromId = MainUtil.getPlotFromString(player, identifier, false);
|
Plot fromId = MainUtil.getPlotFromString(player, identifier, false);
|
||||||
if (fromId != null && fromId.isOwner(player.getUUID())) {
|
if (fromId != null && fromId.isOwner(player.getUUID())) {
|
||||||
// it was a valid plot id
|
// it was a valid plot id
|
||||||
|
basePlotOnly = false;
|
||||||
query.withPlot(fromId);
|
query.withPlot(fromId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -165,12 +167,16 @@ public class HomeCommand extends Command {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// as the query already filters by owner, this is fine
|
// as the query already filters by owner, this is fine
|
||||||
|
basePlotOnly = false;
|
||||||
query.withPlot(plot);
|
query.withPlot(plot);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
query.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
query.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (basePlotOnly) {
|
||||||
|
query.whereBasePlot();
|
||||||
|
}
|
||||||
home(player, query, page, confirm, whenDone);
|
home(player, query, page, confirm, whenDone);
|
||||||
return CompletableFuture.completedFuture(true);
|
return CompletableFuture.completedFuture(true);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ ext {
|
|||||||
git = Grgit.open(dir: new File(rootDir.toString() + "/.git"))
|
git = Grgit.open(dir: new File(rootDir.toString() + "/.git"))
|
||||||
}
|
}
|
||||||
|
|
||||||
def ver = "5.12.3"
|
def ver = "5.12.4"
|
||||||
def versuffix = ""
|
def versuffix = ""
|
||||||
ext {
|
ext {
|
||||||
if (project.hasProperty("versionsuffix")) {
|
if (project.hasProperty("versionsuffix")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user