Setting up Fanciful w/ Maven

Discussion in 'Spigot Plugin Development' started by Kozs, May 22, 2016.

  1. Having issues trying to adjust the pom.xml file.



    Is what I need to add to my pom.xml file.

    When I try to add, it gives errors but won't give me any direciton to what the error is... Maven..


    Never used Maven before, would love to learn how to properly utilize this tool!

    Thanks a lot
    - Kozs
  2. I am a gradle fan but I think that you need to put all of your <repository> tags inside a <repositories> tag.
    Pretty sure its the same for dependencies as well. Like how you have it setup for <plugins> and <resources>.

    Also there is the ChatComponent API that you can use instead of fanciful which is shipped with spigot so that you can actually drop that extra dependency. You just need to build against the jar that you build with build tools rather than the api. :)
  3. I recommend you to use the Chat Component API instead of Fanciful, it is available in both bungeecord and spigot.
    You see more info at
    To send a component in BungeeCord
    Code (Text):
    To send a component in Spigot
    Code (Text):
  4. Tried using that and it appears to not work for me, I copied and pasted the code they had just to test it would work and it's just a bunch of object info printed out in the sendMessage
  5. You have to use p.spigot().sendMessage()
  6. Worked! But for some reason I get this after the hello world

  7. Code (Text):
    Player player = Bukkit.getPlayer("MrJaime");

    TextComponent message = new TextComponent( "Hello world" );
    message.setColor( ChatColor.RED );
    message.setBold( true );

    • Agree Agree x 1
  8. Thanks!
    #8 Kozs, May 23, 2016
    Last edited: May 23, 2016