1
mirror of https://github.com/CarmJos/MoeTeleport.git synced 2024-09-19 21:35:56 +00:00

完善指令帮助

This commit is contained in:
Carm Jos 2021-12-16 01:57:14 +08:00
parent 66b523c73d
commit a522ece398
3 changed files with 90 additions and 2 deletions

View File

@ -20,6 +20,33 @@
详细依赖列表可见 [Dependencies](https://github.com/CarmJos/MoeTeleport/network/dependencies) 。
## 指令
> <参数> - 必须参数
>
> [参数] - 可选参数
```text
# /back
- 返回上一个传送地点
# /tpa <玩家>
- 请求传送到一个玩家身边。
# /tpahere <玩家>
- 请求一个玩家传送到自己身边。
# /tpaccept [玩家]
- 同意一个请求,可以限定某个玩家。
# /tpadeny [玩家]
- 拒绝一个请求,可以限定某个玩家。
# /home [id]
- 返回家 (不填ID会返回第一个家)
# /sethome [id]
- 设置家 (不填ID默认为home)
# /delhome <ID>
- 删除家
```
## 配置
### 插件配置文件 ([config.yml](src/main/resources/config.yml))
@ -36,7 +63,7 @@ permissions:
# 传送请求过期时间
expireTime: 30
~~~~
messages: ... # 见源文件
```
@ -46,7 +73,7 @@ messages: ... # 见源文件
# 玩家的家位置记录
# 格式为 world;x;y;z;yaw;pitch
homes:
- "world;112.21;45;21.241245552;92.5512;-11"
"name": "world;112.21;45;21.241245552;92.5512;-11"
```

View File

@ -0,0 +1,4 @@
package cc.carm.plugin.moeteleport.command;
public class BackCommand {
}

View File

@ -0,0 +1,57 @@
package cc.carm.plugin.moeteleport.command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public class HomeCommands {
public static class TeleportCommand implements CommandExecutor, TabCompleter {
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return false;
}
@Nullable
@Override
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
return null;
}
}
public static class ListCommand implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return false;
}
}
public static class DelCommand implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return false;
}
}
public static class AddHomeCommand implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
return false;
}
}
}