mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-28 18:15:27 +02:00
Compare commits
13 Commits
fix/4595
...
renovate/a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
57bd9721bc | ||
![]() |
94322d5982 | ||
![]() |
6cbb894249 | ||
![]() |
6f0fa19601 | ||
![]() |
0b692459e6 | ||
![]() |
0d410ed869 | ||
![]() |
711fba0b2a | ||
![]() |
671a27fa6f | ||
![]() |
03de685dc4 | ||
![]() |
f616885206 | ||
![]() |
7da4eb1ab5 | ||
![]() |
629646ab06 | ||
![]() |
74a1a1f954 |
@@ -29,6 +29,7 @@ import com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent;
|
|||||||
import com.destroystokyo.paper.event.server.AsyncTabCompleteEvent;
|
import com.destroystokyo.paper.event.server.AsyncTabCompleteEvent;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||||
|
import com.plotsquared.core.PlotSquared;
|
||||||
import com.plotsquared.core.command.Command;
|
import com.plotsquared.core.command.Command;
|
||||||
import com.plotsquared.core.command.MainCommand;
|
import com.plotsquared.core.command.MainCommand;
|
||||||
import com.plotsquared.core.configuration.Settings;
|
import com.plotsquared.core.configuration.Settings;
|
||||||
@@ -38,6 +39,7 @@ import com.plotsquared.core.permissions.Permission;
|
|||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
import com.plotsquared.core.plot.Plot;
|
import com.plotsquared.core.plot.Plot;
|
||||||
import com.plotsquared.core.plot.PlotArea;
|
import com.plotsquared.core.plot.PlotArea;
|
||||||
|
import com.plotsquared.core.plot.PlotAreaType;
|
||||||
import com.plotsquared.core.plot.flag.FlagContainer;
|
import com.plotsquared.core.plot.flag.FlagContainer;
|
||||||
import com.plotsquared.core.plot.flag.implementations.BeaconEffectsFlag;
|
import com.plotsquared.core.plot.flag.implementations.BeaconEffectsFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.DoneFlag;
|
import com.plotsquared.core.plot.flag.implementations.DoneFlag;
|
||||||
@@ -48,6 +50,7 @@ import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
|||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
import com.plotsquared.core.util.PlotFlagUtil;
|
import com.plotsquared.core.util.PlotFlagUtil;
|
||||||
import io.papermc.paper.event.entity.EntityMoveEvent;
|
import io.papermc.paper.event.entity.EntityMoveEvent;
|
||||||
|
import io.papermc.paper.event.world.StructuresLocateEvent;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
@@ -458,6 +461,21 @@ public class PaperListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Don't let the server die when populating cartographers (villager offering maps) in classic plot worlds
|
||||||
|
* (as those don't generate POIs)
|
||||||
|
*/
|
||||||
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||||
|
public void onStructuresLocate(StructuresLocateEvent event) {
|
||||||
|
if (!PlotSquared.get().getPlotAreaManager().hasPlotArea(event.getWorld().getName())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final PlotArea area = PlotSquared.get().getPlotAreaManager().getPlotAreaByString(event.getWorld().getName());
|
||||||
|
if (area != null && area.getType() == PlotAreaType.NORMAL) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean getBooleanFlagValue(
|
private boolean getBooleanFlagValue(
|
||||||
@NonNull FlagContainer container,
|
@NonNull FlagContainer container,
|
||||||
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
||||||
|
@@ -20,7 +20,6 @@ package com.plotsquared.core.command;
|
|||||||
|
|
||||||
import com.plotsquared.core.configuration.Settings;
|
import com.plotsquared.core.configuration.Settings;
|
||||||
import com.plotsquared.core.configuration.caption.Caption;
|
import com.plotsquared.core.configuration.caption.Caption;
|
||||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
|
||||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||||
import com.plotsquared.core.database.DBFunc;
|
import com.plotsquared.core.database.DBFunc;
|
||||||
import com.plotsquared.core.permissions.Permission;
|
import com.plotsquared.core.permissions.Permission;
|
||||||
@@ -131,13 +130,9 @@ public class Info extends SubCommand {
|
|||||||
info = getCaption(arg);
|
info = getCaption(arg);
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
if (Settings.Ratings.USE_LIKES) {
|
if (Settings.Ratings.USE_LIKES) {
|
||||||
player.sendMessage(StaticCaption.of(
|
player.sendMessage(TranslatableCaption.of("info.plot_info_categories.use_likes"));
|
||||||
"&6Categories&7: &amembers&7, &aalias&7, &abiome&7, &aseen&7, &adenied&7, &aflags&7, &aid&7, &asize&7, &atrusted&7, "
|
|
||||||
+ "&aowner&7, " + " &alikes"));
|
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(StaticCaption.of(
|
player.sendMessage(TranslatableCaption.of("info.plot_info_categories.use_rating"));
|
||||||
"&6Categories&7: &amembers&7, &aalias&7, &abiome&7, &aseen&7, &adenied&7, &aflags&7, &aid&7, &asize&7, &atrusted&7, "
|
|
||||||
+ "&aowner&7, " + " &arating"));
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -353,6 +353,8 @@
|
|||||||
"info.infinite": "<gray>Infinite</gray>",
|
"info.infinite": "<gray>Infinite</gray>",
|
||||||
"info.plot_unowned": "<prefix><red>The current plot must have an owner to perform this action.</red>",
|
"info.plot_unowned": "<prefix><red>The current plot must have an owner to perform this action.</red>",
|
||||||
"info.plot_info_unclaimed": "<prefix><gray>Plot <gold><plot></gold> is not yet claimed.</gray>",
|
"info.plot_info_unclaimed": "<prefix><gray>Plot <gold><plot></gold> is not yet claimed.</gray>",
|
||||||
|
"info.plot_info_categories.use_rating": "<prefix><gold>Categories: </gold> <gray>members, alias, biome, seen, denied, flags, id, size, trusted, owner, rating</gray>",
|
||||||
|
"info.plot_info_categories.use_likes": "<prefix><gold>Categories: </gold> <gray>members, alias, biome, seen, denied, flags, id, size, trusted, owner, likes</gray>",
|
||||||
"info.plot_info_header": "<dark_gray><strikethrough>--------- <reset><gold>INFO </gold><dark_gray><strikethrough>---------</dark_gray><reset>",
|
"info.plot_info_header": "<dark_gray><strikethrough>--------- <reset><gold>INFO </gold><dark_gray><strikethrough>---------</dark_gray><reset>",
|
||||||
"info.plot_info_hidden": "<prefix><red>You cannot view the information about this plot.</red>",
|
"info.plot_info_hidden": "<prefix><red>You cannot view the information about this plot.</red>",
|
||||||
"info.plot_info_format": "<header>\n<gold>ID: <gray><id></gray>\nCreation: <gray><creationdate></gray>\nArea: <gray><area></gray>\nAlias: <gray><alias></gray>\nOwner: <gray><owner></gray>\nBiome: <gray><biome></gray>\nCan Build: <gray><build></gray>\nRating: <gray><rating></gray>\nSeen: <gray><seen></gray>\nTrusted: <gray><trusted></gray>\nMembers: <gray><members></gray>\nDenied: <gray><denied></gray>\nFlags: <gray><flags></gray>\nDescription: <gray><desc></gray></gold>\n<footer>",
|
"info.plot_info_format": "<header>\n<gold>ID: <gray><id></gray>\nCreation: <gray><creationdate></gray>\nArea: <gray><area></gray>\nAlias: <gray><alias></gray>\nOwner: <gray><owner></gray>\nBiome: <gray><biome></gray>\nCan Build: <gray><build></gray>\nRating: <gray><rating></gray>\nSeen: <gray><seen></gray>\nTrusted: <gray><trusted></gray>\nMembers: <gray><members></gray>\nDenied: <gray><denied></gray>\nFlags: <gray><flags></gray>\nDescription: <gray><desc></gray></gold>\n<footer>",
|
||||||
|
@@ -69,8 +69,8 @@ subprojects {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.13.1")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.12.2")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.13.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
|
@@ -3,11 +3,11 @@
|
|||||||
paper = "1.20.4-R0.1-SNAPSHOT"
|
paper = "1.20.4-R0.1-SNAPSHOT"
|
||||||
guice = "7.0.0"
|
guice = "7.0.0"
|
||||||
spotbugs = "4.9.3"
|
spotbugs = "4.9.3"
|
||||||
checkerqual = "3.49.3"
|
checkerqual = "3.49.4"
|
||||||
gson = "2.10"
|
gson = "2.10"
|
||||||
guava = "31.1-jre"
|
guava = "31.1-jre"
|
||||||
snakeyaml = "2.0"
|
snakeyaml = "2.0"
|
||||||
adventure = "4.21.0"
|
adventure = "4.23.0"
|
||||||
adventure-bukkit = "4.4.0"
|
adventure-bukkit = "4.4.0"
|
||||||
log4j = "2.19.0"
|
log4j = "2.19.0"
|
||||||
|
|
||||||
@@ -15,8 +15,8 @@ log4j = "2.19.0"
|
|||||||
worldedit = "7.2.20"
|
worldedit = "7.2.20"
|
||||||
fawe = "2.13.0"
|
fawe = "2.13.0"
|
||||||
placeholderapi = "2.11.6"
|
placeholderapi = "2.11.6"
|
||||||
luckperms = "5.4"
|
luckperms = "5.5"
|
||||||
essentialsx = "2.21.0"
|
essentialsx = "2.21.1"
|
||||||
mvdwapi = "3.1.1"
|
mvdwapi = "3.1.1"
|
||||||
|
|
||||||
# Third party
|
# Third party
|
||||||
@@ -35,8 +35,8 @@ serverlib = "2.3.7"
|
|||||||
# Gradle plugins
|
# Gradle plugins
|
||||||
shadow = "8.3.6"
|
shadow = "8.3.6"
|
||||||
grgit = "4.1.1"
|
grgit = "4.1.1"
|
||||||
spotless = "7.0.3"
|
spotless = "7.0.4"
|
||||||
publish = "0.32.0"
|
publish = "0.33.0"
|
||||||
runPaper = "2.3.1"
|
runPaper = "2.3.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
Reference in New Issue
Block a user