mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-03-29 12:02:46 +02:00
merge
This commit is contained in:
@@ -9,7 +9,7 @@ public @interface Command {
|
||||
|
||||
String usage() default "No usage specified";
|
||||
|
||||
String description() default "No description specified";
|
||||
String description() default "commands.generic.no_description_specified";
|
||||
|
||||
String[] aliases() default {};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import emu.grasscutter.game.player.Player;
|
||||
import java.util.List;
|
||||
|
||||
public interface CommandHandler {
|
||||
|
||||
/**
|
||||
* Send a message to the target.
|
||||
*
|
||||
|
||||
@@ -79,6 +79,12 @@ public final class CommandMap {
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<Command> getAnnotationsAsList() { return new LinkedList<>(this.annotations.values()); }
|
||||
|
||||
public HashMap<String, Command> getAnnotations() {
|
||||
return new LinkedHashMap<>(this.annotations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all registered commands.
|
||||
*
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "account", usage = "account <create|delete> <username> [uid]", description = "Modify user accounts")
|
||||
@Command(label = "account", usage = "account <create|delete> <username> [uid]", description = "commands.account.description")
|
||||
public final class AccountCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,8 +9,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "broadcast", usage = "broadcast <message>",
|
||||
description = "Sends a message to all the players", aliases = {"b"}, permission = "server.broadcast")
|
||||
@Command(label = "broadcast", usage = "broadcast <message>", aliases = {"b"}, permission = "server.broadcast", description = "commands.broadcast.description")
|
||||
public final class BroadcastCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,9 +8,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "changescene", usage = "changescene <scene id>",
|
||||
description = "Changes your scene", aliases = {"scene"}, permission = "player.changescene")
|
||||
@Command(label = "changescene", usage = "changescene <scene id>", aliases = {"scene"}, permission = "player.changescene", description = "commands.changescene.description")
|
||||
public final class ChangeSceneCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "clear", usage = "clear <all|wp|art|mat>", //Merged /clearartifacts and /clearweapons to /clear <args> [uid]
|
||||
description = "Deletes unequipped unlocked items, including yellow rarity ones from your inventory",
|
||||
description = "commands.clear.description",
|
||||
aliases = {"clear"}, permission = "player.clearinv")
|
||||
|
||||
public final class ClearCommand implements CommandHandler {
|
||||
|
||||
@@ -9,9 +9,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "coop", usage = "coop [host UID]",
|
||||
description = "Forces someone to join the world of others", permission = "server.coop")
|
||||
@Command(label = "coop", usage = "coop [host UID]", permission = "server.coop", description = "commands.coop.description")
|
||||
public final class CoopCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -13,8 +13,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "drop", usage = "drop <itemId|itemName> [amount]",
|
||||
description = "Drops an item near you", aliases = {"d", "dropitem"}, permission = "server.drop")
|
||||
@Command(label = "drop", usage = "drop <itemId|itemName> [amount]", aliases = {"d", "dropitem"}, permission = "server.drop", description = "commands.drop.description")
|
||||
public final class DropCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,9 +8,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "enterdungeon", usage = "enterdungeon <dungeon id>",
|
||||
description = "Enter a dungeon", aliases = {"dungeon"}, permission = "player.enterdungeon")
|
||||
@Command(label = "enterdungeon", usage = "enterdungeon <dungeon id>", aliases = {"dungeon"}, permission = "player.enterdungeon", description = "commands.enter_dungeon.description")
|
||||
public final class EnterDungeonCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -15,8 +15,7 @@ import java.util.*;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "giveall", usage = "giveall [amount]",
|
||||
description = "Gives all items", aliases = {"givea"}, permission = "player.giveall", threading = true)
|
||||
@Command(label = "giveall", usage = "giveall [amount]", aliases = {"givea"}, permission = "player.giveall", threading = true, description = "commands.giveAll.description")
|
||||
public final class GiveAllCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "giveart", usage = "giveart <artifactId> <mainPropId> [<appendPropId>[,<times>]]... [level]", description = "Gives the player a specified artifact", aliases = {"gart"}, permission = "player.giveart")
|
||||
@Command(label = "giveart", usage = "giveart <artifactId> <mainPropId> [<appendPropId>[,<times>]]... [level]", aliases = {"gart"}, permission = "player.giveart", description = "commands.giveArtifact.description")
|
||||
public final class GiveArtifactCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -12,8 +12,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "givechar", usage = "givechar <avatarId> [level]",
|
||||
description = "Gives the player a specified character", aliases = {"givec"}, permission = "player.givechar")
|
||||
@Command(label = "givechar", usage = "givechar <avatarId> [level]", aliases = {"givec"}, permission = "player.givechar", description = "commands.giveChar.description")
|
||||
public final class GiveCharCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
@@ -77,6 +76,6 @@ public final class GiveCharCommand implements CommandHandler {
|
||||
avatar.recalcStats();
|
||||
|
||||
targetPlayer.addAvatar(avatar);
|
||||
CommandHandler.sendMessage(sender, translate("commands.execution.giveChar.given", Integer.toString(avatarId), Integer.toString(level), Integer.toString(targetPlayer.getUid())));
|
||||
CommandHandler.sendMessage(sender, translate("commands.giveChar.given", Integer.toString(avatarId), Integer.toString(level), Integer.toString(targetPlayer.getUid())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package emu.grasscutter.command.commands;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.command.Command;
|
||||
import emu.grasscutter.command.CommandHandler;
|
||||
import emu.grasscutter.data.GameData;
|
||||
@@ -12,13 +11,13 @@ import emu.grasscutter.game.props.ActionReason;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "give", usage = "give <itemId|itemName> [amount] [level]", description = "Gives an item to you or the specified player", aliases = {
|
||||
"g", "item", "giveitem"}, permission = "player.give")
|
||||
@Command(label = "give", usage = "give <itemId|itemName> [amount] [level]", aliases = {
|
||||
"g", "item", "giveitem"}, permission = "player.give", description = "commands.give.description")
|
||||
public final class GiveCommand implements CommandHandler {
|
||||
Pattern lvlRegex = Pattern.compile("l(?:vl?)?(\\d+)"); // Java is a joke of a proglang that doesn't have raw string literals
|
||||
Pattern refineRegex = Pattern.compile("r(\\d+)");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package emu.grasscutter.command.commands;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.command.Command;
|
||||
import emu.grasscutter.command.CommandHandler;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
@@ -9,8 +8,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "godmode", usage = "godmode [on|off|toggle]",
|
||||
description = "Prevents you from taking damage. Defaults to toggle.", permission = "player.godmode")
|
||||
@Command(label = "godmode", usage = "godmode [on|off|toggle]", permission = "player.godmode", description = "commands.godmode.description")
|
||||
public final class GodModeCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,9 +11,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "heal", usage = "heal|h", aliases = {"h"},
|
||||
description = "Heal all characters in your current team.", permission = "player.heal")
|
||||
@Command(label = "heal", usage = "heal|h", aliases = {"h"}, permission = "player.heal", description = "commands.heal.description")
|
||||
public final class HealCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -10,8 +10,7 @@ import java.util.*;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "help", usage = "help [command]",
|
||||
description = "Sends the help message or shows information about a specified command")
|
||||
@Command(label = "help", usage = "help [command]", description = "commands.help.description")
|
||||
public final class HelpCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
@@ -39,7 +38,7 @@ public final class HelpCommand implements CommandHandler {
|
||||
} else {
|
||||
Command annotation = handler.getClass().getAnnotation(Command.class);
|
||||
|
||||
builder.append(" ").append(annotation.description()).append("\n");
|
||||
builder.append(" ").append(translate(annotation.description())).append("\n");
|
||||
builder.append(translate("commands.help.usage")).append(annotation.usage());
|
||||
if (annotation.aliases().length >= 1) {
|
||||
builder.append("\n").append(translate("commands.help.aliases"));
|
||||
@@ -61,7 +60,7 @@ public final class HelpCommand implements CommandHandler {
|
||||
StringBuilder builder = new StringBuilder("\n" + translate("commands.help.available_commands") + "\n");
|
||||
annotations.forEach(annotation -> {
|
||||
builder.append(annotation.label()).append("\n");
|
||||
builder.append(" ").append(annotation.description()).append("\n");
|
||||
builder.append(" ").append(translate(annotation.description())).append("\n");
|
||||
builder.append(translate("commands.help.usage")).append(annotation.usage());
|
||||
if (annotation.aliases().length >= 1) {
|
||||
builder.append("\n").append(translate("commands.help.aliases"));
|
||||
@@ -78,7 +77,7 @@ public final class HelpCommand implements CommandHandler {
|
||||
CommandHandler.sendMessage(player, translate("commands.help.available_commands"));
|
||||
annotations.forEach(annotation -> {
|
||||
StringBuilder builder = new StringBuilder(annotation.label()).append("\n");
|
||||
builder.append(" ").append(annotation.description()).append("\n");
|
||||
builder.append(" ").append(translate(annotation.description())).append("\n");
|
||||
builder.append(translate("commands.help.usage")).append(annotation.usage());
|
||||
if (annotation.aliases().length >= 1) {
|
||||
builder.append("\n").append(translate("commands.help.aliases"));
|
||||
|
||||
@@ -8,8 +8,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "kick", usage = "kick",
|
||||
description = "Kicks the specified player from the server (WIP)", permission = "server.kick")
|
||||
@Command(label = "kick", usage = "kick", permission = "server.kick", description = "commands.kick.description")
|
||||
public final class KickCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,8 +12,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "killall", usage = "killall [sceneId]",
|
||||
description = "Kill all entities", permission = "server.killall")
|
||||
@Command(label = "killall", usage = "killall [sceneId]", permission = "server.killall", description = "commands.kill.description")
|
||||
public final class KillAllCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,8 +13,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "killcharacter", usage = "killcharacter", aliases = {"suicide", "kill"},
|
||||
description = "Kills the players current character", permission = "player.killcharacter")
|
||||
@Command(label = "killcharacter", usage = "killcharacter", aliases = {"suicide", "kill"}, permission = "player.killcharacter", description = "commands.list.description")
|
||||
public final class KillCharacterCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,8 +10,7 @@ import java.util.Map;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "list", usage = "list [uid]",
|
||||
description = "List online players", aliases = {"players"})
|
||||
@Command(label = "list", usage = "list [uid]", aliases = {"players"}, description = "commands.list.description")
|
||||
public final class ListCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,8 +10,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "permission", usage = "permission <add|remove> <permission>",
|
||||
description = "Grants or removes a permission for a user", permission = "*")
|
||||
@Command(label = "permission", usage = "permission <add|remove> <permission>", permission = "*", description = "commands.permission.description")
|
||||
public final class PermissionCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,8 +9,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "position", usage = "position", aliases = {"pos"},
|
||||
description = "Get coordinates.")
|
||||
@Command(label = "position", usage = "position", aliases = {"pos"}, description = "commands.position.description")
|
||||
public final class PositionCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,8 +9,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "reload", usage = "reload",
|
||||
description = "Reload server config", permission = "server.reload")
|
||||
@Command(label = "reload", usage = "reload", permission = "server.reload", description = "commands.reload.description")
|
||||
public final class ReloadCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,8 +11,7 @@ import java.util.List;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "resetconst", usage = "resetconst [all]",
|
||||
description = "Resets the constellation level on your current active character, will need to relog after using the command to see any changes.",
|
||||
aliases = {"resetconstellation"}, permission = "player.resetconstellation")
|
||||
aliases = {"resetconstellation"}, permission = "player.resetconstellation", description = "commands.resetConst.description")
|
||||
public final class ResetConstCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,9 +9,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "resetshop", usage = "resetshop",
|
||||
description = "Reset target player's shop refresh time.", permission = "server.resetshop")
|
||||
@Command(label = "resetshop", usage = "resetshop", permission = "server.resetshop", description = "commands.status.description")
|
||||
public final class ResetShopLimitCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -6,7 +6,9 @@ import emu.grasscutter.game.player.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Command(label = "restart", usage = "restart - Restarts the current session")
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "restart", usage = "restart", description = "commands.restart.description")
|
||||
public final class RestartCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,8 +13,7 @@ import java.util.List;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@Command(label = "sendmail", usage = "sendmail <userId|all|help> [templateId]",
|
||||
description = "Sends mail to the specified user. The usage of this command changes based on it's composition state.", permission = "server.sendmail")
|
||||
@Command(label = "sendmail", usage = "sendmail <userId|all|help> [templateId]", permission = "server.sendmail", description = "commands.sendMail.description")
|
||||
public final class SendMailCommand implements CommandHandler {
|
||||
|
||||
// TODO: You should be able to do /sendmail and then just send subsequent messages until you finish
|
||||
@@ -40,7 +39,7 @@ public final class SendMailCommand implements CommandHandler {
|
||||
MailBuilder mailBuilder;
|
||||
switch (args.get(0).toLowerCase()) {
|
||||
case "help" -> {
|
||||
CommandHandler.sendMessage(sender, this.getClass().getAnnotation(Command.class).description() + "\nUsage: " + this.getClass().getAnnotation(Command.class).usage());
|
||||
CommandHandler.sendMessage(sender, translate(this.getClass().getAnnotation(Command.class).description()) + "\nUsage: " + this.getClass().getAnnotation(Command.class).usage());
|
||||
return;
|
||||
}
|
||||
case "all" -> mailBuilder = new MailBuilder(true, new Mail());
|
||||
|
||||
@@ -8,8 +8,8 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "say", usage = "say <message>", description = "Sends a message to a player as the server",
|
||||
aliases = {"sendservmsg", "sendservermessage", "sendmessage"}, permission = "server.sendmessage")
|
||||
@Command(label = "say", usage = "say <message>",
|
||||
aliases = {"sendservmsg", "sendservermessage", "sendmessage"}, permission = "server.sendmessage", description = "commands.sendMessage.description")
|
||||
public final class SendMessageCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,8 +12,7 @@ import emu.grasscutter.server.packet.send.PacketAvatarFetterDataNotify;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "setfetterlevel", usage = "setfetterlevel <level>",
|
||||
description = "Sets your fetter level for your current active character",
|
||||
aliases = {"setfetterlvl", "setfriendship"}, permission = "player.setfetterlevel")
|
||||
aliases = {"setfetterlvl", "setfriendship"}, permission = "player.setfetterlevel", description = "commands.setFetterLevel.description")
|
||||
public final class SetFetterLevelCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,8 +15,7 @@ import emu.grasscutter.utils.Language;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "setstats", usage = "setstats|stats <stat> <value>",
|
||||
description = "Set fight property for your current active character", aliases = {"stats"}, permission = "player.setstats")
|
||||
@Command(label = "setstats", usage = "setstats|stats <stat> <value>", aliases = {"stats"}, permission = "player.setstats", description = "commands.setStats.description")
|
||||
public final class SetStatsCommand implements CommandHandler {
|
||||
static class Stat {
|
||||
String name;
|
||||
|
||||
@@ -10,8 +10,7 @@ import java.util.List;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "setworldlevel", usage = "setworldlevel <level>",
|
||||
description = "Sets your world level (Relog to see proper effects)",
|
||||
aliases = {"setworldlvl"}, permission = "player.setworldlevel")
|
||||
aliases = {"setworldlvl"}, permission = "player.setworldlevel", description = "commands.setWorldLevel.description")
|
||||
public final class SetWorldLevelCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,8 +22,7 @@ import java.util.Random;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "spawn", usage = "spawn <entityId> [amount] [level(monster only)]",
|
||||
description = "Spawns an entity near you", permission = "server.spawn")
|
||||
@Command(label = "spawn", usage = "spawn <entityId> [amount] [level(monster only)]", permission = "server.spawn", description = "commands.spawn.description")
|
||||
public final class SpawnCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,8 +9,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "stop", usage = "stop",
|
||||
description = "Stops the server", permission = "server.stop")
|
||||
@Command(label = "stop", usage = "stop", permission = "server.stop", description = "commands.stop.description")
|
||||
public final class StopCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,8 +14,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "talent", usage = "talent <talentID> <value>",
|
||||
description = "Set talent level for your current active character", permission = "player.settalent")
|
||||
@Command(label = "talent", usage = "talent <talentID> <value>", permission = "player.settalent", description = "commands.talent.description")
|
||||
public final class TalentCommand implements CommandHandler {
|
||||
private void setTalentLevel(Player sender, Player player, Avatar avatar, int talentId, int talentLevel) {
|
||||
int oldLevel = avatar.getSkillLevelMap().get(talentId);
|
||||
|
||||
@@ -10,9 +10,9 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "tpall", usage = "tpall",
|
||||
description = "Teleports all players in your world to your position", permission = "player.tpall")
|
||||
@Command(label = "tpall", usage = "tpall", permission = "player.tpall", description = "commands.teleportAll.description")
|
||||
public final class TeleportAllCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
if (targetPlayer == null) {
|
||||
|
||||
@@ -10,8 +10,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "teleport", usage = "teleport <x> <y> <z> [scene id]", aliases = {"tp"},
|
||||
description = "Change the player's position.", permission = "player.teleport")
|
||||
@Command(label = "teleport", usage = "teleport <x> <y> <z> [scene id]", aliases = {"tp"}, permission = "player.teleport", description = "commands.teleport.description")
|
||||
public final class TeleportCommand implements CommandHandler {
|
||||
|
||||
private float parseRelative(String input, Float current) { // TODO: Maybe this will be useful elsewhere later
|
||||
|
||||
@@ -11,8 +11,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "weather", usage = "weather <weatherId> [climateId]",
|
||||
description = "Changes the weather.", aliases = {"w"}, permission = "player.weather")
|
||||
@Command(label = "weather", usage = "weather <weatherId> [climateId]", aliases = {"w"}, permission = "player.weather", description = "commands.weather.description")
|
||||
public final class WeatherCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user