Code Monkey home page Code Monkey logo

tabapi's Introduction

Tab API

is an opensource tablist API made for the Spigot API.


Support

We currently support the following NMS versions, v1_16_R3, v1_15_R1, v1_14_R1, v1_12_R1, v1_10_R1, v1_9_R1, v1_8_R3 and v1_7_R4, we're willing to support more versions in the future, and feel free to open a pull request if you are able to add a version.

Todo

  • Probably add wrapper classes to reduce the amount of code duplication, however I'm lazy.

Usage

The usage is very easy - here's an example:

Registering the handler itself:

Replace "TabImpl" with the TabElementHandler you're using (this is where the tab api gets the elements from.)

@Override
public void onEnable() {
    new TabHandler(new TabImpl(), this, 20L);
}

Making a new TabElementHandler implementation

public class TabImpl implements TabElementHandler {

    /**
     * Get the tab element of a player
     *
     * @param player the player
     * @return the element
     */
    @Override
    public TabElement getElement(Player player) {
        final TabElement element = new TabElement();

        for (int i = 0; i < 80; i++) {
            final int x = i % 4;
            final int y = i / 4;

            element.add(x, y, ChatColor.GREEN + "Slot: " + ChatColor.GRAY + x + ", " + y);
        }

        return element;
    }
}

Selling & Using

You're free to use this product for anything, including selling and running on your own server. However, if you're going to sell a plugin using this, please leave credits and/or a link to the repository.

tabapi's People

Contributors

growlyx avatar nosequel avatar therealnv6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tabapi's Issues

API down or requires authorization?

Having an issue when trying to access the API via Maven. I'm receiving an error on Jitpack that I don't have read access to the repository, or that it doesn't exist. I've also tried using commit ids to no success.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.