mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
docs: Cleanup, grammar fixes, javadoc tweaks
This commit is contained in:
11 files changed
+14
-17
No files matched your search
@@ -32,10 +32,9 @@ import java.util.function.Supplier;
|
|||||||
public interface BukkitTaskRunner extends TaskRunner {
|
public interface BukkitTaskRunner extends TaskRunner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default int runAsync(@NotNull Runnable runnable) {
|
default void runAsync(@NotNull Runnable runnable) {
|
||||||
final int taskId = getTasks().size();
|
final int taskId = getTasks().size();
|
||||||
getTasks().put(taskId, getScheduler().asyncScheduler().run(runnable));
|
getTasks().put(taskId, getScheduler().asyncScheduler().run(runnable));
|
||||||
return taskId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ package net.william278.huskhomes.event;
|
|||||||
public interface Cancellable extends 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);
|
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 event The event to fire
|
||||||
* @param <T> The type of 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);
|
<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
|
* 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
|
* @param recipient the {@link User} recipient of the request
|
||||||
*/
|
*/
|
||||||
public void removeTeleportRequest(@NotNull String requesterName, @NotNull User recipient) {
|
public void removeTeleportRequest(@NotNull String requesterName, @NotNull User recipient) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public abstract class Broker {
|
|||||||
.toTeleport()
|
.toTeleport()
|
||||||
.execute();
|
.execute();
|
||||||
} catch (TeleportationException e) {
|
} catch (TeleportationException e) {
|
||||||
e.displayMessage(plugin.getConsole(), plugin, new String[]{});
|
e.displayMessage(plugin.getConsole(), plugin);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
case TELEPORT_TO_NETWORKED_POSITION -> Message.builder()
|
case TELEPORT_TO_NETWORKED_POSITION -> Message.builder()
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class TeleportRequest {
|
|||||||
*/
|
*/
|
||||||
ACCEPTED,
|
ACCEPTED,
|
||||||
/**
|
/**
|
||||||
* The teleport request has been declined by the recipient
|
* The recipient has declined the teleport request
|
||||||
*/
|
*/
|
||||||
DECLINED,
|
DECLINED,
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import java.util.function.Supplier;
|
|||||||
|
|
||||||
public interface TaskRunner {
|
public interface TaskRunner {
|
||||||
|
|
||||||
int runAsync(@NotNull Runnable runnable);
|
void runAsync(@NotNull Runnable runnable);
|
||||||
|
|
||||||
<T> CompletableFuture<T> supplyAsync(@NotNull Supplier<T> supplier);
|
<T> CompletableFuture<T> supplyAsync(@NotNull Supplier<T> supplier);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ HuskHomes supports having homes and warps be displayed as markers on server web
|
|||||||
* [BlueMap](https://github.com/BlueMap-Minecraft/BlueMap)
|
* [BlueMap](https://github.com/BlueMap-Minecraft/BlueMap)
|
||||||
* [Pl3xMap](https://github.com/BillyGalbreath/Pl3xMap) (Paper 1.19.4+ servers only)
|
* [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
|
||||||

|

|
||||||
|
|||||||
@@ -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 **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.
|
* 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<>();
|
ConcurrentHashMap<Integer, CompletableFuture<?>> tasks = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default int runAsync(@NotNull Runnable runnable) {
|
default void runAsync(@NotNull Runnable runnable) {
|
||||||
int taskId = tasks.size();
|
int taskId = tasks.size();
|
||||||
tasks.put(taskId, CompletableFuture.runAsync(runnable, getPlugin().getMinecraftServer()));
|
tasks.put(taskId, CompletableFuture.runAsync(runnable, getPlugin().getMinecraftServer()));
|
||||||
return taskId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public interface SpongeTaskRunner extends TaskRunner {
|
|||||||
Map<Integer, CancellableRunnable> tasks = new HashMap<>();
|
Map<Integer, CancellableRunnable> tasks = new HashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default int runAsync(@NotNull Runnable runnable) {
|
default void runAsync(@NotNull Runnable runnable) {
|
||||||
final CancellableRunnable task = wrap(runnable);
|
final CancellableRunnable task = wrap(runnable);
|
||||||
final int taskId = tasks.size();
|
final int taskId = tasks.size();
|
||||||
tasks.put(taskId, task);
|
tasks.put(taskId, task);
|
||||||
@@ -45,7 +45,6 @@ public interface SpongeTaskRunner extends TaskRunner {
|
|||||||
.execute(task)
|
.execute(task)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
return taskId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -119,7 +118,7 @@ public interface SpongeTaskRunner extends TaskRunner {
|
|||||||
SpongeHuskHomes getPlugin();
|
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 {
|
class CancellableRunnable implements Runnable {
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user