diff --git a/.documentation/JAVADOC-README.md b/.documentation/JAVADOC-README.md new file mode 100644 index 0000000..3622556 --- /dev/null +++ b/.documentation/JAVADOC-README.md @@ -0,0 +1,9 @@ +# UserPrefix Javadoc + +基于 [Github Pages](https://pages.github.com/) 搭建,请访问 [JavaDoc](https://carmjos.github.io/UserPrefix) 。 + +## 如何实现? + +若您也想通过 [Github Actions](https://docs.github.com/en/actions/learn-github-actions) +自动部署项目的Javadoc到 [Github Pages](https://pages.github.com/) , +可以参考我的文章 [《自动部署Javadoc到Github Pages》](https://pages.carm.cc/doc/javadoc-in-github.html) 。 \ No newline at end of file diff --git a/.documentation/README.md b/.documentation/README.md new file mode 100644 index 0000000..087f0d0 --- /dev/null +++ b/.documentation/README.md @@ -0,0 +1,73 @@ +```text + _ _ _____ __ _ +| | | | | __ \ / _|(_) +| | | | ___ ___ _ __ | |__) |_ __ ___ | |_ _ __ __ +| | | |/ __| / _ \| '__|| ___/| '__|/ _ \| _|| |\ \/ / +| |__| |\__ \| __/| | | | | | | __/| | | | > < + \____/ |___/ \___||_| |_| |_| \___||_| |_|/_/\_\ +``` + +# UserPrefix 帮助介绍文档 + +## 插件介绍目录 + +- 使用示例 + - [前缀配置文件预设示例](../src/main/resources/prefixes/example-prefix.yml) + +## [开发文档](JAVADOC-README.md) + +基于 [Github Pages](https://pages.github.com/) 搭建,请访问 [JavaDoc](https://carmjos.github.io/UltraDepository) 。 + +## 依赖方式 + +### Maven 依赖 + +```xml + + + + + + + UserPrefix + GitHub Packages + https://maven.pkg.github.com/CarmJos/UserPrefix + + + + + carm-repo + Carm's Repo + https://repo.carm.cc/repository/maven-public/ + + + + + + + + cc.carm.plugin + userprefix + [LATEST RELEASE] + provided + + + + +``` + +### Gradle 依赖 + +```groovy +repositories { + // 采用github依赖库,安全稳定,但需要配置 (推荐) + maven { url 'https://maven.pkg.github.com/CarmJos/UserPrefix' } + + // 采用我的私人依赖库,简单方便,但可能因为变故而无法使用 + maven { url 'https://repo.carm.cc/repository/maven-public/' } +} + +dependencies { + compileOnly "cc.carm.plugin:userprefix:[LATEST RELEASE]" +} +``` \ No newline at end of file diff --git a/img/README.md b/.documentation/images/README.md similarity index 100% rename from img/README.md rename to .documentation/images/README.md diff --git a/img/banner.png b/.documentation/images/banner.png similarity index 100% rename from img/banner.png rename to .documentation/images/banner.png diff --git a/img/logo 96x96.png b/.documentation/images/logo 96x96.png similarity index 100% rename from img/logo 96x96.png rename to .documentation/images/logo 96x96.png diff --git a/img/logo.png b/.documentation/images/logo.png similarity index 100% rename from img/logo.png rename to .documentation/images/logo.png diff --git a/img/team-logo.png b/.documentation/images/team-logo.png similarity index 100% rename from img/team-logo.png rename to .documentation/images/team-logo.png diff --git a/img/using-example.png b/.documentation/images/using-example.png similarity index 100% rename from img/using-example.png rename to .documentation/images/using-example.png diff --git a/topic/mcbbs.source b/.documentation/topic-sources/mcbbs.source similarity index 100% rename from topic/mcbbs.source rename to .documentation/topic-sources/mcbbs.source diff --git a/topic/spigot.source b/.documentation/topic-sources/spigot.source similarity index 100% rename from topic/spigot.source rename to .documentation/topic-sources/spigot.source diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index c7acfe3..77a9518 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -31,19 +31,8 @@ jobs: rm -rf docs mkdir -vp docs cp -vrf target/apidocs/* docs/ - cp -vrf JAVADOC-README.md docs/README.md - -# - name: Tidy up -# id: tidy -# uses: cicirello/javadoc-cleanup@v1 -# with: -# base-url-path: https://carmjos.github.io/userprefix -# path-to-root: docs -# -# - name: Log output -# run: | -# echo "modified-count = ${{ steps.tidy.outputs.modified-count }}" - + cp -vrf .documentation/JAVADOC-README.md docs/README.md + - name: Generate the sitemap id: sitemap uses: cicirello/generate-sitemap@v1 diff --git a/JAVADOC-README.md b/JAVADOC-README.md deleted file mode 100644 index b3c5eb5..0000000 --- a/JAVADOC-README.md +++ /dev/null @@ -1,3 +0,0 @@ -# UserPrefix Javadoc - -请访问 [JavaDoc](https://carmjos.github.io/UserPrefix) 。 \ No newline at end of file diff --git a/README-en.md b/README-en.md index 81210ae..65be42a 100644 --- a/README-en.md +++ b/README-en.md @@ -1,4 +1,4 @@ -![BANNER](https://raw.githubusercontent.com/CarmJos/UserPrefix/master/img/banner.png) +![BANNER](.documentation/images/banner.png) # UserPrefix Plugin @@ -22,7 +22,7 @@ development. ## Examples -![example](https://raw.githubusercontent.com/CarmJos/UserPrefix/master/img/using-example.png) +![example](.documentation/images/using-example.png) ## Dependencies @@ -325,7 +325,7 @@ itemNoPermission: ## Support and Donation This project is support by the [YourCraft(你的世界)](https://www.ycraft.cn) . -![TeamLogo](https://raw.githubusercontent.com/CarmJos/UserPrefix/master/img/team-logo.png) +![TeamLogo](.documentation/images/team-logo.png) ## Open source agreement diff --git a/README.md b/README.md index 46a363f..b7d9c8e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![BANNER](https://raw.githubusercontent.com/CarmJos/UserPrefix/master/img/banner.png) +![BANNER](.documentation/images/banner.png) # 用户前缀系统插件 @@ -19,7 +19,7 @@ The **English version** of the introduction is [here](https://github.com/CarmJos ## 示例 -![example](https://raw.githubusercontent.com/CarmJos/UserPrefix/master/img/using-example.png) +![example](.documentation/images/using-example.png) ## 依赖 @@ -33,19 +33,25 @@ The **English version** of the introduction is [here](https://github.com/CarmJos - 理论上全版本支持! - 游戏内重载配置文件并实时更新到玩家! -- 当玩家权限变更时会实时监测前缀,若权限不足则自动更换前缀并提示![✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/listener/processor/UserNodeUpdateProcessor.java) +- +当玩家权限变更时会实时监测前缀,若权限不足则自动更换前缀并提示![✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/listener/processor/UserNodeUpdateProcessor.java) - 可配置的声音、消息! - 前缀图标可配置“选中”、“有权限”与“无权限”三种状态的物品 - 物品的配置通过ItemStack原生配置,支持MC所有的设定! - 具体的设定请参考其他文档哦~ - TabList自动按照前缀的权重排序 (如有冲突可关掉) -- 玩家头顶前缀显示 (如有冲突可关掉) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/nametag/UserNameTag.java) -- 简单的聊天变量修改功能!(不推荐使用) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/listener/ChatListener.java) -- 自动排序,且可翻页的GUI![✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/ui/PrefixSelectGUI.java) -- 支持PlaceholderAPI变量!(凡支持的都可以使用,如BungeeTabListPlus) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/hooker/UserPrefixExpansion.java) -- 支持[Hex颜色](https://www.hexcolortool.com/)!(1.16以上版本) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/util/ColorParser.java) - - 格式: `&(#颜色代码)` - - 示例: LightSlateBlue `&(#8470FF)` 、 DarkSlateBlue `&(#483D8B)` +- 玩家头顶前缀显示 ( + 如有冲突可关掉) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/nametag/UserNameTag.java) +- 简单的聊天变量修改功能!( + 不推荐使用) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/listener/ChatListener.java) +- +自动排序,且可翻页的GUI![✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/ui/PrefixSelectGUI.java) +- 支持PlaceholderAPI变量!( + 凡支持的都可以使用,如BungeeTabListPlus) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/hooker/UserPrefixExpansion.java) +- +支持[Hex颜色](https://www.hexcolortool.com/)!(1.16以上版本) [✈](https://github.com/CarmJos/UserPrefix/blob/master/src/main/java/cc/carm/plugin/userprefix/util/ColorParser.java) + - 格式: `&(#颜色代码)` + - 示例: LightSlateBlue `&(#8470FF)` 、 DarkSlateBlue `&(#483D8B)` ## 注意事项 @@ -318,7 +324,7 @@ itemNoPermission: ## 支持与捐赠 本项目由 [YourCraft(你的世界)](https://www.ycraft.cn) 团队提供长期支持与维护。 -![TeamLogo](https://raw.githubusercontent.com/CarmJos/UserPrefix/master/img/team-logo.png) +![TeamLogo](.documentation/images/team-logo.png) 若您觉得本插件做的不错,您可以捐赠支持我! diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c1f328e..68d3fb6 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -37,20 +37,20 @@ GUI: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§f下一页" + display-name: "&f下一页" lore: - "" - - "§f右键可前往最后一页哦~" + - "&f右键可前往最后一页哦~" previous-page: # 上一页物品,如果没有上一页则不显示 ==: org.bukkit.inventory.ItemStack type: ARROW meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§f上一页" + display-name: "&f上一页" lore: - "" - - "§f右键可前往第一页哦~" + - "&f右键可前往第一页哦~" Sounds: #相关的声音,注释掉则不播放声音 格式为 【声音名:音量:音调】 或 【声音名:音量】 或 【声音名】 openGUI: "BLOCK_NOTE_BLOCK_PLING:1:1" @@ -69,17 +69,17 @@ defaultPrefix: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§f默认玩家前缀 §f(点击切换)" + display-name: "&f默认玩家前缀 &f(点击切换)" lore: - "" - - "§a➥ 点击切换到该前缀" + - "&a➥ 点击切换到该前缀" itemUsing: ==: org.bukkit.inventory.ItemStack type: NAME_TAG meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§f默认玩家前缀" + display-name: "&f默认玩家前缀" lore: - "" - - "§a✔ 您正在使用该前缀" \ No newline at end of file + - "&a✔ 您正在使用该前缀" \ No newline at end of file diff --git a/src/main/resources/en_US/example-prefix.yml b/src/main/resources/en_US/example-prefix.yml index 9d53981..df18ae7 100644 --- a/src/main/resources/en_US/example-prefix.yml +++ b/src/main/resources/en_US/example-prefix.yml @@ -9,7 +9,7 @@ name: "&b&lPro&b" # Content [Necessary] # Use in Placeholders -content: "§b§lPro §b" +content: "&b&lPro &b" # Weight [Necessary] # used for sorting in the GUI and TabList @@ -31,10 +31,10 @@ itemHasPermission: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§b§lVIP Prefix" + display-name: "&b&lVIP Prefix" lore: - "" - - "§a➥ Click to use" + - "&a➥ Click to use" # itemUsing [Unnecessary] # This Item will be displayed when the prefix is selected. @@ -45,12 +45,12 @@ itemUsing: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§b§lVIP Prefix" + display-name: "&b&lVIP Prefix" enchants: PROTECTION_ENVIRONMENTAL: 1 #Add an enchantment so it looks like it’s selected lore: - "" - - "§a✔ Selected" + - "&a✔ Selected" # itemNoPermission [Unnecessary] # If player doesn't have the permission,this item will be displayed. @@ -62,7 +62,7 @@ itemNoPermission: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§b§lVIP §c(Buy it!)" + display-name: "&b&lVIP &c(Buy it!)" lore: - "" - - "§e✯ Buy the VIP to use it!" + - "&e✯ Buy the VIP to use it!" diff --git a/src/main/resources/prefixes/example-prefix.yml b/src/main/resources/prefixes/example-prefix.yml index 8e851d9..22b25c2 100644 --- a/src/main/resources/prefixes/example-prefix.yml +++ b/src/main/resources/prefixes/example-prefix.yml @@ -9,7 +9,7 @@ name: "&b&lPro&b" # 内容 [必须] # 显示在名字前面的内容 -content: "§b§lPro §b" +content: "&b&lPro &b" # 权重 [必须] # 用于GUI、TabList的排序和自动前缀显示 @@ -30,14 +30,14 @@ itemHasPermission: # meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§b§lPro §b会员前缀" + display-name: "&b&lPro &b会员前缀" lore: - - "§7Pro会员专属称号" + - "&7Pro会员专属称号" - "" - - "§f尊贵的Pro会员专属称号。" - - "§f您将获得多种特权与更好的游戏体验。" + - "&f尊贵的Pro会员专属称号。" + - "&f您将获得多种特权与更好的游戏体验。" - "" - - "§a➥ 点击切换到该前缀" + - "&a➥ 点击切换到该前缀" # 正在使用时显示的物品 [非必需] # 当用户正在使用时会显示这个物品,不配置即自动加载“itemHasPermission” @@ -47,16 +47,16 @@ itemUsing: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§b§lPro §b会员前缀" + display-name: "&b&lPro &b会员前缀" enchants: PROTECTION_ENVIRONMENTAL: 1 #加一个附魔这样看上去就像是选中了的 lore: - - "§7Pro会员专属称号" + - "&7Pro会员专属称号" - "" - - "§f尊贵的Pro会员专属称号。" - - "§f您将获得多种特权与更好的游戏体验。" + - "&f尊贵的Pro会员专属称号。" + - "&f您将获得多种特权与更好的游戏体验。" - "" - - "§a✔ 您正在使用该前缀" + - "&a✔ 您正在使用该前缀" # 没有权限时显示的物品 [非必需] # 如果没有权限就会显示这个item。如果不配置该物品,则玩家没有使用权限时不会显示在GUI里面。 @@ -67,12 +67,12 @@ itemNoPermission: meta: ==: ItemMeta meta-type: UNSPECIFIC - display-name: "§b§lPro+ §b会员前缀 §c(未拥有)" + display-name: "&b&lPro+ &b会员前缀 &c(未拥有)" lore: - - "§7Pro+会员专属称号" + - "&7Pro+会员专属称号" - "" - - "§f尊贵的Pro会员专属称号。" - - "§f您将获得多种特权与更好的游戏体验。" - - "§f您可以输入 §b/vip §f指令查看详细特权!" + - "&f尊贵的Pro会员专属称号。" + - "&f您将获得多种特权与更好的游戏体验。" + - "&f您可以输入 &b/vip &f指令查看详细特权!" - "" - - "§e✯ 加入Pro+会员以使用该前缀!" \ No newline at end of file + - "&e✯ 加入Pro+会员以使用该前缀!" \ No newline at end of file