mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-27 10:49:08 +00:00
Add AlonsoLevelReward
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package net.islandearth.rpgregions.rewards;
|
||||
|
||||
import com.alonsoaliaga.alonsolevels.api.AlonsoLevelsAPI;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class AlonsoLevelReward extends LevelReward {
|
||||
|
||||
public AlonsoLevelReward(int level) {
|
||||
super(level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void award(Player player) {
|
||||
AlonsoLevelsAPI.addLevel(player.getUniqueId(), 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package net.islandearth.rpgregions.rewards;
|
||||
|
||||
public abstract class LevelReward extends DiscoveryReward {
|
||||
|
||||
private final int level;
|
||||
|
||||
public LevelReward(int level) {
|
||||
super();
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Level";
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user