Giter Site home page Giter Site logo

etheriuskit's Introduction

Kits

Source code is provided by Dragonphase. You may modify this in anyway you like as long as you do not publish this as your own or make this your own in any way.

Overview

Kits is a simple yet deceptively powerful plugin allowing you to create, edit and spawn custom kits in-game. When creating and editing a kit, you are provided an inventory in which you will be able to place any item into; changes are made when this inventory is closed.

If you want to contribute to the development of Kits, fork the repository and commit new changes. Don't forget to submit a pull request.

API

Installation

Use Maven. Add the Kits repository and dependency entries to your pom.xml.

<repository>
    <id>franga2000-repo</id>
    <url>http://repo.franga2000.com/public/</url>
</repository>

<dependency>
    <groupId>com.dragonphase</groupId>
    <artifactId>Kits</artifactId>
    <version>2.2</version>
    <scope>provided</scope>
</dependency>

Usage

Add Kits as a dependency inside your plugin.yml file. Retrieve the Kits instance inside your onEnable method and use the methods provided within KitManager:

private KitManager kitManager;

public void onEnable() {
    if (!getServer().getPluginManager().getPlugin("Kits").isEnabled()) {
        getServer().getPluginManager().disablePlugin(this);
    } else {
        kitManager = Kits.getInstance().getKitManager();
    }
}

You can also use the KitSpawnEvent to handle and modify the spawning of kits. Here's a really basic example:

@EventHandler
public void onKitSpawn(KitSpawnEvent event){
    if (event.getPlayer().hasPermission("my.custom.permission")) {
        event.setDelay(0);
        event.getPlayer().sendMessage("You have special privileges!");
    } else {
        event.getPlayer().sendMessage("You don't have special privileges!");
        event.setCancelled(true);
    }
}

etheriuskit's People

Contributors

franga2000 avatar marcinwieczorek 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.