From b28acbaaf919fe82122b545f590a621f3488a13a Mon Sep 17 00:00:00 2001 From: Angeschossen <24841122+Angeschossen@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:04:35 +0100 Subject: [PATCH] redis msgs --- build.gradle.kts | 2 +- .../api/player/PlayerData.java | 24 ++++--------------- ...inePlayerData.java => PlayerDataBase.java} | 18 ++++++++++---- .../api/trusted/RoleHolder.java | 4 ++-- 4 files changed, 21 insertions(+), 27 deletions(-) rename src/main/java/com/github/angeschossen/pluginframework/api/player/{OnlinePlayerData.java => PlayerDataBase.java} (54%) diff --git a/build.gradle.kts b/build.gradle.kts index 84485bd..2f2725c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -41,7 +41,7 @@ java { } group = "com.github.angeschossen" -version = "1.0.31" +version = "1.0.32" description = "PluginFrameworkAPI" java.sourceCompatibility = JavaVersion.VERSION_1_8 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 4291458..4d53160 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 @@ -1,25 +1,11 @@ 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 org.jetbrains.annotations.Nullable; -import java.util.Locale; -import java.util.UUID; +public interface PlayerData extends PlayerDataBase { + @NotNull CommandSender getCommandSender(); -public interface PlayerData { - - Object sendMessage(String msg, String[] p, String[] v); - - @NotNull - Messages getMessages(); - - UUID getUUID(); - - GUIConfiguration getGUILocale(); - - GUIConfiguration getBedrockGUILocale(); - - @NotNull Locale getLocale(); + Player getPlayer(); } diff --git a/src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java b/src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerDataBase.java similarity index 54% rename from src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java rename to src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerDataBase.java index 833a731..8a49517 100644 --- a/src/main/java/com/github/angeschossen/pluginframework/api/player/OnlinePlayerData.java +++ b/src/main/java/com/github/angeschossen/pluginframework/api/player/PlayerDataBase.java @@ -2,15 +2,23 @@ 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(); +public interface PlayerDataBase { - Player getPlayer(); + Object sendMessage(String msg, String[] p, String[] v); + + @NotNull + Messages getMessages(); + + UUID getUUID(); + + 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 026218a..b520b97 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.OnlinePlayerData; +import com.github.angeschossen.pluginframework.api.player.PlayerData; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,7 +27,7 @@ public interface RoleHolder { @NotNull String getOwnerName(); - void openMenu(@NotNull OnlinePlayerData opener); + void openMenu(@NotNull PlayerData opener); @NotNull SimpleRole getRole(@NotNull UUID uid);