EFFORTAPI
This plugin helps you records players "efforts".
For example, the amount of time a player has mined a diamond ore, e.g 20 times. For each diamond ore mined by the player, the EffortAPI will call an event containing all necessary datas.

Record Amount of Diamond Mined by Player
1. First, make a effort class to record diamond ores mined.
public class MineDiamond implements EffortEvent {
@Override
public EffortType getEventType() {
/* Event Type is BLOCK_BREAK because we want to check diamond ores mined */
return EffortType.BLOCK_BREAK;
}
@Override
public boolean checkPlayer(Event e) {
// Change Event to BlockBreakEvent
BlockBreakEvent ev = (BlockBreakEvent) e;
// Check if the Block Material is a Diamond Ore
if (ev.getBlock().getType() != XMaterial.DIAMOND_ORE.parseMaterial()) return false;
//Check if block break event is cancelled
if (ev.isCancelled()) return false;
// Player has broken a diamond ore, return true.
return true;
}
@Override
public String getEffortID() {
// Put in the ID of the effort.
return "MINEDIAMOND";
}
@Override
public String getDisplayName() {
// Optional
return "Diamond Ores Mined";
}
}2. Register the Effort Event for the API to start recording
@Override
public void onEnable() {
// register the Event with EffortAPI.registerEvent on your onEnable()
EffortAPI.registerEvent(new MineDiamond());
}3. You are done! The API will now record diamond ores mined by the players!
4. Now that you are done, lets give players a reward for mining 100 diamond ores by listening to EffortBukkitEvent.java
@EventHandler
public void giveRewardForMiningDiamond(EffortBukkitEvent e)
{
// Check if the id is MINEDIAMOND
if (e.getEffortEvent().getEffortID().equalsIgnoreCase("MINEDIAMOND")) {
// Give reward
}
}Simple isn't it? You can also add other requirements like checking if the player Mined Stone with Wooden PIckaxe, or Killed Zombies with Raw Fish. etc
Remember to add
softdepend: Effort
in your plugin.yml
- Auto save player data.
- Easy to use API just access EffortAPI.java
- More questions check discord
- Built in command rewards
I first got the idea to make this plugin from a korean comic (manhwa). Where the main character kept repeating the same thing over and over again like Killing 1000 undead and he got the title "undead slayer" etc. You get the idea
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta