Message and setting loading

This commit is contained in:
William committed 2022-05-20 19:48:32 +01:00
1 parent 704e4b12f8
commit 10e3345b38
16 files changed
+821 -25

No files matched your search

@@ -1,7 +1,8 @@
package net.william278.huskhomes.player;
import de.themoep.minedown.MineDown;
import net.william278.huskhomes.position.Position;
import net.william278.huskhomes.teleport.TeleportResult;
import org.jetbrains.annotations.NotNull;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@@ -38,9 +39,14 @@ public interface Player {
* @param node The permission node string
* @return {@code true} if the player has the node; {@code false} otherwise
*/
boolean hasPermission(String node);
boolean hasPermission(@NotNull String node);
void sendMessage();
/**
* Dispatch a MineDown-formatted message to this player
*
* @param mineDown the parsed {@link MineDown} to send
*/
void sendMessage(@NotNull MineDown mineDown);
/**
* Returns the maximum number of homes this player can set
@@ -56,12 +62,4 @@ public interface Player {
*/
CompletableFuture<Integer> getFreeHomes();
/**
* Teleport the player to a specified {@link Position}
*
* @param position the target {@link Position} to teleport to
* @return A {@link CompletableFuture} callback returning the {@link TeleportResult} of completing the teleport
*/
CompletableFuture<TeleportResult> teleport(Position position);
}