Solved Title and TabList (header and footers) not working.

Discussion in 'Plugin Development' started by nuclear_kid, Oct 15, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    nuclear_kid

    Hi guys,
    I recently downloaded TitleAPI from here.
    I coded something simple for starters, following the instructions on the website.
    Code:
    package com.nuclear_kid.TabList_and_JoinTitle;
    
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    
    import com.connorlinfoot.titleapi.TitleAPI;
    
    public class Main extends JavaPlugin implements Listener{
    
        @EventHandler
        public void onPlayerJoin(PlayerJoinEvent event){
            Player p = event.getPlayer();
            TitleAPI.sendTitle(p,0,10,1,"§aWelcome,","to §aJungle-Network!");
            TitleAPI.sendTabTitle(p,"§aJungle-Network","players online:");
        }
       
    }
    
    When i enter the server It should display a title saying: welcome to jungle-network! .
    This does not happen.
    Neither does the TabTitle.
     
  2. Offline

    ShadowRanger

    Are you registering your event in the plugin's onEnable?
     
  3. Offline

    SuperSniper

    @nuclear_kid Do you have the plugin "TitleAPI" enabled inside the server? If you use an API, you need the plugin itself inside the server with the plugin that you made.

    EDIT: Also make sure to do what @ShadowRanger said above.
     
  4. Offline

    nuclear_kid

    Interesting! I will try both methods out. Thx!

    Code:
    [04:53:12 ERROR]: Could not load 'plugins\TitleAPI.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/mi
    necraft/server/v1_8_R1/Packet
    Here is my console. Does this mean i need a different version ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
  5. Offline

    tkuiyeager1

    this is the full error?
     
  6. Offline

    nuclear_kid

    no.
    surely you can tell the problem from just that snippet?
    :oops:
     
  7. @nuclear_kid you are indeed using a wrong server file. You need to make sure that your bukkit version is the same as the version the plugin uses. Look on the TitleAPI page for different versions.
     
  8. Offline

    nuclear_kid

    thank you!
    :cool:

    IT WORKS! :cool::cool::cool::cool::cool::cool::cool: so happy!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
Thread Status:
Not open for further replies.

Share This Page