Bukkit.getServer().broadcast(textcomponent); doesn't work!

Discussion in 'Plugin Development' started by marchakaa, Mar 13, 2021.

  1. Offline

    marchakaa

    This is all the code. I'm running this plugin on Paper. Please tell me what I have to do to broadcast the TextComponent. upload_2021-3-13_11-43-55.png upload_2021-3-13_11-45-22.png
     
  2. Offline

    KarimAKL

    @marchakaa You are probably looking for:
    Code:Java
    1. Bukkit.getServer().spigot().broadcast(BaseComponent)

    Javadocs link can be found here.
     
  3. Online

    Newdel

  4. Offline

    KarimAKL

    They might want to use the extra features from BaseComponent and its subclasses (e.g., hover events or click events).
     
  5. Online

    Newdel

    Okay then you definitly need spigot. But for basic broadcasting this will be enough imo
     
    KarimAKL likes this.
  6. Offline

    FireRoz

    Well I do Bukkit.broadcastMessage("Message!"); and if you wanna send it to players only with a specific permission then do Bukkit.broadcast("Message for all players with the permission sushi.notify", "sushi.notify");
     

Share This Page