From 6f995ea07c8db8287998b585bed5532a92507f08 Mon Sep 17 00:00:00 2001 From: Angeschossen <24841122+Angeschossen@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:21:50 +0100 Subject: [PATCH] redis msgs --- build.gradle.kts | 2 +- .../api/player/OnlinePlayerData.java | 16 ++++++++++++++++ .../pluginframework/api/player/PlayerData.java | 6 ------ .../pluginframework/api/trusted/RoleHolder.java | 4 ++-- 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java diff --git a/build.gradle.kts b/build.gradle.kts index 4e814f8..6ea9ce0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -41,7 +41,7 @@ java { } group = "com.github.angeschossen" -version = "1.0.26" +version = "1.0.27" description = "PluginFrameworkAPI" java.sourceCompatibility = JavaVersion.VERSION_1_8 diff --git a/src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java b/src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java new file mode 100644 index 0000000..833a731 --- /dev/null +++ b/src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java @@ -0,0 +1,16 @@ +package com.github.angeschossen.pluginframework.api.player; + +import com.github.angeschossen.pluginframework.api.configuration.gui.GUIConfiguration; +import com.github.angeschossen.pluginframework.api.configuration.messages.Messages; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + +import java.util.Locale; +import java.util.UUID; + +public interface OnlinePlayerData extends PlayerData { + @NotNull CommandSender getCommandSender(); + + Player getPlayer(); +} diff --git a/src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerData.java b/src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerData.java index 2526a41..1c24da3 100644 --- a/src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerData.java +++ b/src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerData.java @@ -2,27 +2,21 @@ import com.github.angeschossen.pluginframework.api.configuration.gui.GUIConfiguration; import com.github.angeschossen.pluginframework.api.configuration.messages.Messages; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import java.util.Locale; import java.util.UUID; public interface PlayerData { - @NotNull CommandSender getCommandSender(); @NotNull Messages getMessages(); UUID getUUID(); - Player getPlayer(); - GUIConfiguration getGUILocale(); GUIConfiguration getBedrockGUILocale(); @NotNull Locale getLocale(); - } diff --git a/src/main/java/com/github/angeschossen/pluginframework/api/trusted/RoleHolder.java b/src/main/java/com/github/angeschossen/pluginframework/api/trusted/RoleHolder.java index b520b97..026218a 100644 --- a/src/main/java/com/github/angeschossen/pluginframework/api/trusted/RoleHolder.java +++ b/src/main/java/com/github/angeschossen/pluginframework/api/trusted/RoleHolder.java @@ -1,6 +1,6 @@ package com.github.angeschossen.pluginframework.api.trusted; -import com.github.angeschossen.pluginframework.api.player.PlayerData; +import com.github.angeschossen.pluginframework.api.player.OnlinePlayerData; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,7 +27,7 @@ public interface RoleHolder { @NotNull String getOwnerName(); - void openMenu(@NotNull PlayerData opener); + void openMenu(@NotNull OnlinePlayerData opener); @NotNull SimpleRole getRole(@NotNull UUID uid);