From c052c8c79ca8b25c8955c564ed24e21846e06c8d Mon Sep 17 00:00:00 2001 From: kaboom <58372747+kaboombot@users.noreply.github.com> Date: Wed, 21 Jun 2023 20:00:54 +0300 Subject: [PATCH] Move skin-related code to player modules --- src/main/java/pw/kaboom/extras/commands/CommandSkin.java | 2 +- .../pw/kaboom/extras/modules/player/PlayerConnection.java | 2 +- .../kaboom/extras/{ => modules/player}/skin/SkinData.java | 2 +- .../extras/{ => modules/player}/skin/SkinManager.java | 6 +++--- .../{ => modules/player}/skin/response/ProfileResponse.java | 2 +- .../{ => modules/player}/skin/response/SkinResponse.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename src/main/java/pw/kaboom/extras/{ => modules/player}/skin/SkinData.java (57%) rename src/main/java/pw/kaboom/extras/{ => modules/player}/skin/SkinManager.java (96%) rename src/main/java/pw/kaboom/extras/{ => modules/player}/skin/response/ProfileResponse.java (51%) rename src/main/java/pw/kaboom/extras/{ => modules/player}/skin/response/SkinResponse.java (90%) diff --git a/src/main/java/pw/kaboom/extras/commands/CommandSkin.java b/src/main/java/pw/kaboom/extras/commands/CommandSkin.java index 09f6fd6..2afe159 100644 --- a/src/main/java/pw/kaboom/extras/commands/CommandSkin.java +++ b/src/main/java/pw/kaboom/extras/commands/CommandSkin.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import pw.kaboom.extras.skin.SkinManager; +import pw.kaboom.extras.modules.player.skin.SkinManager; import javax.annotation.Nonnull; import java.util.HashMap; diff --git a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java index 29887e6..be42ea9 100644 --- a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java +++ b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java @@ -17,7 +17,7 @@ import org.bukkit.plugin.java.JavaPlugin; import org.spigotmc.event.player.PlayerSpawnLocationEvent; import pw.kaboom.extras.Main; import pw.kaboom.extras.modules.server.ServerTabComplete; -import pw.kaboom.extras.skin.SkinManager; +import pw.kaboom.extras.modules.player.skin.SkinManager; import pw.kaboom.extras.util.Utility; import java.util.HashSet; diff --git a/src/main/java/pw/kaboom/extras/skin/SkinData.java b/src/main/java/pw/kaboom/extras/modules/player/skin/SkinData.java similarity index 57% rename from src/main/java/pw/kaboom/extras/skin/SkinData.java rename to src/main/java/pw/kaboom/extras/modules/player/skin/SkinData.java index b78fffc..17ac803 100644 --- a/src/main/java/pw/kaboom/extras/skin/SkinData.java +++ b/src/main/java/pw/kaboom/extras/modules/player/skin/SkinData.java @@ -1,4 +1,4 @@ -package pw.kaboom.extras.skin; +package pw.kaboom.extras.modules.player.skin; public record SkinData(String texture, String signature) { diff --git a/src/main/java/pw/kaboom/extras/skin/SkinManager.java b/src/main/java/pw/kaboom/extras/modules/player/skin/SkinManager.java similarity index 96% rename from src/main/java/pw/kaboom/extras/skin/SkinManager.java rename to src/main/java/pw/kaboom/extras/modules/player/skin/SkinManager.java index be76dea..51d271b 100644 --- a/src/main/java/pw/kaboom/extras/skin/SkinManager.java +++ b/src/main/java/pw/kaboom/extras/modules/player/skin/SkinManager.java @@ -1,4 +1,4 @@ -package pw.kaboom.extras.skin; +package pw.kaboom.extras.modules.player.skin; import com.google.gson.Gson; import java.net.URI; @@ -24,8 +24,8 @@ import net.kyori.adventure.text.Component; import org.bukkit.scheduler.BukkitScheduler; import pw.kaboom.extras.Main; -import pw.kaboom.extras.skin.response.ProfileResponse; -import pw.kaboom.extras.skin.response.SkinResponse; +import pw.kaboom.extras.modules.player.skin.response.ProfileResponse; +import pw.kaboom.extras.modules.player.skin.response.SkinResponse; public final class SkinManager { private static final HttpClient httpClient = HttpClient.newHttpClient(); diff --git a/src/main/java/pw/kaboom/extras/skin/response/ProfileResponse.java b/src/main/java/pw/kaboom/extras/modules/player/skin/response/ProfileResponse.java similarity index 51% rename from src/main/java/pw/kaboom/extras/skin/response/ProfileResponse.java rename to src/main/java/pw/kaboom/extras/modules/player/skin/response/ProfileResponse.java index 521103d..01addd1 100644 --- a/src/main/java/pw/kaboom/extras/skin/response/ProfileResponse.java +++ b/src/main/java/pw/kaboom/extras/modules/player/skin/response/ProfileResponse.java @@ -1,3 +1,3 @@ -package pw.kaboom.extras.skin.response; +package pw.kaboom.extras.modules.player.skin.response; public record ProfileResponse(String name, String id) {} diff --git a/src/main/java/pw/kaboom/extras/skin/response/SkinResponse.java b/src/main/java/pw/kaboom/extras/modules/player/skin/response/SkinResponse.java similarity index 90% rename from src/main/java/pw/kaboom/extras/skin/response/SkinResponse.java rename to src/main/java/pw/kaboom/extras/modules/player/skin/response/SkinResponse.java index 340b8de..81e3232 100644 --- a/src/main/java/pw/kaboom/extras/skin/response/SkinResponse.java +++ b/src/main/java/pw/kaboom/extras/modules/player/skin/response/SkinResponse.java @@ -1,4 +1,4 @@ -package pw.kaboom.extras.skin.response; +package pw.kaboom.extras.modules.player.skin.response; import com.destroystokyo.paper.profile.ProfileProperty; import java.util.List;