#Creating a Player Wrapping method
1 messages · Page 1 of 1 (latest)
Creating a Player Wrapping method
But somehow the method doesnt show up if i call it in my Class (I am creating a command)
Show your code
So in the command class i have: ```String prefix = Main.getPrefix();
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
String usage = (prefix + "Bitte nutze /" + ChatColor.GREEN + label +
ChatColor.GRAY + " <" + ChatColor.GREEN + "set" +
ChatColor.GRAY + " | " + ChatColor.GREEN + "reset" +
ChatColor.GRAY + "> <" + ChatColor.GREEN + "status" +
ChatColor.GRAY + ">.");
if (sender instanceof Player) {
Player p = (Player) sender;
if (args.length == 1 || args.length == 2) {
if (args.length == 1) {
if (args[0].equals("reset")) {
p.setSt
} else p.sendMessage(usage);
} else if (args.length == 2) {
}
} else
p.sendMessage(usage);
} else
sender.sendMessage(prefix + "Der Command /" + ChatColor.GREEN + label + ChatColor.GRAY + " kann nur von Spielern genutzt werden.");
return false;
}```
And in the Warpper just this: ```
Player p;
public static void setStatus(Status s) {
}```
I thought it would solve it...
So how would i get the Player from the command class?