Skip to content
forked from frosxt/light

A commons library built for Spigot Plugin Development

License

Notifications You must be signed in to change notification settings

surfgamer86/light

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

130 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues


light

A library to ease and speed up spigot plugin development

Report Bug · Request Feature

Downloads Last Commit wakatime Codacy Badge

Table of Contents
  1. Project Information
  2. Features
  3. Usage
  4. Roadmap
  5. FAQ
  6. Optimisation
  7. Authors
  8. Support
  9. Acknowledgements

light

A library designed to help develop spigot plugins and eliminate redudant code within a project, and across projects. Aims to speed up the development of new projects by removing repetition. Designed to be optimised and as minimal as possible on performance. Supports minecraft versions from 1.8 to the latest.

Built with

  • Java
  • Spigot
  • Apache Maven

Features

  • Item Builder
  • Placeholder Builder
  • Legacy Minecraft Version Checker
  • JSON Data Storage
  • File Manager
  • YAML Config Files
  • Multiple Utilities
  • Menu Support (Paginated & non-paginated)
  • Command Handler (Support for sub commands)
  • Message Handler (Caches messages for optimal performance, supports titles, actionbar and sounds)
  • MongoDB and MySQL database implementation
  • Custom handler storage and initialisation

Usage

Light is run alongside another plugin which utilises this library. Any plugin can utilise this library by adding it as a dependency to your project.

Maven (pom.xml)

<repositories>
    <repository>
        <id>jitpack.io</id>
	<url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.frosxt</groupId>
    <artifactId>light</artifactId>
    <version>v1.5.6</version>
</dependency>

Gradle (build.gradle)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.frosxt:light:v1.5.6'
}

Examples

The library can be used through usages such as:

new ItemBuilder(...)
new ColouredString(String textToConvert)
NumberUtils#isInteger(String arguments)
public class ExamplePagedMenu extends PaginatedMenu {
    public ExamplePagedMenu(Player player) {
        super(player, new ColouredString("&8&lEXAMPLE PAGINATED MENU").toString(), 18, 2);
        
        updateMenu();
    }
    
    @Override
    public void setup() {
        setTitle("&8&lEXAMPLE PAGINATED MENU")
        setFillerItem(new ItemBuilder(...).build());
        addFiller(FillingType.EMPTY_SLOTS);
      
        for (int i = 0; i < 27; i++) {
            buttons[i] = new Button(XMaterial.matchXMaterial("COMPASS").get().parseMaterial())
                    .setDisplayName("&eSlot: " + i)
                    .setClickAction(event -> event.setCancelled(true));
        }

        setButton(slot, page, new Button(...));
    }
}

For more examples and explanations, please see the wiki here.

Roadmap

  • Database Management (MySQL and MongoDB)
  • Redis database management

FAQ

Who is this meant for?

This is meant for developers to make the development of Minecraft plugins easier. Server owners don't need to do anything with this except install it as a plugin on servers which utilise this library.

Will this have x feature or support?

If there is a specific feature or support for something you'd like to see, feel free to suggest it by opening an issue.

Optimisations

This library is designed to be as optimised as possible and provide the most cost-free methods of getting stuff done. Performance is a priority with this library as with all other products.

Authors

Support

For support, you can message me privately on discord @ muhamallah or open an issue.

Acknowledgements

  • CoasterFreakDE - RGBChat integration
  • CryptoMorin - XSeries (Titles, ActionBar and other utilities)
  • NoSequel - Menu Handler is heavily based on this, but not entirely the same
  • Command Handler (From an old shared project)

About

A commons library built for Spigot Plugin Development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%