PlayerData
Leblanct opened this issue ยท 3 comments
Hey there!
As I try to get the player to be punished, using the API
I use:
Player toPunish = Bukkit.getPlayer(args[0]);
however it tells me it has to be a PlayerData when I try to call the BmAPI.mute();
I then used,
PlayerData toPunish = (PlayerData) Bukkit.getPlayer(args[0]);
but now it gives me an error on that line when I do /rmute (that's the command I've set)
Any help?
Thanks guys! But I figured it out before this answers, when I realized there is a ''.getPlayer''.
Thanks a lot though.
PlayerData toPunish = BmAPI.getPlayer(Bukkit.getPlayer(args[0]));
I don't quite think that you understood the concepts of casting objects.