mirror of
https://github.com/CarmJos/MoeTeleport.git
synced 2024-09-19 21:35:56 +00:00
[2.0.0] 版本更新
- [A] 添加消息点击执行功能(基于MineDown实现)。
This commit is contained in:
parent
b311820483
commit
9ee18d0f3c
@ -18,6 +18,8 @@
|
||||
## [依赖](https://github.com/CarmJos/MoeTeleport/network/dependencies)
|
||||
|
||||
- **[必须]** 插件本体基于 [Spigot-API](https://hub.spigotmc.org/stash/projects/SPIGOT) 、[BukkitAPI](http://bukkit.org/) 实现。
|
||||
- **[自带]** 消息格式基于 [MineDown](https://github.com/Phoenix616/MineDown) 实现。
|
||||
- 所有 messages.yml 均支持 MineDown 语法。
|
||||
- **[推荐]** 变量部分基于 [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) 实现。
|
||||
|
||||
详细依赖列表可见 [Dependencies](https://github.com/CarmJos/MoeTeleport/network/dependencies) 。
|
||||
@ -64,7 +66,9 @@
|
||||
|
||||
### 消息配置文件 ([messages.yml](src/main/resources/messages.yml))
|
||||
|
||||
详见源文件。
|
||||
支持 [MineDown 语法](https://wiki.phoenix616.dev/library:minedown:syntax),详见源文件。
|
||||
|
||||
|
||||
|
||||
### 玩家数据配置文件 (data/\<UUID\>.yml)
|
||||
|
||||
|
20
pom.xml
20
pom.xml
@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<artifactId>moeteleport</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<version>2.0.0</version>
|
||||
|
||||
<name>MoeTeleport</name>
|
||||
<description>喵喵传送,简单的传送、设置家的插件。</description>
|
||||
@ -71,6 +71,11 @@
|
||||
<url>https://repo1.maven.org/maven2/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>minebench-repo</id>
|
||||
<url>https://repo.minebench.de/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>github</id>
|
||||
<name>GitHub Packages</name>
|
||||
@ -103,6 +108,13 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>de.themoep</groupId>
|
||||
<artifactId>minedown</artifactId>
|
||||
<version>1.7.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
@ -176,6 +188,12 @@
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>de.themoep.minedown</pattern>
|
||||
<shadedPattern>cc.carm.plugin.moeteleport.lib.minedown</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cc.carm.plugin.moeteleport;
|
||||
|
||||
import cc.carm.plugin.moeteleport.command.BackCommand;
|
||||
import cc.carm.plugin.moeteleport.command.MoeTeleportCommand;
|
||||
import cc.carm.plugin.moeteleport.command.completer.HomeNameCompleter;
|
||||
import cc.carm.plugin.moeteleport.command.completer.PlayerNameCompleter;
|
||||
import cc.carm.plugin.moeteleport.command.completer.TpRequestCompleter;
|
||||
@ -109,6 +110,8 @@ public class Main extends JavaPlugin {
|
||||
regListener(new UserListener());
|
||||
|
||||
log("注册指令...");
|
||||
registerCommand("MoeTeleport", new MoeTeleportCommand());
|
||||
|
||||
registerCommand("back", new BackCommand());
|
||||
|
||||
registerCommand("home", new GoHomeCommand(), new HomeNameCompleter());
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cc.carm.plugin.moeteleport.util;
|
||||
|
||||
import de.themoep.minedown.MineDown;
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -17,7 +18,7 @@ public class MessageUtil {
|
||||
public static void send(@Nullable CommandSender sender, List<String> messages) {
|
||||
if (messages == null || messages.isEmpty() || sender == null) return;
|
||||
for (String s : messages) {
|
||||
sender.sendMessage(ColorParser.parse(s));
|
||||
sender.spigot().sendMessage(MineDown.parse(s));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,12 @@ not-online:
|
||||
- "&f目标玩家并不在线,无法发送请求。"
|
||||
tpa:
|
||||
- "&d%(player) &f请求传送到您身边,您有 &5%(expire)秒 &f的时间回应。"
|
||||
- "&a&l[command=/tpAccept %(player)][同意][/command] &f输入 &5/tpaccept &f同意该请求。"
|
||||
- "&c&l[command=/tpDeny %(player)][拒绝][/command] &f输入 &5/tpdeny &f拒绝该请求。"
|
||||
- "[&a&l[同意]](show_text=点击同意请求 run_command=/tpAccept %(player)) &f输入 &5/tpAccept &f同意该请求。"
|
||||
- "[&c&l[拒绝]](show_text=点击拒绝请求 run_command=/tpDeny %(player)) &f输入 &5/tpDeny &f拒绝该请求。"
|
||||
tpahere:
|
||||
- "&d%(player) &f请求传送您到Ta身边,您有 &5%(expire)秒 &f的时间回应。"
|
||||
- "&a&l[command=/tpAccept %(player)][同意][/command] &f输入 &5/tpaccept &f同意该请求。"
|
||||
- "&c&l[command=/tpDeny %(player)][拒绝][/command] &f输入 &5/tpdeny &f拒绝该请求。"
|
||||
- "[&a&l[同意]](show_text=点击同意请求 run_command=/tpAccept %(player)) &f输入 &5/tpAccept &f同意该请求。"
|
||||
- "[&c&l[拒绝]](show_text=点击拒绝请求 run_command=/tpDeny %(player)) &f输入 &5/tpDeny &f拒绝该请求。"
|
||||
tpaccept:
|
||||
- "&f您同意了 &d%(player) &f的传送请求。"
|
||||
tpdeny:
|
||||
@ -54,7 +54,7 @@ notAvailable:
|
||||
|
||||
home-list-header:
|
||||
- "&f您当前设定的所有家:"
|
||||
home-list-object: "&8# &f%(id) &d%(location) &7[command=/home %(id)]✈[/command]"
|
||||
home-list-object: "&8# &f%(id) &d%(location) [&7✈](show_text=点击返回家 %(id) run_command=/home %(id))"
|
||||
home-not-found:
|
||||
- "&f您还没有设置这个家,请先输入 &5/setHome <家名称> &f设置一个吧!"
|
||||
home-set:
|
||||
|
Loading…
Reference in New Issue
Block a user