feat: 完整实现 TPA 并添加多版本适配
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package cn.infstar.essentialsC.commands;
|
||||
|
||||
import cn.infstar.essentialsC.teleport.TeleportRequestManager;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public final class TpIgnoreCommand extends BaseCommand {
|
||||
|
||||
public TpIgnoreCommand() {
|
||||
super("essentialsc.command.tpignore");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean execute(Player player, String[] args) {
|
||||
TeleportRequestManager manager = plugin.getTeleportRequestManager();
|
||||
if (manager == null) {
|
||||
player.sendMessage(getLang().getPrefixedString("messages.module-disabled"));
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean ignoring = manager.toggleIgnoringRequests(player);
|
||||
player.sendMessage(getLang().getPrefixedString(ignoring
|
||||
? "tpa.messages.ignore-enabled"
|
||||
: "tpa.messages.ignore-disabled"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user