MineConomy
Description
welcome to my first economy API / library I hope you may help me to improve my code just contact me at spigot .
Tutorial How to use it
Firstly get the balance class instance using this code
Now lets try to use all feautures .
Firstly make your own insufficient balance using a listener
You must not forgot to implements listener your class
You must not forgot @EventHandler also
This is the usage of the Event
You may set the player's balance by doing this
Add amount to player's current balance
Reset player's balance from doing this
Withdraw a balance to player by using this
// Note you have no need to worried if the player has not enough balance the insufficientbalance event will throws
Transfer player's balance to another player
// the sender is the one who will send the money and the target player will get the sender's money
Get the player's uuid
Get the player's balance (int)
You must not forgot this at your onEnable()
You must not forgot this at your plugin.yml also
Developer Message
after using my api as a dependancy
I hope you may simply do a review and include the link of your plugin .
Description
welcome to my first economy API / library I hope you may help me to improve my code just contact me at spigot .
Tutorial How to use it
Firstly get the balance class instance using this code
Code (Java):
Balance balance
= Balance.
Balance
(
)
;
Firstly make your own insufficient balance using a listener
You must not forgot to implements listener your class
Code (Java):
public YourClass
implements Listener
This is the usage of the Event
Code (Java):
@EventHandler
public void onEvent (InsufficientBalanceEvent e ) {
// set the insufficient balance message error
e. setInsufficientMessage ( String msg ) ;
}
public void onEvent (InsufficientBalanceEvent e ) {
// set the insufficient balance message error
e. setInsufficientMessage ( String msg ) ;
}
Code (Java):
balance.
set
(Player p,
int amount
)
;
Code (Java):
balance.
add
(Player p,
int amount
)
;
Code (Java):
balance.
reset
(Player p
)
;
// Note you have no need to worried if the player has not enough balance the insufficientbalance event will throws
Code (Java):
balance.
withdraw
(Player p,
int amount
)
;
Code (Java):
balance.
transfer
(Player sender, Player target
)
;
Get the player's uuid
Code (Java):
balance.
getData
(
).
getUUID
(Player p
)
;
Get the player's balance (int)
Code (Java):
balance.
get
(Player p
)
;
Code (Java):
if
(Bukkit.
getServer
(
).
getPluginManager
(
).
getPlugin
(
"MineConomy"
)
==
null
)
{
Bukkit. getLogger ( ). severe ( "Disabled due to no dependancy found" ) ;
Bukkit. getServer ( ). getPluginManager ( ). disablePlugin ( this ) ;
return ;
}
Bukkit. getLogger ( ). severe ( "Disabled due to no dependancy found" ) ;
Bukkit. getServer ( ). getPluginManager ( ). disablePlugin ( this ) ;
return ;
}
Code (Java):
softdepend
:
[MineConomy
]
// or
depend : [MineConomy ]
// or
depend : [MineConomy ]
after using my api as a dependancy
I hope you may simply do a review and include the link of your plugin .
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
MineConomy is a free Minecraft Java mod. Downloaded 980 times (via Spigot). Download it and open it directly in the game.