Git Product home page Git Product logo

zeus's Introduction

Zeus

A lightweight library to ease the creation of scoreboards in the video game Minecraft.

Installing

Enter the following in your terminal.

git clone https://github.com/brarsanmol/Zeus.git
cd Zeus
mvn clean install

Insert the following snippet into your pom.xml.

<dependency>
    <groupId>ca.anmolbrar</groupId>
    <artifactId>Zeus</artifactId>
    <version>1.0</version>
    <type>jar</type>
    <scope>compile</scope>
</dependency>

Usage

Zeus makes use of the Adapter pattern to implement the scoreboard. The code sample below is an basic implementation to show you how to get up and running with the library.

public class ExamplePlugin extends JavaPlugin {

    private Zeus zeus;

    @Override
    public void onEnable() {
        [...]
        this.zeus = new Zeus(this, new SidebarAdapterImpl());
    }

    @Override
    public void onDisable() {
        [...]
        this.zeus = null;
    }

}
public class SidebarAdapterImpl implements SidebarAdapter {

    @Override
    public String getTitle() {
        return "Example";
    }

    @Override
    public List<String> getLines(Player player) {
        var lines = new ArrayList<String>();

        lines.add("Line 1");
        lines.add("Line 2");
        lines.add("Line 3");
        lines.add("Line 4");

        return lines;
    }
}

Requirements

  • Java 14
  • Spigot
  • Lombok

Contributors

zeus's People

Contributors

brarsanmol avatar

Watchers

 avatar

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.