PHP: @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); ItemStack star2 = new ItemStack(Material.NETHER_STAR); ItemMeta starr = star2.getItemMeta(); star2.setItemMeta(starr); player.getInventory().setItem(8, star2); starr.setDisplayName(ChatColor.WHITE + "" + ChatColor.BOLD + "Server Selector"); } That is my code. Everything else works but the name PHP: starr.setDisplayName(ChatColor.WHITE + "" + ChatColor.BOLD + "Server Selector"); If you could help that would be fantastic and would make my day NOTE: Just Joined
You're setting the item meta and adding the item to the player's inventory before you manipulate the item's display name. To put this in other terms, you're doing the following: Code (Text): 1. Creating new ItemStack 2. Getting the ItemMeta 3. Setting the ItemMeta 4. Adding the item to the inventory 5. Manipulating the ItemMeta. But, what you need to do, is the following: Code (Text): 1. Create new ItemStack 2. Get the ItemMeta 3. Set the Display Name 4. Set the ItemMeta 5. Add the item to the inventory