1.15.2 Sending TextComponent in 1.15

Discussion in 'Spigot Plugin Development' started by SamB440, Jan 31, 2020.

  1. Since 1.15, player.spigot().sendMessage no longer exists, which was what got used for sending TextComponent. player#sendMessage has no alternatives. So, how do you send them in 1.15?
  2. This is all I have in intellij:

    The jar is from BuildTools. I just built it and my gradle is set to it. If I check NMS, it's at 1.15.2.
  3. Player#spigot()
  4. Neither of which exist. I only seem to be able to do this:
    Code (Text):
    ((Spigot) player).sendMessage(help);
    which I haven't tested yet, and even then I had to manually import Spigot class because intellij really wasn't happy with it.
  5. JavaDoc proves they exist. Are you working with NMS? If not, why do you depend on your local maven repo. Just use the maven repo SpigotMC provides.

    When did you build spigot the last time?
  6. drives_a_ford


    You need to make sure that you have the correct dependency. If you just declare the bukkit dependency, those methods won't exist. I usually add the spigot-api.
  7. Yes, I am using NMS so I use what BuildTools put in my local repo. I built Spigot today.
    Code (Text):
    compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT'
    Edit: If I remove WorldGuard & WorldEdit from my dependencies, these methods exist... wtf?