Title And TabApi 1.1

Send Titles Easly

  1. Aphex
    Contributors:
    Aphex
    Title And Tab Api
    Works Only On 1.8
    Requieres: JAVA 1.8+

    Description:
    This plugin allows you to, when a player join send a custom title and subtitle. And a tab and header!
    Contents:
    -T.X.T Code
    -Not a plugin you just create a class on your project, put this into your class. On the main class make a Join Event And put this method:
    Code (Text):
           
    if (!getInstance().getConfig().getBoolean("disable"))
            {
              String title = getInstance().getConfig().getString("title");
              String subtitle = getInstance().getConfig().getString("subtitle");
              int stay = getInstance().getConfig().getInt("time");
              int fadein = getInstance().getConfig().getInt("fadein");
              int fadeout = getInstance().getConfig().getInt("fadeout");
              Title.getInstance().sendTitle(e.getPlayer(), title.replace("%player%", e.getPlayer().getName()), subtitle.replace("%player%", e.getPlayer().getName()), fadein, stay, fadeout);
            }
            String head = getInstance().getConfig().getString("header");
            String foot = getInstance().getConfig().getString("footer");
            Title.getInstance().sendHeaderAndFooter(e.getPlayer(), head, foot);

    }
     
    And import the class. and in the config put this:

    Config:

    Code (Text):

    #Title, Tab Msg Options
    #Variable: %player% To Show The Player's Name
    #Title
    title: '&bWelcome Back &9&L%player%'
    subtitle: '&6Have fun'
    disable: false
    fadein: 10
    fadeout: 10
    time: 10
    #Tab
    header: '&4My Server is Pro'
    footer: '&bFooter'
     
    Example Usage:
    MainClass:
    Code (Text):

    package me.Aphex_Cool;

    import org.bukkit.Bukkit;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.plugin.java.JavaPlugin;

    import me.Aphex_Cool.Title;
    public class Main extends JavaPlugin implements Listener {
         
            public void onEnable(){
                    Bukkit.getServer().getPluginManager().registerEvents(this, this);
            }
         
            @EventHandler(priority=EventPriority.HIGHEST)
            public void onPlayerJoin(PlayerJoinEvent e)
            {
           
           

              if (!getInstance().getConfig().getBoolean("disable"))
              {
                String title = getInstance().getConfig().getString("title");
                String subtitle = getInstance().getConfig().getString("subtitle");
                int stay = getInstance().getConfig().getInt("time");
                int fadein = getInstance().getConfig().getInt("fadein");
                int fadeout = getInstance().getConfig().getInt("fadeout");
                Title.getInstance().sendTitle(e.getPlayer(), title.replace("%player%", e.getPlayer().getName()), subtitle.replace("%player%", e.getPlayer().getName()), fadein, stay, fadeout);
              }
              String head = getInstance().getConfig().getString("header");
              String foot = getInstance().getConfig().getString("footer");
              Title.getInstance().sendHeaderAndFooter(e.getPlayer(), head, foot);
             
             


            }

            private JavaPlugin getInstance() {

                return null;
            }
    }
     

Recent Updates

  1. Bug Fix

Recent Reviews

  1. Florian_X
    Florian_X
    5/5,
    Version: 1.1
    Nice Job, Thank You!
    1. Aphex
      Author's Response
      Thanks You
  2. kemal895
    kemal895
    5/5,
    Version: 1.0
    Nice API dude :)