mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-17 12:54:43 +02:00
Compare commits
1 Commits
7.5.4
...
fix/v7/cau
Author | SHA1 | Date | |
---|---|---|---|
4e486f9be3 |
@ -1313,17 +1313,6 @@ public class PlayerEventListener implements Listener {
|
|||||||
//Allow all players to eat while also allowing the block place event to be fired
|
//Allow all players to eat while also allowing the block place event to be fired
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Process creature spawning of armor stands & end crystals here if spawned by the player in order to be able to
|
|
||||||
// reset the player's hand item if spawning needs to be cancelled.
|
|
||||||
if (type == Material.ARMOR_STAND || type == Material.END_CRYSTAL) {
|
|
||||||
Plot plot = location.getOwnedPlotAbs();
|
|
||||||
if (BukkitEntityUtil.checkEntity(type == Material.ARMOR_STAND ? EntityType.ARMOR_STAND : EntityType.ENDER_CRYSTAL,
|
|
||||||
plot)) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Continue with normal place event checks
|
|
||||||
if (type == Material.ARMOR_STAND) {
|
if (type == Material.ARMOR_STAND) {
|
||||||
location = BukkitUtil.adapt(block.getRelative(event.getBlockFace()).getLocation());
|
location = BukkitUtil.adapt(block.getRelative(event.getBlockFace()).getLocation());
|
||||||
eventType = PlayerBlockEventType.PLACE_MISC;
|
eventType = PlayerBlockEventType.PLACE_MISC;
|
||||||
|
@ -354,17 +354,13 @@ public class BukkitEntityUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean checkEntity(Entity entity, Plot plot) {
|
public static boolean checkEntity(Entity entity, Plot plot) {
|
||||||
return checkEntity(entity.getType(), plot);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean checkEntity(EntityType type, Plot plot) {
|
|
||||||
if (plot == null || !plot.hasOwner() || plot.getFlags().isEmpty() && plot.getArea()
|
if (plot == null || !plot.hasOwner() || plot.getFlags().isEmpty() && plot.getArea()
|
||||||
.getFlagContainer().getFlagMap().isEmpty()) {
|
.getFlagContainer().getFlagMap().isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
final com.sk89q.worldedit.world.entity.EntityType entityType =
|
||||||
BukkitAdapter.adapt(type);
|
BukkitAdapter.adapt(entity.getType());
|
||||||
|
|
||||||
if (EntityCategories.PLAYER.contains(entityType)) {
|
if (EntityCategories.PLAYER.contains(entityType)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -20,6 +20,7 @@ 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;
|
||||||
@ -130,9 +131,13 @@ 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(TranslatableCaption.of("info.plot_info_categories.use_likes"));
|
player.sendMessage(StaticCaption.of(
|
||||||
|
"&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(TranslatableCaption.of("info.plot_info_categories.use_rating"));
|
player.sendMessage(StaticCaption.of(
|
||||||
|
"&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;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public interface Caption {
|
|||||||
* @param localeHolder Local holder
|
* @param localeHolder Local holder
|
||||||
* @param tagResolvers custom tag resolvers to replace placeholders / parameters
|
* @param tagResolvers custom tag resolvers to replace placeholders / parameters
|
||||||
* @return {@link ComponentLike}
|
* @return {@link ComponentLike}
|
||||||
* @since 7.5.4
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@NonNull Component toComponent(@NonNull LocaleHolder localeHolder, @NonNull TagResolver @NonNull... tagResolvers);
|
@NonNull Component toComponent(@NonNull LocaleHolder localeHolder, @NonNull TagResolver @NonNull... tagResolvers);
|
||||||
|
|
||||||
|
@ -353,8 +353,6 @@
|
|||||||
"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>",
|
||||||
|
@ -22,7 +22,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.intellectualsites.plotsquared"
|
group = "com.intellectualsites.plotsquared"
|
||||||
version = "7.5.4"
|
version = "7.5.4-SNAPSHOT"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
@ -69,8 +69,8 @@ subprojects {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.13.3")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.13.1")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.13.3")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.13.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
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.5"
|
checkerqual = "3.49.4"
|
||||||
gson = "2.10"
|
gson = "2.10"
|
||||||
guava = "31.1-jre"
|
guava = "31.1-jre"
|
||||||
snakeyaml = "2.0"
|
snakeyaml = "2.0"
|
||||||
@ -33,10 +33,10 @@ vault = "1.7.1"
|
|||||||
serverlib = "2.3.7"
|
serverlib = "2.3.7"
|
||||||
|
|
||||||
# Gradle plugins
|
# Gradle plugins
|
||||||
shadow = "8.3.8"
|
shadow = "8.3.6"
|
||||||
grgit = "4.1.1"
|
grgit = "4.1.1"
|
||||||
spotless = "7.0.4"
|
spotless = "7.0.4"
|
||||||
publish = "0.33.0"
|
publish = "0.32.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.3-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