Skip to content
RGG200 edited this page May 13, 2024 · 45 revisions

Description

  • I wanted to make this plugin easy to use and easy to make extensions for developers. So i made this API for it. Please leave feedback if you decide to use this API so I can make it better for you and everyone :) !

Setup

For maven users

<dependency> <groupId>com.github.RGG200</groupId> <artefactId>AsceciaCurrencies</artefactId> <version>main-SNAPSHOT</version>

For gradle users:

GroupId: com.github.RGG200 ArtefactId: AsceciaCurrencies Version: main-SNAPSHOT

Using

  • then when making a class that uses the API write this line of code: import me.rgn.asceciacurrencies.CurrenciesAPI.*;
  • Finally write this line of code: CurrenciesAPI (insert name here) = new CurrenciesAPI();
  • and you should be go to go !

Methods

  • Disclamer: put (CurrenciesAPI/whatever the name of your instance is). for these methods like this cAPI.currency.create(p, "oku");

For Configs

  • the plugin has 3 custom configuration files currenciesConfig, playersConfig and languageConfig. to access them just put cAPI.configname. for exemple just use configname.setup() whenever you want to access one.
  • for more information about config files and how to use them go to This link and do additionnal research.

currency.add(Player p, String name, double amount);

  • Adds a certain amount of currency to a player

currency.remove(Player p, String name, double amount);

  • removes a certain amount of currency to a player

currency.create(Player p, String name)

  • Creates a currency, name is the name of the currency.

currency.forceDelete(String name, sender s)

  • Deletes a currency without asking.

currency.delete(Player p, String name)

  • Deletes a currency if you are the author.

currency.deposit(Player p)

  • Deposits an amount of ores that the player's holding.

currency.mint(Player p, double amount)

  • Creates a certain amount of currency.

currency.pay(Player p, Player target, String name, double amount)

  • Transfers money from player to player
  • Target is the player receiving money.

currency.payOffline(Player p, OfflinePlayer target, String name, double amount)

  • Transfers money from player to player even if target is offline
  • Target is the player receiving money.

currency.remove(Player p, double amount)

  • Removes an amount of currency from the player

currency.rename(Player p, String newName)

  • Renames a currency

currency.add(Player p, double amount)

  • Gives an amount of currency to the player.

currency.info(Player p, String name)

  • Shows info to the player about a currency.

currency.list(Player p)

  • Shows a list of all currencies available.

currency.withdraw(Player p, String name, double amount)

  • Withdraws the amount specified times the power of the currency and give ores to the player accordingly.

currency.top(Boolean all, String name, Player p)

  • Shows the balance of the player with every currency.

currency.wallet(Player p)

  • Shows the balance of the player with every currency.

currency.reloadConfig(sender s)

  • Shows the balance of the player with every currency.

currency.setOrePrice(String ore, sender s)

  • sets an ore's price.

currency.setMintMaterialPrice(String ore, sender s)

  • sets an ore's mint value.

currency.language(String language, sender s)

  • sets language.

team.addTeamMember(CommandSender s, String name)

  • Adds team member to currency if author

team.inviteMember(CommandSender s, String name)

  • Adds team member to currency if author

team.kickTeamMember(CommandSender s, String name)

  • kicks team member from currency if author

team.setTeamMemberPermission(CommandSender s, String name, String Permission, Boolean allowordeny)

  • Allows author to set a player's permissions within the author's currency

team.inviteMember(CommandSender s, String playername)

  • Allows player to invite others

team.leaveTeam(CommandSender s)

  • Allows player to leave his team

team.getTeamMemberPermissions(CommandSender s, String playername)

  • Allows to see the player's permission in a team
  • Hello there !
Clone this wiki locally