Two components in one GUI

Discussion in 'Plugin Development' started by _ningattes369, Dec 1, 2021.

  1. Offline


    Hi yall, simple question here:

    Creating a punishment plugin that opens up a GUI upon command with the title of "[blue] Punish [light blue]<player>?" What's wrong here? Can I not add two components within the createInventory method?

     Inventory gui = getServer().createInventory
    (player, 18, (Component.text("Punish", TextColor.color(60, 68, 169)) +
    (Component.text(player.getName(), TextColor.color(58, 179, 218)))); 

    Also how do I format text into a code block on here? Thanks
    Last edited: Dec 1, 2021
  2. Offline

    timtower Administrator Administrator Moderator

    _ningattes369 likes this.

Share This Page