docs: Cleanup, grammar fixes, javadoc tweaks

This commit is contained in:
William committed 2023-05-11 16:46:35 +01:00
1 parent 679400c616
commit 1b6b8bb666
11 files changed
+14 -17

No files matched your search

@@ -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
@@ -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);
@@ -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 <T> The type of event to fire
* @return Whether the event was cancelled
* @return Whether the event was canceled
*/
<T extends Event> boolean fireIsCancelled(@NotNull T event);
@@ -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) {
@@ -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()
@@ -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,
/**
@@ -27,7 +27,7 @@ import java.util.function.Supplier;
public interface TaskRunner {
int runAsync(@NotNull Runnable runnable);
void runAsync(@NotNull Runnable runnable);
<T> CompletableFuture<T> supplyAsync(@NotNull Supplier<T> supplier);
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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.
@@ -30,10 +30,9 @@ public interface FabricTaskRunner extends TaskRunner {
ConcurrentHashMap<Integer, CompletableFuture<?>> 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
@@ -34,7 +34,7 @@ public interface SpongeTaskRunner extends TaskRunner {
Map<Integer, CancellableRunnable> 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 {