Fix {FROM} and {TO}
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group 'sh.okx'
|
group 'sh.okx'
|
||||||
version '3.11'
|
version '3.11.1'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package sh.okx.rankup.prestige;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import sh.okx.rankup.RankupPlugin;
|
import sh.okx.rankup.RankupPlugin;
|
||||||
|
import sh.okx.rankup.messages.MessageBuilder;
|
||||||
import sh.okx.rankup.ranks.Rank;
|
import sh.okx.rankup.ranks.Rank;
|
||||||
import sh.okx.rankup.ranks.requirements.ListRankRequirements;
|
import sh.okx.rankup.ranks.requirements.ListRankRequirements;
|
||||||
import sh.okx.rankup.ranks.requirements.RankRequirements;
|
import sh.okx.rankup.ranks.requirements.RankRequirements;
|
||||||
@@ -41,6 +44,20 @@ public class Prestige extends Rank {
|
|||||||
section.getString("to"));
|
section.getString("to"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void runCommands(Player player, Rank next) {
|
||||||
|
for (String command : commands) {
|
||||||
|
String string = new MessageBuilder(command)
|
||||||
|
.replaceRanks(player, this, next)
|
||||||
|
.replaceFromTo(this)
|
||||||
|
.toString();
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||||
|
string = PlaceholderAPI.setPlaceholders(player, string);
|
||||||
|
}
|
||||||
|
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isIn(Player player) {
|
public boolean isIn(Player player) {
|
||||||
// first prestige does not have a rank
|
// first prestige does not have a rank
|
||||||
|
|||||||
Reference in New Issue
Block a user