diff --git a/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java b/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java index dd8ae896..b9d6d5b5 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java +++ b/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java @@ -32,10 +32,9 @@ import java.util.function.Supplier; public interface BukkitTaskRunner extends TaskRunner { @Override - default int runAsync(@NotNull Runnable runnable) { + default void runAsync(@NotNull Runnable runnable) { final int taskId = getTasks().size(); getTasks().put(taskId, getScheduler().asyncScheduler().run(runnable)); - return taskId; } @Override diff --git a/common/src/main/java/net/william278/huskhomes/event/Cancellable.java b/common/src/main/java/net/william278/huskhomes/event/Cancellable.java index 0ebe0eeb..59a279d0 100644 --- a/common/src/main/java/net/william278/huskhomes/event/Cancellable.java +++ b/common/src/main/java/net/william278/huskhomes/event/Cancellable.java @@ -25,9 +25,9 @@ package net.william278.huskhomes.event; public interface Cancellable extends Event { /** - * Set whether the event should be cancelled + * Set whether the event should be canceled * - * @param cancelled {@code true} if the event should be cancelled + * @param cancelled {@code true} if the event should be canceled */ void setCancelled(boolean cancelled); diff --git a/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java b/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java index 20a643a0..d437edb8 100644 --- a/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java +++ b/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java @@ -56,11 +56,11 @@ public interface EventDispatcher { } /** - * Fire an event on this thread, and return whether the event was cancelled + * Fire an event on this thread, and return whether the event was canceled * * @param event The event to fire * @param The type of event to fire - * @return Whether the event was cancelled + * @return Whether the event was canceled */ boolean fireIsCancelled(@NotNull T event); diff --git a/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java b/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java index cced6528..3f20bdf4 100644 --- a/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java +++ b/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java @@ -74,7 +74,7 @@ public class RequestsManager { /** * Remove {@link TeleportRequest}(s) sent by a requester, by name, from a recipient's queue * - * @param requesterName username of the sender of the request(s) to delete + * @param requesterName the sender's username, whose requests should be removed * @param recipient the {@link User} recipient of the request */ public void removeTeleportRequest(@NotNull String requesterName, @NotNull User recipient) { diff --git a/common/src/main/java/net/william278/huskhomes/network/Broker.java b/common/src/main/java/net/william278/huskhomes/network/Broker.java index 196782b4..5e47f2bd 100644 --- a/common/src/main/java/net/william278/huskhomes/network/Broker.java +++ b/common/src/main/java/net/william278/huskhomes/network/Broker.java @@ -63,7 +63,7 @@ public abstract class Broker { .toTeleport() .execute(); } catch (TeleportationException e) { - e.displayMessage(plugin.getConsole(), plugin, new String[]{}); + e.displayMessage(plugin.getConsole(), plugin); } }); case TELEPORT_TO_NETWORKED_POSITION -> Message.builder() diff --git a/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java b/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java index 547d53da..68f445fe 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java @@ -163,7 +163,7 @@ public class TeleportRequest { */ ACCEPTED, /** - * The teleport request has been declined by the recipient + * The recipient has declined the teleport request */ DECLINED, /** diff --git a/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java b/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java index a7db1223..fc113062 100644 --- a/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java +++ b/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java @@ -27,7 +27,7 @@ import java.util.function.Supplier; public interface TaskRunner { - int runAsync(@NotNull Runnable runnable); + void runAsync(@NotNull Runnable runnable); CompletableFuture supplyAsync(@NotNull Supplier supplier); diff --git a/docs/Map-Hooks.md b/docs/Map-Hooks.md index 10ec7a93..d4968827 100644 --- a/docs/Map-Hooks.md +++ b/docs/Map-Hooks.md @@ -3,7 +3,7 @@ HuskHomes supports having homes and warps be displayed as markers on server web * [BlueMap](https://github.com/BlueMap-Minecraft/BlueMap) * [Pl3xMap](https://github.com/BillyGalbreath/Pl3xMap) (Paper 1.19.4+ servers only) -To enable support for map hooks, edit your [`config.yml`](config-files) file under the `map_hook` section so that `enabled` is `true`. You can customise whether to show public homes, warps or both on the map. +To enable support for map hooks, edit your [`config.yml`](config-files) file under the `map_hook` section so that `enabled` is `true`. You can customize whether to show public homes, warps or both on the map. ## Dynmap ![Dynmap markers screenshot](https://raw.githubusercontent.com/WiIIiam278/HuskHomes2/master/images/dynmap-hook.png) diff --git a/docs/Strict-Tpahere.md b/docs/Strict-Tpahere.md index 51ef732f..d8ef6ec7 100644 --- a/docs/Strict-Tpahere.md +++ b/docs/Strict-Tpahere.md @@ -1,4 +1,4 @@ -HuskHomes provides an option to enforce strict `/tpahere` requests. This alters the behaviour of the `/tpahere` command. +HuskHomes provides an option to enforce strict `/tpahere` requests. This alters the behavior of the `/tpahere` command. * Strict `/tpahere` requests **disabled**: When a player accepts a `/tpahere` request, they will be teleported to the current position of the player at the end of their warmup period. * Strict `/tpahere` requests **enabled**: When a player accepts a `/tpahere` request, they will be teleported to the position of the player when they executed the `/tpahere` command. diff --git a/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java b/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java index 95f3a898..87f1d3b1 100644 --- a/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java +++ b/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java @@ -30,10 +30,9 @@ public interface FabricTaskRunner extends TaskRunner { ConcurrentHashMap> tasks = new ConcurrentHashMap<>(); @Override - default int runAsync(@NotNull Runnable runnable) { + default void runAsync(@NotNull Runnable runnable) { int taskId = tasks.size(); tasks.put(taskId, CompletableFuture.runAsync(runnable, getPlugin().getMinecraftServer())); - return taskId; } @Override diff --git a/sponge/src/main/java/net/william278/huskhomes/util/SpongeTaskRunner.java b/sponge/src/main/java/net/william278/huskhomes/util/SpongeTaskRunner.java index 373a67f6..f1e5af99 100644 --- a/sponge/src/main/java/net/william278/huskhomes/util/SpongeTaskRunner.java +++ b/sponge/src/main/java/net/william278/huskhomes/util/SpongeTaskRunner.java @@ -34,7 +34,7 @@ public interface SpongeTaskRunner extends TaskRunner { Map tasks = new HashMap<>(); @Override - default int runAsync(@NotNull Runnable runnable) { + default void runAsync(@NotNull Runnable runnable) { final CancellableRunnable task = wrap(runnable); final int taskId = tasks.size(); tasks.put(taskId, task); @@ -45,7 +45,6 @@ public interface SpongeTaskRunner extends TaskRunner { .execute(task) .build()); - return taskId; } @Override @@ -119,7 +118,7 @@ public interface SpongeTaskRunner extends TaskRunner { SpongeHuskHomes getPlugin(); /** - * A wrapper for a {@link Runnable} that can be cancelled + * A wrapper for a {@link Runnable} that can be canceled */ class CancellableRunnable implements Runnable {