mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-19 13:54:43 +02:00
Compare commits
6 Commits
chore/sqli
...
fix/runSer
Author | SHA1 | Date | |
---|---|---|---|
944e90334a | |||
c013b92e62 | |||
b00a46b286 | |||
44b1127181 | |||
c7bfd48a21 | |||
dc13783db8 |
@ -385,9 +385,9 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link #restoreBreedable(Breedable)} instead
|
* @deprecated Use {@link #restoreBreedable(Breedable)} instead
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
@Deprecated(forRemoval = true, since = "7.1.0")
|
||||||
private void restoreAgeable(Ageable entity) {
|
private void restoreAgeable(Ageable entity) {
|
||||||
if (!this.aged.adult) {
|
if (!this.aged.adult) {
|
||||||
entity.setBaby();
|
entity.setBaby();
|
||||||
@ -400,9 +400,9 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link #storeBreedable(Breedable)} instead
|
* @deprecated Use {@link #storeBreedable(Breedable)} instead
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
@Deprecated(forRemoval = true, since = "7.1.0")
|
||||||
public void storeAgeable(Ageable aged) {
|
public void storeAgeable(Ageable aged) {
|
||||||
this.aged = new AgeableStats();
|
this.aged = new AgeableStats();
|
||||||
this.aged.age = aged.getAge();
|
this.aged.age = aged.getAge();
|
||||||
@ -411,7 +411,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
private void restoreBreedable(Breedable entity) {
|
private void restoreBreedable(Breedable entity) {
|
||||||
if (!this.aged.adult) {
|
if (!this.aged.adult) {
|
||||||
@ -424,7 +424,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
private void storeBreedable(Breedable breedable) {
|
private void storeBreedable(Breedable breedable) {
|
||||||
this.aged = new AgeableStats();
|
this.aged = new AgeableStats();
|
||||||
|
@ -72,8 +72,6 @@ tasks {
|
|||||||
opt.links("https://jd.advntr.dev/text-minimessage/4.14.0/")
|
opt.links("https://jd.advntr.dev/text-minimessage/4.14.0/")
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
opt.links("https://javadocs.dev/com.intellectualsites.informative-annotations/informative-annotations/"
|
|
||||||
+ libs.informativeAnnotations.get().versionConstraint.toString())
|
|
||||||
opt.isLinkSource = true
|
opt.isLinkSource = true
|
||||||
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
||||||
opt.isUse = true
|
opt.isUse = true
|
||||||
|
@ -29,7 +29,6 @@ import com.plotsquared.core.util.WorldUtil;
|
|||||||
import com.plotsquared.core.util.entity.EntityCategories;
|
import com.plotsquared.core.util.entity.EntityCategories;
|
||||||
import com.plotsquared.core.util.entity.EntityCategory;
|
import com.plotsquared.core.util.entity.EntityCategory;
|
||||||
import com.plotsquared.core.util.query.PlotQuery;
|
import com.plotsquared.core.util.query.PlotQuery;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
|
||||||
import com.plotsquared.core.uuid.UUIDMapping;
|
import com.plotsquared.core.uuid.UUIDMapping;
|
||||||
import com.sk89q.worldedit.world.entity.EntityType;
|
import com.sk89q.worldedit.world.entity.EntityType;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
@ -71,7 +70,7 @@ public class Debug extends SubCommand {
|
|||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
TagResolver.resolver(
|
TagResolver.resolver(
|
||||||
"value",
|
"value",
|
||||||
Tag.inserting(Component.text("/plot debug <loadedchunks | player | debug-players | entitytypes | msg>"))
|
Tag.inserting(Component.text("/plot debug <player | debug-players | entitytypes | msg>"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -85,16 +84,6 @@ public class Debug extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (args.length > 0 && "loadedchunks".equalsIgnoreCase(args[0])) {
|
|
||||||
final long start = System.currentTimeMillis();
|
|
||||||
player.sendMessage(TranslatableCaption.of("debug.fetching_loaded_chunks"));
|
|
||||||
TaskManager.runTaskAsync(() -> player.sendMessage(StaticCaption
|
|
||||||
.of("Loaded chunks: " + this.worldUtil
|
|
||||||
.getChunkChunks(player.getLocation().getWorldName())
|
|
||||||
.size() + " (" + (System.currentTimeMillis()
|
|
||||||
- start) + "ms) using thread: " + Thread.currentThread().getName())));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length > 0 && "uuids".equalsIgnoreCase(args[0])) {
|
if (args.length > 0 && "uuids".equalsIgnoreCase(args[0])) {
|
||||||
final Collection<UUIDMapping> mappings = PlotSquared.get().getImpromptuUUIDPipeline().getAllImmediately();
|
final Collection<UUIDMapping> mappings = PlotSquared.get().getImpromptuUUIDPipeline().getAllImmediately();
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
@ -196,7 +185,7 @@ public class Debug extends SubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Command> tab(final PlotPlayer<?> player, String[] args, boolean space) {
|
public Collection<Command> tab(final PlotPlayer<?> player, String[] args, boolean space) {
|
||||||
return Stream.of("loadedchunks", "debug-players", "entitytypes")
|
return Stream.of("debug-players", "entitytypes")
|
||||||
.filter(value -> value.startsWith(args[0].toLowerCase(Locale.ENGLISH)))
|
.filter(value -> value.startsWith(args[0].toLowerCase(Locale.ENGLISH)))
|
||||||
.map(value -> new Command(null, false, value, "plots.admin", RequiredType.NONE, null) {
|
.map(value -> new Command(null, false, value, "plots.admin", RequiredType.NONE, null) {
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
@ -882,7 +882,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
|
|||||||
final Component titleComponent = MiniMessage.miniMessage().deserialize(title.getComponent(this), replacements);
|
final Component titleComponent = MiniMessage.miniMessage().deserialize(title.getComponent(this), replacements);
|
||||||
final Component subtitleComponent =
|
final Component subtitleComponent =
|
||||||
MiniMessage.miniMessage().deserialize(subtitle.getComponent(this), replacements);
|
MiniMessage.miniMessage().deserialize(subtitle.getComponent(this), replacements);
|
||||||
final Title.Times times = Title.Times.of(
|
final Title.Times times = Title.Times.times(
|
||||||
Duration.of(Settings.Titles.TITLES_FADE_IN * 50L, ChronoUnit.MILLIS),
|
Duration.of(Settings.Titles.TITLES_FADE_IN * 50L, ChronoUnit.MILLIS),
|
||||||
Duration.of(Settings.Titles.TITLES_STAY * 50L, ChronoUnit.MILLIS),
|
Duration.of(Settings.Titles.TITLES_STAY * 50L, ChronoUnit.MILLIS),
|
||||||
Duration.of(Settings.Titles.TITLES_FADE_OUT * 50L, ChronoUnit.MILLIS)
|
Duration.of(Settings.Titles.TITLES_FADE_OUT * 50L, ChronoUnit.MILLIS)
|
||||||
@ -960,7 +960,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
|
|||||||
* @param caption Caption to send
|
* @param caption Caption to send
|
||||||
* @param asyncReplacement Async variable replacement
|
* @param asyncReplacement Async variable replacement
|
||||||
* @return A Future to be resolved, after the message was sent
|
* @return A Future to be resolved, after the message was sent
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
public final CompletableFuture<Void> sendMessage(
|
public final CompletableFuture<Void> sendMessage(
|
||||||
@NonNull Caption caption,
|
@NonNull Caption caption,
|
||||||
@ -976,7 +976,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
|
|||||||
* @param asyncReplacements Async variable replacements
|
* @param asyncReplacements Async variable replacements
|
||||||
* @param replacements Sync variable replacements
|
* @param replacements Sync variable replacements
|
||||||
* @return A Future to be resolved, after the message was sent
|
* @return A Future to be resolved, after the message was sent
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
public final CompletableFuture<Void> sendMessage(
|
public final CompletableFuture<Void> sendMessage(
|
||||||
@NonNull Caption caption,
|
@NonNull Caption caption,
|
||||||
|
@ -174,7 +174,7 @@ public abstract class PlayerManager<P extends PlotPlayer<? extends T>, T> {
|
|||||||
* @since 6.4.0
|
* @since 6.4.0
|
||||||
* @deprecated Don't unnecessarily block threads and utilize playerMap - see {@link #getUsernameCaption(UUID)}
|
* @deprecated Don't unnecessarily block threads and utilize playerMap - see {@link #getUsernameCaption(UUID)}
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "TODO")
|
@Deprecated(since = "7.1.0")
|
||||||
public static @NonNull Caption resolveName(final @Nullable UUID owner) {
|
public static @NonNull Caption resolveName(final @Nullable UUID owner) {
|
||||||
return resolveName(owner, true);
|
return resolveName(owner, true);
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ public abstract class PlayerManager<P extends PlotPlayer<? extends T>, T> {
|
|||||||
* @since 6.4.0
|
* @since 6.4.0
|
||||||
* @deprecated Don't unnecessarily block threads and utilize playerMap - see {@link #getUsernameCaption(UUID)}
|
* @deprecated Don't unnecessarily block threads and utilize playerMap - see {@link #getUsernameCaption(UUID)}
|
||||||
*/
|
*/
|
||||||
@Deprecated(since = "TODO")
|
@Deprecated(since = "7.1.0")
|
||||||
public static @NonNull Caption resolveName(final @Nullable UUID owner, final boolean blocking) {
|
public static @NonNull Caption resolveName(final @Nullable UUID owner, final boolean blocking) {
|
||||||
if (owner == null) {
|
if (owner == null) {
|
||||||
return TranslatableCaption.of("info.none");
|
return TranslatableCaption.of("info.none");
|
||||||
@ -237,7 +237,7 @@ public abstract class PlayerManager<P extends PlotPlayer<? extends T>, T> {
|
|||||||
*
|
*
|
||||||
* @param uuid The UUID of the player (for example provided by {@link Plot#getOwner()}
|
* @param uuid The UUID of the player (for example provided by {@link Plot#getOwner()}
|
||||||
* @return A CompletableFuture resolving to a Caption representing the players name of the uuid
|
* @return A CompletableFuture resolving to a Caption representing the players name of the uuid
|
||||||
* @since TODO
|
* @since 7.1.0
|
||||||
*/
|
*/
|
||||||
@Contract("_->!null")
|
@Contract("_->!null")
|
||||||
public @NonNull CompletableFuture<Caption> getUsernameCaption(@Nullable UUID uuid) {
|
public @NonNull CompletableFuture<Caption> getUsernameCaption(@Nullable UUID uuid) {
|
||||||
|
@ -22,7 +22,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.intellectualsites.plotsquared"
|
group = "com.intellectualsites.plotsquared"
|
||||||
version = "7.0.1-SNAPSHOT"
|
version = "7.1.1-SNAPSHOT"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
@ -226,20 +226,25 @@ tasks.getByName<Jar>("jar") {
|
|||||||
|
|
||||||
val supportedVersions = listOf("1.16.5", "1.17.1", "1.18.2", "1.19.4", "1.20.1", "1.20.2")
|
val supportedVersions = listOf("1.16.5", "1.17.1", "1.18.2", "1.19.4", "1.20.1", "1.20.2")
|
||||||
tasks {
|
tasks {
|
||||||
|
register("cacheLatestFaweArtifact") {
|
||||||
val lastSuccessfulBuildUrl = uri("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/api/json").toURL()
|
val lastSuccessfulBuildUrl = uri("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/api/json").toURL()
|
||||||
val artifact = ((JsonSlurper().parse(lastSuccessfulBuildUrl) as Map<*, *>)["artifacts"] as List<*>)
|
val artifact = ((JsonSlurper().parse(lastSuccessfulBuildUrl) as Map<*, *>)["artifacts"] as List<*>)
|
||||||
.map { it as Map<*, *> }
|
.map { it as Map<*, *> }
|
||||||
.map { it["fileName"] as String }
|
.map { it["fileName"] as String }
|
||||||
.first { it.contains("Bukkit") }
|
.first { it -> it.contains("Bukkit") }
|
||||||
|
project.ext["faweArtifact"] = artifact
|
||||||
|
}
|
||||||
|
|
||||||
supportedVersions.forEach {
|
supportedVersions.forEach {
|
||||||
register<RunServer>("runServer-$it") {
|
register<RunServer>("runServer-$it") {
|
||||||
|
dependsOn(getByName("cacheLatestFaweArtifact"))
|
||||||
minecraftVersion(it)
|
minecraftVersion(it)
|
||||||
pluginJars(*project(":plotsquared-bukkit").getTasksByName("shadowJar", false).map { (it as Jar).archiveFile }
|
pluginJars(*project(":plotsquared-bukkit").getTasksByName("shadowJar", false)
|
||||||
|
.map { task -> (task as Jar).archiveFile }
|
||||||
.toTypedArray())
|
.toTypedArray())
|
||||||
jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true")
|
jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true")
|
||||||
downloadPlugins {
|
downloadPlugins {
|
||||||
url("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/artifact/artifacts/$artifact")
|
url("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/artifact/artifacts/${project.ext["faweArtifact"]}")
|
||||||
}
|
}
|
||||||
group = "run paper"
|
group = "run paper"
|
||||||
runDirectory.set(file("run-$it"))
|
runDirectory.set(file("run-$it"))
|
||||||
|
Reference in New Issue
Block a user