Giter Site home page Giter Site logo

starlystore-st-itemdb's Introduction

ItemDB - Interface Library Api for Bukkit Plugin

How to include the API with Maven:

<repositories>
    <repository>
        <id>starly.kr</id>
        <url>https://starly.kr:8083</url>
    </repository>
</repositories>

<dependencies>
<dependency>
    <groupId>net.starly.itemdb</groupId>
    <artifactId>ST-ItemDB</artifactId>
    <version>1.0</version>
    <scope>provided</scope>
</dependency>
</dependencies>

How to include the API with Gradle:

repositories {
    maven {
        url = "http://starly.kr:8083/repository/maven-public/"
        allowInsecureProtocol = true
    }
}

dependencies {
    compileOnly "net.starly.itemdb:ST-ItemDB:1.0"
}

Note: You can download the desired version by putting the version number into the "version" field. Please refer to the release notes for more details.

License

Copyright (C) 2023 Starly Store [email protected]

ST-ItemDB cannot be redistributed, as it is subject to the terms of the However, you are allowed to modify it under the terms of the license

image

How to get items from ItemDB

import net.starly.itemdb.ItemDB;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

public class ExampleClass {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        Player player = (Player) sender;

        if (args.length == 0) {
            
            // Gets all ItemStacks from ItemDB.
            for (ItemStack itemStack : ItemDB.getApi().getItems()) {
                player.getInventory().addItem(itemstack);
            }
            
            // Get an ItemStack from ItemDB using its ID.
            // The ID is of type String.
            // Put the matching ID inside the getItem("") method.
            player.getInventory().addItem(ItemDB.getApi().getItem("ITEM_ID"));
            return true;
        }
        return false;
    }
}

starlystore-st-itemdb's People

Contributors

idknicks 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.