From 9b6aa03ab0e6c79acf549e3e5886880afc01502d Mon Sep 17 00:00:00 2001 From: LSDog <2509863159@qq.com> Date: Tue, 21 May 2024 00:25:34 +0800 Subject: [PATCH] Update information Signed-off-by: LSDog <2509863159@qq.com> --- README.md | 32 +++++++++---------- .../CustomSprays/listener/EventListener.java | 12 +++---- .../CustomSprays/spray/SprayManager.java | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4180b36..494894d 100644 --- a/README.md +++ b/README.md @@ -7,35 +7,35 @@ ## (^∀^●)ノシ ![Visits](https://count.getloli.com/get/@CustomSprays) -*[~ 这是一个猫猫计数器 ^ↀᴥↀ^ **MoeCounter** !](https://moe-counter.glitch.me/)* ## 📢 介绍 | Introduce ___ -| *Name* | *Content* | -|:-------------------------:|--------------------------------------------------------------| -| ![logo](media/logo64.png) | CustomSprays <br> 花样喷漆 | -| 作者 <br> Author | LSDog | -| 版本 <br> Version | 1.5.12 | -| 支持 <br> Support | **1.7.10 ~ 1.20.6** (Bukkit Spigot Paper ...) | -| 指令 <br> Cmd | `/sprays ...` - 主命令 <br>`/spray` - 喷漆<br>`/spray big` - 喷大喷漆 | -| 权限 <br> Perm | 请见 "config.yml" / see "config.yml" | +| *Name* | *Content* | +|:-------------------------:|----------------------------------------------------------| +| ![logo](media/logo64.png) | CustomSprays <br> 花样喷漆 | +| 作者 <br> Author | LSDog | +| 版本 <br> Version | 1.5.12 | +| 支持 <br> Support | **1.7.10 ~ 1.20.6** (Bukkit Spigot Paper ...) | +| 指令 <br> Cmd | `/sprays` - 主命令 <br>`/spray` - 喷漆<br>`/spray big` - 喷大喷漆 | +| 权限 <br> Perm | 请见 "config.yml" / see "config.yml" | > > Links: > [Mcbbs](https://www.mcbbs.net/thread-1289391-1-1.html) > | [Spigot](https://www.spigotmc.org/resources/customsprays-upload-image-and-spray-it-on-the-wall.98979/) > | [PlanetMinecraft](https://www.planetminecraft.com/mod/customsprays-spray-your-image-like-in-source-games/) -## ⏬ **下载 | Download** → [发布页](https://github.com/LSDog/CustomSprays/releases) | [Releases](https://github.com/LSDog/CustomSprays/releases) !! +## ⏬ **下载 | Download** → [发布页 | Releases](https://github.com/LSDog/CustomSprays/releases) !! (上面Github打不开? → [Gitee发布页](https://gitee.com/pixelmc/CustomSprays/releases)) -**⭐ [喷漆音效资源包](https://github.com/LSDog/CustomSprays/blob/master/spray_sound_pack.zip?raw=true) / [Spray sound resource pack](https://github.com/LSDog/CustomSprays/blob/master/spray_sound_pack.zip?raw=true) ! ⭐** +**🎶 [喷漆音效资源包](https://github.com/LSDog/CustomSprays/blob/master/spray_sound_pack.zip?raw=true) / [Spray sound resource pack](https://github.com/LSDog/CustomSprays/blob/master/spray_sound_pack.zip?raw=true) !** -**⭐ [ItemsAdder支持](https://github.com/LSDog/CustomSprays/tree/itemsadder) ⭐** -**⭐ [oraxen支持](https://github.com/LSDog/CustomSprays/tree/oraxen) ⭐** +**⭐ [ItemsAdder 支持 | ItemsAdder Support](https://github.com/LSDog/CustomSprays/tree/itemsadder) ⭐** -**⭐ English message config is also in config.yml (commented out by #) ⭐** +**⭐ [oraxen 支持 | oraxen Support](https://github.com/LSDog/CustomSprays/tree/oraxen) ⭐** + +**💬 English message config is also in config.yml (commented out by #)** @@ -136,9 +136,9 @@ ___ ## ✍ TODO ___ -- [ ] 左键喷漆删除喷漆 (因为不想用protocol lib所以需要研究手写pack listener) +- [x] 左键喷漆删除喷漆 (因为不想用protocol lib所以需要研究手写pack listener) - [ ] 自动获取NMS中用到的混淆名称,这样就不用随版本更新手动添加case了 -- [ ] 喷漆动画 (粒子效果,颜色可以与图像颜色稍微对应) +- [x] 喷漆动画 (粒子效果;颜色可以与图像颜色稍微对应←貌似这一点做不到欸) - [ ] folia 支持 (需要更多研究) - [ ] 粒子喷漆 (用粒子效果组成图像) - [ ] gif 动图支持 (需要更多研究) diff --git a/src/fun/LSDog/CustomSprays/listener/EventListener.java b/src/fun/LSDog/CustomSprays/listener/EventListener.java index db867c5..230ce14 100644 --- a/src/fun/LSDog/CustomSprays/listener/EventListener.java +++ b/src/fun/LSDog/CustomSprays/listener/EventListener.java @@ -23,12 +23,12 @@ import java.util.List; /** - * 实现双击F喷漆 + * Listening to player's events */ public class EventListener implements Listener { /** - * 玩家加入相关逻辑 + * Player joins * @param e {@link PlayerJoinEvent} */ @EventHandler (priority = EventPriority.LOWEST) @@ -38,15 +38,15 @@ public void onJoin(PlayerJoinEvent e) { } public static void playerJoin(Player player) { - // 初始化账户 + // Initialize account Bukkit.getScheduler().runTaskLaterAsynchronously(CustomSprays.plugin, () -> { if (player.isOnline() && DataManager.data instanceof DataMySQL) { DataMySQL.addAccountIfNotExist(player); } }, 10L); - // 发送已存在的 spray + // Send existing spray SprayManager.sendExistSprays(player); - // 开始监听玩家的 Packet + // Start monitoring player's packets if (NMS.getSubVer() >= 8) PacketListener.addPlayer(player); else PacketListener7.addPlayer(player); if (CustomSprays.latestVersion != null && player.isOp()) { @@ -68,7 +68,7 @@ public void onQuit(PlayerQuitEvent e) { } /** - * 喷漆物品的使用 + * Check if using spray item * @param e {@link PlayerInteractEvent} */ @EventHandler diff --git a/src/fun/LSDog/CustomSprays/spray/SprayManager.java b/src/fun/LSDog/CustomSprays/spray/SprayManager.java index d7720e0..273e8e8 100644 --- a/src/fun/LSDog/CustomSprays/spray/SprayManager.java +++ b/src/fun/LSDog/CustomSprays/spray/SprayManager.java @@ -162,7 +162,7 @@ public static void addSpray(SprayBase spray) { } /** - * Send player existed sprays that in the player's world + * Send player existing sprays that in the player's world */ public static void sendExistSprays(Player player) {