Skip to content

A test develop at packets with reflection & nms in minecraft

License

Notifications You must be signed in to change notification settings

clonalejandro/Reflection-NMS-TabAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reflection-NMS-TabAPI

About

A test develop at packets with reflection & nms in minecraft


Guide

DOC

  • method: sendTabHeader or sendTabFooter
  • first paramater: Player
  • second parameter: String for text header or text footer

Example 1

Tab.method(param1, param2);


Example 2

package me.clonalejandro.nmstest.listeners;

import me.clonalejandro.nmstest.Main;

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

/**
 * Created by alejandrorioscalera
 * On 21/4/17
 *
 * -- SOCIAL NETWORKS --
 *
 * GitHub: https://github.com/clonalejandro or @clonalejandro
 * Website: https://clonalejandro.me/
 * Twitter: https://twitter.com/clonalejandro11/ or @clonalejandro11
 * Keybase: https://keybase.io/clonalejandro/
 *
 * -- LICENSE --
 *
 * All rights reserved for clonalejandro ©nmstest 2017 / 2018
 */

public class Example implements Listener {
    
    
    /** SMALL CONSTRUCTORS **/
    
    private final Main plugin;
    
    public Example(Main instance){
        plugin = instance;
    }
    
    
    /** REST **/
    
    @EventHandler
    public void onPlayerJoinEvent(PlayerJoinEvent e){
        
        Player p = e.getPlayer();
        
        String header = "test";
        String footer = ChatColor.AQUA + "bomp";
        
        Tab.sendTabHeader(p, header);
        Tab.sendTabFooter(p, footer);
    }
    
    
}

temporal README.md