Sueta
YO

YOWS Donation Code Gereator

0.1

This plugin is used to generate keys to be used to redeem perks.

·Plugin

Donation Code Generator
This plugin is used to create randomly generated codes for claiming specials prizes. You have the ability to run commands, send global messages, or spawn items (Items can include enchantments, custom names, and lores.). All codes can be created to expire on a set date. All uses of the codes are logged and also logs who they were created by. Finally, I would like to mention that this plugin has a very basic and easy to use API for incorporation for your own plugins. Whether it be generating codes via a plugin or checking the status of the current code.

Source: This is included inside the download

Video of creation of this plugin:
YouTube

IMPORTANT !!! MUST READ !!!
If you are going to use this plugin you must import the database file into a table on a mysql server before running this plugin. This is required before using this plugin. It will not work if you just try to run it without taking this step.

MYSQL IS REQUIRED!!

Features

  • Generate custom codes
  • Claim codes with ease
  • Reload the plugin
  • [API] Generate custom codes
  • [API] Check the status of the codes
  • [API] Expire the code
  • [CONSOLE] Generate codes via console
  • [Perks] Can use commands
  • [Perks] Can give custom items
  • [Perks] Can send broadcast messages
  • [Perks] Can send private messages
  • Open Source!

Configs
Perks.yml

RANK0001:
- C:manuadd %USER% FLUX
- C:eco give %USER% 100000
- B:&a%USER% &7has just claimed his &9Flux &7rank from donating!
MONEY0001:
- C:eco give %USER% 100000
- M:&aCongrats on claiming this code!
- B:&a%USER% &7has just claimed his &9$100,000 &7from donating!
ITEM001:
- I:DIAMOND:0:1:none:&aFree!:&cItem Lore

Config.yml

Database:
  Host: localhost
  Port: 3306
  Data: table
  User: username
  Pass: password
allowed-staff:
- c80c3e49-f1cc-39ef-b2e7-0cf4655ae704

Commands
/gencode {SKU}
Permission Required: OP and UUID in Config
Description: Generates a code using the sku defined in the perks.yml

/claimcode {CODE}
Permission Required: donator.donate
Description: Allows the user to claim any code

/dreload
Permission Required: donator.reload
Description: Reloads both config files (config.yml and perks.yml)

API
String codeGen(String candidateChars, int length)
Description: Just random unused type code

void codeExpire(String code)
Description: expires the code entered in the string

String getCode(String code)
Description: Returns expired, used or the sku depending on the status of the code

String addCode(String by, String sku)
Description: Creates a code. It takes in who it was made by and the sku it uses

Similar projects

Plugin →