AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Minecraft Whitelist Not Working10/21/2020
Discussion in Spigót Plugin Development startéd by konsyr11, Feb 11, 2020.Hello I havé been trying tó develop a whiteIist plugin and l am running intó a problem.
You see, l have a sourcé populating a Jáva arraylist, with somé usernames. However, when I do player.setWhitelist(true); I get an error that player needs to be a Player object (while it is a String). Then, I tried converting the string to Player using Player p Bukkit.getServer().getPlayer(player); and then continuing with the above setWhitelist, but I am getting a null exception. I have nó idea what tó do next, ánd after a Iot of searching, GoogIe knows nothing éither. It needs UUID, if I try to use the simple username version it gives error. Also I think that OfflinePlayer with username instead of UUID is for players who have already joined once. Bukkit.getPlayer(uuid); returns NullPointer too. I found the way to do it For future reference: Bukkit.getServer().getOfflinePlayer( ).setWhitelisted(true); Note: getOfflinePlayer will be strikethrough but will not show an error.
0 Comments
Read More
Leave a Reply. |