Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pinozenth/experiences-lib

A Minecraft framework designed to create a new experience for developing plugins from the ground up.
https://github.com/pinozenth/experiences-lib

library minecraft minecraft-library minecraft-plugin plugin plugin-library spigot spigot-plugin spigotmc

Last synced: about 1 month ago
JSON representation

A Minecraft framework designed to create a new experience for developing plugins from the ground up.

Awesome Lists containing this project

README

        

# 🆕 PixLib is now renamed to Experience!

----

# Compatibility

Experience Library is developing under [spigot-api](https://hub.spigotmc.org/javadocs/bukkit/) version [1.21.1](https://helpch.at/docs/1.21.1/) so you should be fine on developing a bukkit, spigot, and paper plugin!

* [X] 1.21.1

Feel free to use this [Plugin Template](https://github.com/PinozenTH/PluginTemplate) as your head start.

_**Note: I don't have plan to down grade this library to any spigot-api version under 1.21.1 for now.**_

> ⚠️ Caution this library is has develop just for pinont's plugin, Becareful of using this library on your own,
You may Experiences some bugs or problems
Due to my lack of Development Skills and Testing.

# Quick Start

Please follow the steps below to if you plan to use Experience flamework on your own plugin.

## Step 1: Import experiences into Maven/Gradle

If you use maven don't worry about repository, This library has located a repository to maven central.

```xml


com.pinont
experiences
Latest version of Experiences
compile

```

## Step 2: Shading (Important)

**Experiences** comes with some plugins available for you such as MythicMobs, etc. so that you can access them when you are coding but don't need to include them as dependencies on your own.

Maven has a limitation whereby these plugins will end up in your plugin .jar file if you don't configure the maven-shade-plugin's includes section properly.

If you are a beginner all that's needed is copy paste the following section and drop it into your `` section of pom.xml (if you already have such section there, remove it).

**Make sure to change `your.plugin.main.package` below to your own package name.**

If you want to compile a dependency to your jar, install it normally through the `` directive, set it's scope to "compile" and then include it again. You can just duplicate the `` and change it for your dependency.

```xml

org.apache.maven.plugins
maven-shade-plugin


3.5.1


package

shade




false



com.pinont.experiences





com.pinont.experiences
your.plugin.main.package.lib


```

## Step 3: extends ExpPlugin on your MainClass

**Experiences** is already extends JavaPlugin and has a method to handle `onEnable()` and `onDisable()` so you don't have to worry about register events, and commands excuter for this case.

Simply change from `JavaPlugin` to `ExpPlugin` and remove `onEnable()` and `onDisable()` then implements a code below.

If you are beginners in this case extends in java can be use for extends only on class.

```java
import com.pinont.experiences.plugin.ExpPlugin;

public class MainClass extends ExpPlugin {

@Override
public void onPluginStart() {
this.addListener(new SomeEventListener());

this.addCommand(new SomeCommand());
}

@Override
public void onPluginStop() { /* Do something when the plugin is being disabled */ }

public static MainClass getInstance() {
return (MainClass) ExpPlugin.getPlugin();
}
}
```

> 🍵 Note: I'm not a profressional code developer, so feel free to **[PR](https://github.com/PinozenTH/Experiences-Lib/pulls)** an enchantment to my code if you think it's better to be.

* [X] Automatic command registration
* [X] Automatic event listener registration
* [ ] Automatic configuration file generation
* [ ] Automatic language file generation
* [ ] Automatic database connection
* [ ] Automatic plugin update checker
* [ ] Automatic plugin metrics
* [X] Simple method to create an Item using `ItemBuilder`
* [X] Simple method to create an Entity using `EntityBuilder` *(Without summoning the entity)* _*Experimental*_
* [X] Create a GUI using `Gui`
* [ ] Rework Economy System
* [X] Rework Scoreboard System _*Experimental*_
* [X] Rework Messaging Method
* [ ] Rework Configuration Method
* [X] New way to select an area _*Experimental*_