Commit 1c36f078 authored by Melledy's avatar Melledy
Browse files

Renamed all references to a certain game

parent 6b8902be
......@@ -5,7 +5,7 @@ import java.util.Arrays;
import emu.grasscutter.utils.Position;
import emu.grasscutter.utils.Utils;
public final class GenshinConstants {
public final class GameConstants {
public static String VERSION = "2.6.0";
public static final int MAX_TEAMS = 4;
......
package emu.grasscutter.command;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -12,7 +12,7 @@ public interface CommandHandler {
* @param player The player to send the message to, or null for the server console.
* @param message The message to send.
*/
static void sendMessage(GenshinPlayer player, String message) {
static void sendMessage(Player player, String message) {
if (player == null) {
Grasscutter.getLogger().info(message);
} else {
......@@ -25,6 +25,6 @@ public interface CommandHandler {
* @param sender The player/console that invoked the command.
* @param args The arguments to the command.
*/
default void execute(GenshinPlayer sender, List<String> args) {
default void execute(Player sender, List<String> args) {
}
}
......@@ -2,7 +2,7 @@ package emu.grasscutter.command;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import org.reflections.Reflections;
import java.util.*;
......@@ -103,7 +103,7 @@ public final class CommandMap {
* @param player The player invoking the command or null for the server console.
* @param rawMessage The messaged used to invoke the command.
*/
public void invoke(GenshinPlayer player, String rawMessage) {
public void invoke(Player player, String rawMessage) {
rawMessage = rawMessage.trim();
if (rawMessage.length() == 0) {
CommandHandler.sendMessage(player, "No command specified.");
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.database.DatabaseHelper;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -12,7 +12,7 @@ import java.util.List;
public final class AccountCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (sender != null) {
CommandHandler.sendMessage(sender, "This command can only be run from the console.");
return;
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -12,7 +12,7 @@ import java.util.List;
public final class BroadcastCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (args.size() < 1) {
CommandHandler.sendMessage(sender, "Usage: broadcast <message>");
return;
......@@ -20,7 +20,7 @@ public final class BroadcastCommand implements CommandHandler {
String message = String.join(" ", args.subList(0, args.size()));
for (GenshinPlayer p : Grasscutter.getGameServer().getPlayers().values()) {
for (Player p : Grasscutter.getGameServer().getPlayers().values()) {
CommandHandler.sendMessage(p, message);
}
......
......@@ -2,7 +2,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -10,7 +10,7 @@ import java.util.List;
description = "Changes your scene", aliases = {"scene"}, permission = "player.changescene")
public final class ChangeSceneCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (sender == null) {
CommandHandler.sendMessage(null, "Run this command in-game.");
return;
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.inventory.Inventory;
import emu.grasscutter.game.inventory.ItemType;
......@@ -16,7 +16,7 @@ import java.util.List;
public final class ClearCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
int target;
if (sender == null) {
CommandHandler.sendMessage(null, "Run this command in-game.");
......@@ -27,7 +27,7 @@ public final class ClearCommand implements CommandHandler {
Inventory playerInventory = sender.getInventory();
try {
target = Integer.parseInt(args.get(0));
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
target = sender.getUid();
} else {
......@@ -92,7 +92,7 @@ public final class ClearCommand implements CommandHandler {
return;
}
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found.");
return;
......
......@@ -2,9 +2,9 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.def.ItemData;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.entity.EntityItem;
import emu.grasscutter.utils.Position;
......@@ -15,7 +15,7 @@ import java.util.List;
public final class DropCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (sender == null) {
CommandHandler.sendMessage(null, "Run this command in-game.");
return;
......@@ -31,7 +31,7 @@ public final class DropCommand implements CommandHandler {
int amount = 1;
if (args.size() > 1) amount = Integer.parseInt(args.get(1));
ItemData itemData = GenshinData.getItemDataMap().get(item);
ItemData itemData = GameData.getItemDataMap().get(item);
if (itemData == null) {
CommandHandler.sendMessage(sender, "Invalid item id.");
return;
......
......@@ -3,12 +3,12 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.def.AvatarData;
import emu.grasscutter.data.def.ItemData;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.avatar.GenshinAvatar;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.game.inventory.ItemType;
import java.util.*;
......@@ -18,7 +18,7 @@ import java.util.*;
public class GiveAllCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
int target, amount = 99999;
switch (args.size()) {
......@@ -63,7 +63,7 @@ public class GiveAllCommand implements CommandHandler {
return;
}
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found.");
return;
......@@ -73,14 +73,14 @@ public class GiveAllCommand implements CommandHandler {
CommandHandler.sendMessage(sender, "Giving all items done");
}
public void giveAllItems(GenshinPlayer player, int amount) {
public void giveAllItems(Player player, int amount) {
CommandHandler.sendMessage(player, "Giving all items...");
for (AvatarData avatarData: GenshinData.getAvatarDataMap().values()) {
for (AvatarData avatarData: GameData.getAvatarDataMap().values()) {
//Exclude test avatar
if (isTestAvatar(avatarData.getId())) continue;
GenshinAvatar avatar = new GenshinAvatar(avatarData);
Avatar avatar = new Avatar(avatarData);
avatar.setLevel(90);
avatar.setPromoteLevel(6);
for (int i = 1; i <= 6; ++i) {
......@@ -92,41 +92,41 @@ public class GiveAllCommand implements CommandHandler {
}
//some test items
List<GenshinItem> genshinItemList = new ArrayList<>();
for (ItemData itemdata: GenshinData.getItemDataMap().values()) {
List<GameItem> itemList = new ArrayList<>();
for (ItemData itemdata: GameData.getItemDataMap().values()) {
//Exclude test item
if (isTestItem(itemdata.getId())) continue;
if (itemdata.isEquip()) {
for (int i = 0; i < 10; ++i) {
GenshinItem genshinItem = new GenshinItem(itemdata);
GameItem item = new GameItem(itemdata);
if (itemdata.getItemType() == ItemType.ITEM_WEAPON) {
genshinItem.setLevel(90);
genshinItem.setPromoteLevel(6);
genshinItem.setRefinement(4);
item.setLevel(90);
item.setPromoteLevel(6);
item.setRefinement(4);
}
genshinItemList.add(genshinItem);
itemList.add(item);
}
}
else {
GenshinItem genshinItem = new GenshinItem(itemdata);
genshinItem.setCount(amount);
genshinItemList.add(genshinItem);
GameItem item = new GameItem(itemdata);
item.setCount(amount);
itemList.add(item);
}
}
int packetNum = 20;
int itemLength = genshinItemList.size();
int itemLength = itemList.size();
int number = itemLength / packetNum;
int remainder = itemLength % packetNum;
int offset = 0;
for (int i = 0; i < packetNum; ++i) {
if (remainder > 0) {
player.getInventory().addItems(genshinItemList.subList(i * number + offset, (i + 1) * number + offset + 1));
player.getInventory().addItems(itemList.subList(i * number + offset, (i + 1) * number + offset + 1));
--remainder;
++offset;
}
else {
player.getInventory().addItems(genshinItemList.subList(i * number + offset, (i + 1) * number + offset));
player.getInventory().addItems(itemList.subList(i * number + offset, (i + 1) * number + offset));
}
}
}
......
......@@ -3,10 +3,10 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.def.AvatarData;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.avatar.GenshinAvatar;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.avatar.Avatar;
import java.util.List;
......@@ -15,7 +15,7 @@ import java.util.List;
public final class GiveCharCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
int target, avatarId, level = 1, ascension;
if (sender == null && args.size() < 2) {
......@@ -61,13 +61,13 @@ public final class GiveCharCommand implements CommandHandler {
break;
}
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found.");
return;
}
AvatarData avatarData = GenshinData.getAvatarDataMap().get(avatarId);
AvatarData avatarData = GameData.getAvatarDataMap().get(avatarId);
if (avatarData == null) {
CommandHandler.sendMessage(sender, "Invalid avatar id.");
return;
......@@ -80,7 +80,7 @@ public final class GiveCharCommand implements CommandHandler {
ascension = (int) Math.ceil(level / 10f) - 3;
}
GenshinAvatar avatar = new GenshinAvatar(avatarId);
Avatar avatar = new Avatar(avatarId);
avatar.setLevel(level);
avatar.setPromoteLevel(ascension);
......
......@@ -3,10 +3,10 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.def.ItemData;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.game.props.ActionReason;
import emu.grasscutter.server.packet.send.PacketItemAddHintNotify;
......@@ -18,7 +18,7 @@ import java.util.List;
public final class GiveCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
int target, item, lvl, amount = 1;
if (sender == null && args.size() < 2) {
CommandHandler.sendMessage(null, "Usage: give <player> <itemId|itemName> [amount] [level]");
......@@ -99,14 +99,14 @@ public final class GiveCommand implements CommandHandler {
break;
}
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found.");
return;
}
ItemData itemData = GenshinData.getItemDataMap().get(item);
ItemData itemData = GameData.getItemDataMap().get(item);
if (itemData == null) {
CommandHandler.sendMessage(sender, "Invalid item id.");
return;
......@@ -121,11 +121,11 @@ public final class GiveCommand implements CommandHandler {
String.format("Given %s with level %s %s times to %s", item, lvl, amount, target));
}
private void item(GenshinPlayer player, ItemData itemData, int amount, int lvl) {
private void item(Player player, ItemData itemData, int amount, int lvl) {
if (itemData.isEquip()) {
List<GenshinItem> items = new LinkedList<>();
List<GameItem> items = new LinkedList<>();
for (int i = 0; i < amount; i++) {
GenshinItem item = new GenshinItem(itemData);
GameItem item = new GameItem(itemData);
item.setCount(amount);
item.setLevel(lvl);
item.setPromoteLevel(0);
......@@ -146,9 +146,9 @@ public final class GiveCommand implements CommandHandler {
}
player.getInventory().addItems(items, ActionReason.SubfieldDrop);
} else {
GenshinItem genshinItem = new GenshinItem(itemData);
genshinItem.setCount(amount);
player.getInventory().addItem(genshinItem, ActionReason.SubfieldDrop);
GameItem item = new GameItem(itemData);
item.setCount(amount);
player.getInventory().addItem(item, ActionReason.SubfieldDrop);
}
}
}
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -12,7 +12,7 @@ import java.util.List;
public final class GodModeCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (sender == null) {
CommandHandler.sendMessage(null, "Run this command in-game.");
return; // TODO: toggle player's godmode statue from console or other players
......@@ -32,7 +32,7 @@ public final class GodModeCommand implements CommandHandler {
} else {
target = sender.getUid();
}
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found.");
return;
......
......@@ -2,7 +2,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.props.FightProperty;
import emu.grasscutter.server.packet.send.PacketAvatarFightPropUpdateNotify;
import emu.grasscutter.server.packet.send.PacketAvatarLifeStateChangeNotify;
......@@ -13,7 +13,7 @@ import java.util.List;
description = "Heal all characters in your current team.", permission = "player.heal")
public final class HealCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (sender == null) {
CommandHandler.sendMessage(null, "Run this command in-game.");
return;
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.command.CommandMap;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.*;
......@@ -12,7 +12,7 @@ import java.util.*;
public final class HelpCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer player, List<String> args) {
public void execute(Player player, List<String> args) {
if (args.size() < 1) {
HashMap<String, CommandHandler> handlers = CommandMap.getInstance().getHandlers();
List<Command> annotations = new ArrayList<>();
......@@ -53,7 +53,7 @@ public final class HelpCommand implements CommandHandler {
}
}
void SendAllHelpMessage(GenshinPlayer player, List<Command> annotations) {
void SendAllHelpMessage(Player player, List<Command> annotations) {
if (player == null) {
StringBuilder builder = new StringBuilder("\nAvailable commands:\n");
annotations.forEach(annotation -> {
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -12,10 +12,10 @@ import java.util.List;
public final class KickCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
int target = Integer.parseInt(args.get(0));
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found.");
return;
......
......@@ -3,8 +3,8 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.GenshinScene;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.Scene;
import emu.grasscutter.game.entity.EntityMonster;
import java.util.List;
......@@ -14,9 +14,9 @@ import java.util.List;
public final class KillAllCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
GenshinScene scene;
GenshinPlayer genshinPlayer;
public void execute(Player sender, List<String> args) {
Scene mainScene;
Player targetPlayer;
try {
switch (args.size()) {
......@@ -25,38 +25,38 @@ public final class KillAllCommand implements CommandHandler {
CommandHandler.sendMessage(null, "Usage: killall [playerUid] [sceneId]");
return;
}
scene = sender.getScene();
mainScene = sender.getScene();
break;
case 1: // [playerUid]
genshinPlayer = Grasscutter.getGameServer().getPlayerByUid(Integer.parseInt(args.get(0)));
if (genshinPlayer == null) {
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(Integer.parseInt(args.get(0)));
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found or offline.");
return;
}
scene = genshinPlayer.getScene();
mainScene = targetPlayer.getScene();
break;
case 2: // [playerUid] [sceneId]
genshinPlayer = Grasscutter.getGameServer().getPlayerByUid(Integer.parseInt(args.get(0)));
if (genshinPlayer == null) {
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(Integer.parseInt(args.get(0)));
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found or offline.");
return;
}
GenshinScene genshinScene = sender.getWorld().getSceneById(Integer.parseInt(args.get(1)));
if (genshinScene == null) {
Scene scene = sender.getWorld().getSceneById(Integer.parseInt(args.get(1)));
if (scene == null) {
CommandHandler.sendMessage(sender, "Scene not found in player world");
return;
}
scene = genshinScene;
mainScene = scene;
break;
default:
CommandHandler.sendMessage(sender, "Usage: killall [playerUid] [sceneId]");
return;
}
scene.getEntities().values().stream()
mainScene.getEntities().values().stream()
.filter(entity -> entity instanceof EntityMonster)
.forEach(entity -> scene.killEntity(entity, 0));
CommandHandler.sendMessage(sender, "Killing all monsters in scene " + scene.getId());
.forEach(entity -> mainScene.killEntity(entity, 0));
CommandHandler.sendMessage(sender, "Killing all monsters in scene " + mainScene.getId());
} catch (NumberFormatException ignored) {
CommandHandler.sendMessage(sender, "Invalid arguments.");
}
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.entity.EntityAvatar;
import emu.grasscutter.game.props.FightProperty;
import emu.grasscutter.game.props.LifeState;
......@@ -17,7 +17,7 @@ import java.util.List;
public final class KillCharacterCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
int target;
if (sender == null) {
// from console
......@@ -48,7 +48,7 @@ public final class KillCharacterCommand implements CommandHandler {
}
}
GenshinPlayer targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
Player targetPlayer = Grasscutter.getGameServer().getPlayerByUid(target);
if (targetPlayer == null) {
CommandHandler.sendMessage(sender, "Player not found or offline.");
return;
......
......@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
import java.util.Map;
......@@ -12,8 +12,8 @@ import java.util.Map;
public final class ListCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
Map<Integer, GenshinPlayer> playersMap = Grasscutter.getGameServer().getPlayers();
public void execute(Player sender, List<String> args) {
Map<Integer, Player> playersMap = Grasscutter.getGameServer().getPlayers();
CommandHandler.sendMessage(sender, String.format("There are %s player(s) online:", playersMap.size()));
......
......@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -13,7 +13,7 @@ import java.util.List;
public final class PermissionCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (args.size() < 3) {
CommandHandler.sendMessage(sender, "Usage: permission <add|remove> <username> <permission>");
return;
......
......@@ -2,7 +2,7 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import java.util.List;
......@@ -11,7 +11,7 @@ import java.util.List;
public final class PositionCommand implements CommandHandler {
@Override
public void execute(GenshinPlayer sender, List<String> args) {
public void execute(Player sender, List<String> args) {
if (sender == null) {
CommandHandler.sendMessage(null, "Run this command in-game.");
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment