Compare commits

..

5 Commits

Author SHA1 Message Date
f41453a412 Build PRs on JDK 17 and 21 2023-10-15 19:43:51 +02:00
b00a46b286 chore: remove poorly implemented /ps debug loadedchunks command (#4180)
- the same (but correctly implemented) functionality exists in other plugins
 - closes #4140
2023-10-10 11:06:22 +01:00
44b1127181 Back to snapshot for development 2023-10-09 17:14:17 +02:00
c7bfd48a21 Release 7.1.0 2023-10-09 17:03:09 +02:00
dc13783db8 chore: mitigate possible future sqlite driver problems (#4200)
* chore: mitigate possible future sqlite driver problems

* chore/feat: log driver version on error

---------

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-10-09 16:55:09 +02:00
6 changed files with 17 additions and 27 deletions

View File

@ -7,15 +7,16 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ] os: [ ubuntu-latest, windows-latest, macos-latest ]
jdk: [ 17, 21 ]
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Validate Gradle Wrapper - name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1 uses: gradle/wrapper-validation-action@v1
- name: Setup Java - name: Setup Java ${{ matrix.jdk }}
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
distribution: temurin distribution: temurin
java-version: 17 java-version: ${{ matrix.jdk }}
- name: Clean Build - name: Clean Build
run: ./gradlew clean build run: ./gradlew clean build

View File

@ -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();

View File

@ -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());

View File

@ -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,

View File

@ -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) {

View File

@ -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("""