mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-04 16:56:40 +00:00
Actually add Player as a field to the commands
This commit is contained in:
@ -21,6 +21,7 @@ import net.kyori.adventure.text.format.TextDecoration;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@CommandParameters(name = "namehistory", description = "Get the name history of a player", usage = "/<command> <player>", aliases = "nh")
|
||||
@ -30,7 +31,7 @@ public class NameHistoryCMD extends PlexCommand
|
||||
private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("MM/dd/yyyy 'at' HH:mm:ss");
|
||||
|
||||
@Override
|
||||
public Component execute(CommandSender sender, String[] args)
|
||||
public Component execute(CommandSender sender, Player playerSender, String[] args)
|
||||
{
|
||||
if (args.length != 1)
|
||||
{
|
||||
@ -38,7 +39,6 @@ public class NameHistoryCMD extends PlexCommand
|
||||
}
|
||||
String username = args[0];
|
||||
|
||||
|
||||
UUID uuid;
|
||||
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayerIfCached(username);
|
||||
if (offlinePlayer != null)
|
||||
|
Reference in New Issue
Block a user