UnityGen

Welcome to the Official Documentation for UnityGen - The #1 Generator Plugin within SpigotMC, with Item & Command reward support and lots more.

Installation

  1. Purchase & Download UnityGen.
  2. Place UnityGen.jar in your /plugins folder.
  3. Restart your Server.
  4. Type /unitygen

Commands

  • /gen give <player> <tier> [amount]
  • /gen givefuel <player> <tier> [amount]
  • /gen giveall <tier> [amount]
  • /gen giveallfuel <tier> [amount]
  • /gen list
  • /gen list fuel
  • /gen gui
  • /gen reload
  • /gen debug

Permissions

  • unitygen.reload
  • unitygen.give
  • unitygen.giveall
  • unitygen.version
  • unitygen.list
  • unitygen.bypass

Placeholders

PlaceholderAPI - You must have PlaceholderAPI installed.

  • %unitygen_usergens%
  • %unitygen_userlimit%

MVdWPlaceholderAPI - You must have MVdWPlaceholderAPI installed.

  • {unitygen_usergens}
  • {unitygen_userlimit}

Addons

Below are different Addons created by Developers with UnityGen's built in API and Custom Events.

Holograms

UnityGen has Hologram Support for Generators, In order to use these you must have HolographicDisplays installed.

Add the below snippet to a generator of your choice, of course you can customise the below to your liking!

hologram:
- "&4%player%'s &cGenerator"
- "&8» &7Tier: &f%tier%"
- "&8» &7Generation: &f%interval% Seconds"

API

Below are methods that can be used to hook into the plugin by a Developer.

UnityGenAPI.getPlayerGens(UUID UUID);
» Returns List<String> of Generators
UnityGenAPI.getItemStack(String tier, Integer amount);
» Returns ItemStack of Tier
UnityGenAPI.isValidTier(String tier);
» Returns boolean if generator exists
UnityGenAPI.giveGenerator(Player p, String tier, Integer amount);
» Give <p> a <tier> generator of <amount>
UnityGenAPI.getPlayerLimit(Player p);
» Returns Integer of Players Limit
UnityGenAPI.isItemStackGen(ItemStack is);
» Returns boolean if ItemStack is valid

Custom Events

@EventHandler
public void onGeneratorPlace(UGPlaceEvent e){
// code
}
@EventHandler
public void onGeneratorInteract(UGInteractEvent e){
// code
}
@EventHandler
public void onItemGeneration(UGItemGenerateEvent e){
// code
}
@EventHandler
public void onCommandGeneration(UGCommandGenerateEvent e){
// code
}
@EventHandler
public void onAdminInteract(UGAdminInteractEvent e){
// code
}
@EventHandler
public void onFuelEvent(UGFuelEvent e){
// code
}
@EventHandler
public void onFuelOtherEvent(UGFuelOtherEvent e){
// code
}

Expiring Generators

Since version 2.6.0, UnityGen allows for defining temporary generators.

To create an expiring generator, we must set

expire: -1 

to

expire: <seconds>

Once done, once the generator is placed a player will be unable to remove this generator (unless an admin removes it).

You can use the placeholder %expire% in an expiring generator hologram.

Fuel System

Since version 2.7.0, UnityGen allows defining of fuels that are capable of refilling expiring generators.

After the above steps are followed, head into fuel.yml and you can define each fuel. If you wish for a fuel type to be applicable to only certain generators, edit the following to your needs.

applicable:
- GEN_NAME

QR Code
QR Code unitygen (generated for current page)