MinecraftChannel / VoucherTopup

VoucherTopup is a spigot plugin to allow player topup/refill/donate with truemoney wallet gift voucher system and very configurable, 100% free and open source!
https://ci.srv.in.th/job/VoucherTopup
GNU General Public License v3.0
14 stars 6 forks source link
bukkit bukkit-plugin minecraft spigot truemoney



VoucherTopup

VoucherTopup is a spigot plugin to allow player topup/refill/donate with truemoney wallet gift voucher system and very configurable, 100% free and open source!

Get VoucherTopup

Download

Compile

git clone https://github.com/MinecraftChannel/VoucherTopup
cd VoucherTopup
mvn clean install

Requirements

Demo Servers

Developer API

Events ```java import com.google.gson.JsonObject; import th.in.mcch.vouchertopup.api.events.PlayerTopupEvent; import th.in.mcch.vouchertopup.api.events.TopupSuccessEvent; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; public class MyPlugin implements Listener { @EventHandler public void onTopup(PlayerTopupEvent e) { Player player = e.getPlayer(); String input = e.getInput(); e.setCancelled(true); } @EventHandler public void onTopupError(TopupErrorEvent e) { Player player = e.getPlayer(); JsonObject result = e.getResult(); } @EventHandler public void onTopupFailed(TopupFailedEvent e) { Player player = e.getPlayer(); JsonObject result = e.getResult(); } @EventHandler public void onTopupSuccess(TopupSuccessEvent e) { Player player = e.getPlayer(); JsonObject result = e.getResult(); System.out.println(result); JsonObject status = e.getResult().getAsJsonObject().get("status").getAsJsonObject(); System.out.println(status); JsonObject voucher = e.getResult().getAsJsonObject().get("data").getAsJsonObject().get("voucher").getAsJsonObject(); System.out.println(voucher); double amount = voucher.get("redeemed_amount_baht").getAsDouble(); System.out.println("Redeem amount: " + amount + " by " + player.getName()); } } ```

Open Source Libraries