新增warp功能

This commit is contained in:
zhangyuheng 2024-08-08 23:52:40 +08:00
parent e50f0d035c
commit 37b773c6c3
16 changed files with 113 additions and 11 deletions

View File

@ -5,6 +5,20 @@ import cn.lunadeer.essentialsd.commands.home.DelHome;
import cn.lunadeer.essentialsd.commands.home.Home;
import cn.lunadeer.essentialsd.commands.home.Homes;
import cn.lunadeer.essentialsd.commands.home.SetHome;
import cn.lunadeer.essentialsd.commands.time.Day;
import cn.lunadeer.essentialsd.commands.time.Night;
import cn.lunadeer.essentialsd.commands.time.Noon;
import cn.lunadeer.essentialsd.commands.tp.Back;
import cn.lunadeer.essentialsd.commands.tp.Rtp;
import cn.lunadeer.essentialsd.commands.tp.Tpa;
import cn.lunadeer.essentialsd.commands.tp.TpaHere;
import cn.lunadeer.essentialsd.commands.warp.DelWarp;
import cn.lunadeer.essentialsd.commands.warp.SetWarp;
import cn.lunadeer.essentialsd.commands.warp.Warp;
import cn.lunadeer.essentialsd.commands.warp.Warps;
import cn.lunadeer.essentialsd.commands.weather.Rain;
import cn.lunadeer.essentialsd.commands.weather.Storm;
import cn.lunadeer.essentialsd.commands.weather.Sun;
import cn.lunadeer.essentialsd.events.*;
import cn.lunadeer.essentialsd.managers.ConfigManager;
import cn.lunadeer.essentialsd.managers.DatabaseTables;
@ -72,6 +86,11 @@ public final class EssentialsD extends JavaPlugin {
Objects.requireNonNull(Bukkit.getPluginCommand("homes")).setExecutor(new Homes());
Objects.requireNonNull(Bukkit.getPluginCommand("sethome")).setExecutor(new SetHome());
Objects.requireNonNull(Bukkit.getPluginCommand("delhome")).setExecutor(new DelHome());
// warp
Objects.requireNonNull(Bukkit.getPluginCommand("setwarp")).setExecutor(new SetWarp());
Objects.requireNonNull(Bukkit.getPluginCommand("delwarp")).setExecutor(new DelWarp());
Objects.requireNonNull(Bukkit.getPluginCommand("warp")).setExecutor(new Warp());
Objects.requireNonNull(Bukkit.getPluginCommand("warps")).setExecutor(new Warps());
if (config.getRecipesCrowbar()) {

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.time;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.time;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.time;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.tp;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.tp;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.tp;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.tp;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -0,0 +1,14 @@
package cn.lunadeer.essentialsd.commands.warp;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
public class DelWarp implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
// todo
return false;
}
}

View File

@ -0,0 +1,14 @@
package cn.lunadeer.essentialsd.commands.warp;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
public class SetWarp implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
// todo
return false;
}
}

View File

@ -0,0 +1,14 @@
package cn.lunadeer.essentialsd.commands.warp;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
public class Warp implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
// todo
return false;
}
}

View File

@ -0,0 +1,14 @@
package cn.lunadeer.essentialsd.commands.warp;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
public class Warps implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
// todo
return false;
}
}

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.weather;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.weather;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -1,4 +1,4 @@
package cn.lunadeer.essentialsd.commands;
package cn.lunadeer.essentialsd.commands.weather;
import cn.lunadeer.essentialsd.EssentialsD;
import cn.lunadeer.minecraftpluginutils.Notification;

View File

@ -45,6 +45,13 @@ permissions:
default: op
essd.home:
default: true
essd.setwarp:
default: op
essd.delwarp:
default: op
essd.warp:
default: true
commands:
suicide:
@ -167,3 +174,23 @@ commands:
usage: /delhome <名称>
permission: essd.home
permission-message: 你没有权限使用home。
setwarp:
description: 设置传送点
usage: /setwarp <名称>
permission: essd.setwarp
permission-message: 你没有权限设置传送点。
delwarp:
description: 删除传送点
usage: /delwarp <名称>
permission: essd.delwarp
permission-message: 你没有权限删除传送点。
warp:
description: 传送到传送点
usage: /warp <名称>
permission: essd.warp
permission-message: 你没有权限传送到传送点。
warps:
description: 查看传送点列表
usage: /warps
permission: essd.warp
permission-message: 你没有权限查看传送点列表。