make group changes world specific
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group 'sh.okx'
|
group 'sh.okx'
|
||||||
version '3.3.2-beta'
|
version '3.3.2-beta.1'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class AutoRankup extends BukkitRunnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
if(player.hasPermission("rankup.auto")) {
|
if (player.hasPermission("rankup.auto")) {
|
||||||
if (rankup.checkRankup(player, false)) {
|
if (rankup.checkRankup(player, false)) {
|
||||||
rankup.rankup(player);
|
rankup.rankup(player);
|
||||||
} else if (rankup.getPrestiges() != null && rankup.checkPrestige(player, false)) {
|
} else if (rankup.getPrestiges() != null && rankup.checkPrestige(player, false)) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class RankList<T extends Rank> {
|
|||||||
T t = getFirst();
|
T t = getFirst();
|
||||||
do {
|
do {
|
||||||
t = next(t);
|
t = next(t);
|
||||||
} while(!t.isLast());
|
} while (!t.isLast());
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package sh.okx.rankup;
|
package sh.okx.rankup;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.google.common.base.Preconditions;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.milkbowl.vault.economy.Economy;
|
import net.milkbowl.vault.economy.Economy;
|
||||||
import net.milkbowl.vault.permission.Permission;
|
import net.milkbowl.vault.permission.Permission;
|
||||||
@@ -15,7 +14,11 @@ import org.bukkit.event.inventory.InventoryType;
|
|||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import sh.okx.rankup.commands.*;
|
import sh.okx.rankup.commands.InfoCommand;
|
||||||
|
import sh.okx.rankup.commands.PrestigeCommand;
|
||||||
|
import sh.okx.rankup.commands.PrestigesCommand;
|
||||||
|
import sh.okx.rankup.commands.RanksCommand;
|
||||||
|
import sh.okx.rankup.commands.RankupCommand;
|
||||||
import sh.okx.rankup.gui.Gui;
|
import sh.okx.rankup.gui.Gui;
|
||||||
import sh.okx.rankup.gui.GuiListener;
|
import sh.okx.rankup.gui.GuiListener;
|
||||||
import sh.okx.rankup.messages.EmptyMessageBuilder;
|
import sh.okx.rankup.messages.EmptyMessageBuilder;
|
||||||
@@ -30,22 +33,26 @@ import sh.okx.rankup.ranks.Rankups;
|
|||||||
import sh.okx.rankup.requirements.OperationRegistry;
|
import sh.okx.rankup.requirements.OperationRegistry;
|
||||||
import sh.okx.rankup.requirements.Requirement;
|
import sh.okx.rankup.requirements.Requirement;
|
||||||
import sh.okx.rankup.requirements.RequirementRegistry;
|
import sh.okx.rankup.requirements.RequirementRegistry;
|
||||||
import sh.okx.rankup.requirements.operation.*;
|
import sh.okx.rankup.requirements.operation.AllOperation;
|
||||||
import sh.okx.rankup.requirements.requirement.*;
|
import sh.okx.rankup.requirements.operation.AnyOperation;
|
||||||
import sh.okx.rankup.requirements.requirement.advancedachievements.*;
|
import sh.okx.rankup.requirements.operation.NoneOperation;
|
||||||
import sh.okx.rankup.requirements.requirement.mcmmo.*;
|
import sh.okx.rankup.requirements.operation.OneOperation;
|
||||||
|
import sh.okx.rankup.requirements.requirement.GroupRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.MoneyRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.PermissionRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.PlaceholderRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.PlaytimeMinutesRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.XpLevelRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.advancedachievements.AdvancedAchievementsAchievementRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.advancedachievements.AdvancedAchievementsTotalRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.mcmmo.McMMOPowerLevelRequirement;
|
||||||
|
import sh.okx.rankup.requirements.requirement.mcmmo.McMMOSkillRequirement;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ResourceBundle;
|
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
@@ -318,8 +325,8 @@ public class Rankup extends JavaPlugin {
|
|||||||
|
|
||||||
oldRank.applyRequirements(player);
|
oldRank.applyRequirements(player);
|
||||||
|
|
||||||
permissions.playerRemoveGroup(null, player, oldRank.getRank());
|
permissions.playerRemoveGroup(player, oldRank.getRank());
|
||||||
permissions.playerAddGroup(null, player, rank.getRank());
|
permissions.playerAddGroup(player, rank.getRank());
|
||||||
|
|
||||||
getMessage(oldRank, Message.SUCCESS_PUBLIC)
|
getMessage(oldRank, Message.SUCCESS_PUBLIC)
|
||||||
.failIfEmpty()
|
.failIfEmpty()
|
||||||
@@ -393,12 +400,12 @@ public class Rankup extends JavaPlugin {
|
|||||||
|
|
||||||
oldPrestige.applyRequirements(player);
|
oldPrestige.applyRequirements(player);
|
||||||
|
|
||||||
permissions.playerRemoveGroup(null, player, oldPrestige.getFrom());
|
permissions.playerRemoveGroup(player, oldPrestige.getFrom());
|
||||||
permissions.playerAddGroup(null, player, oldPrestige.getTo());
|
permissions.playerAddGroup(player, oldPrestige.getTo());
|
||||||
if (oldPrestige.getRank() != null) {
|
if (oldPrestige.getRank() != null) {
|
||||||
permissions.playerRemoveGroup(null, player, oldPrestige.getRank());
|
permissions.playerRemoveGroup(player, oldPrestige.getRank());
|
||||||
}
|
}
|
||||||
permissions.playerAddGroup(null, player, prestige.getRank());
|
permissions.playerAddGroup(player, prestige.getRank());
|
||||||
|
|
||||||
getMessage(oldPrestige, Message.PRESTIGE_SUCCESS_PUBLIC)
|
getMessage(oldPrestige, Message.PRESTIGE_SUCCESS_PUBLIC)
|
||||||
.failIfEmpty()
|
.failIfEmpty()
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ public class RankupRegisterEvent extends Event {
|
|||||||
@Getter
|
@Getter
|
||||||
private final Rankup plugin;
|
private final Rankup plugin;
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
public RequirementRegistry getRequirementRegistry() {
|
public RequirementRegistry getRequirementRegistry() {
|
||||||
return plugin.getRequirementRegistry();
|
return plugin.getRequirementRegistry();
|
||||||
}
|
}
|
||||||
@@ -41,8 +45,4 @@ public class RankupRegisterEvent extends Event {
|
|||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class RanksCommand implements CommandExecutor {
|
|||||||
message = Message.RANKS_INCOMPLETE;
|
message = Message.RANKS_INCOMPLETE;
|
||||||
} else {
|
} else {
|
||||||
// helpful message to say there is a null rankup
|
// helpful message to say there is a null rankup
|
||||||
if(next == null) {
|
if (next == null) {
|
||||||
plugin.getMessage(Message.INVALID_RANKUP).failIfEmpty().send(sender);
|
plugin.getMessage(Message.INVALID_RANKUP).failIfEmpty().send(sender);
|
||||||
plugin.getLogger().severe("Rankup from " + rank.getName() + " to " + rank.getNext() +
|
plugin.getLogger().severe("Rankup from " + rank.getName() + " to " + rank.getNext() +
|
||||||
" is defined but " + rank.getNext() + " does not exist.");
|
" is defined but " + rank.getNext() + " does not exist.");
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class RankupCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Rank next = rankups.next(rank);
|
Rank next = rankups.next(rank);
|
||||||
if(next == null) {
|
if (next == null) {
|
||||||
plugin.getLogger().severe("Rankup from " + rank.getName() + " to " + rank.getNext() +
|
plugin.getLogger().severe("Rankup from " + rank.getName() + " to " + rank.getNext() +
|
||||||
" is defined but " + rank.getNext() + " does not exist.");
|
" is defined but " + rank.getNext() + " does not exist.");
|
||||||
plugin.getMessage(Message.INVALID_RANKUP).failIfEmpty().send(player);
|
plugin.getMessage(Message.INVALID_RANKUP).failIfEmpty().send(player);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class GuiListener implements Listener {
|
|||||||
|
|
||||||
if (gui.getRankup().isSimilar(e.getCurrentItem())) {
|
if (gui.getRankup().isSimilar(e.getCurrentItem())) {
|
||||||
Bukkit.getScheduler().runTask(plugin, player::closeInventory);
|
Bukkit.getScheduler().runTask(plugin, player::closeInventory);
|
||||||
if(gui.isPrestige()) {
|
if (gui.isPrestige()) {
|
||||||
plugin.prestige(player);
|
plugin.prestige(player);
|
||||||
} else {
|
} else {
|
||||||
plugin.rankup(player);
|
plugin.rankup(player);
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ public class MessageBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MessageBuilder replaceFirstPrestige(Rank rank, Prestiges prestiges, String with) {
|
public MessageBuilder replaceFirstPrestige(Rank rank, Prestiges prestiges, String with) {
|
||||||
if(prestiges != null && prestiges.getFirst().equals(rank)) {
|
if (prestiges != null && prestiges.getFirst().equals(rank)) {
|
||||||
replace(Variable.OLD_RANK, with);
|
replace(Variable.OLD_RANK, with);
|
||||||
replace(Variable.OLD_RANK_NAME, with);
|
replace(Variable.OLD_RANK_NAME, with);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MessageBuilder replaceRanks(CommandSender player, Rank rank) {
|
public MessageBuilder replaceRanks(CommandSender player, Rank rank) {
|
||||||
@@ -72,7 +72,7 @@ public class MessageBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MessageBuilder replaceFromTo(Rank rank) {
|
public MessageBuilder replaceFromTo(Rank rank) {
|
||||||
if(rank instanceof Prestige) {
|
if (rank instanceof Prestige) {
|
||||||
Prestige prestige = (Prestige) rank;
|
Prestige prestige = (Prestige) rank;
|
||||||
replace(Variable.FROM, prestige.getFrom());
|
replace(Variable.FROM, prestige.getFrom());
|
||||||
replace(Variable.TO, prestige.getTo());
|
replace(Variable.TO, prestige.getTo());
|
||||||
|
|||||||
@@ -2,28 +2,20 @@ package sh.okx.rankup.placeholders;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import me.clip.placeholderapi.PlaceholderAPI;
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import sh.okx.rankup.Rankup;
|
import sh.okx.rankup.Rankup;
|
||||||
import sh.okx.rankup.prestige.Prestige;
|
|
||||||
import sh.okx.rankup.prestige.Prestiges;
|
|
||||||
import sh.okx.rankup.ranks.Rank;
|
|
||||||
import sh.okx.rankup.ranks.Rankups;
|
|
||||||
import sh.okx.rankup.requirements.Requirement;
|
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
public class Placeholders {
|
public class Placeholders {
|
||||||
private final Rankup plugin;
|
private final Rankup plugin;
|
||||||
private boolean registered;
|
|
||||||
@Getter
|
@Getter
|
||||||
private final DecimalFormat moneyFormat;
|
private final DecimalFormat moneyFormat;
|
||||||
@Getter
|
@Getter
|
||||||
private final DecimalFormat percentFormat;
|
private final DecimalFormat percentFormat;
|
||||||
@Getter
|
@Getter
|
||||||
private final DecimalFormat simpleFormat;
|
private final DecimalFormat simpleFormat;
|
||||||
|
private boolean registered;
|
||||||
|
|
||||||
public Placeholders(Rankup plugin) {
|
public Placeholders(Rankup plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
@@ -42,7 +34,7 @@ public class Placeholders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void unregister() {
|
public void unregister() {
|
||||||
if(registered) {
|
if (registered) {
|
||||||
PlaceholderAPI.unregisterPlaceholderHook("rankup");
|
PlaceholderAPI.unregisterPlaceholderHook("rankup");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class RankupExpansion extends PlaceholderExpansion {
|
|||||||
Prestiges prestiges = plugin.getPrestiges();
|
Prestiges prestiges = plugin.getPrestiges();
|
||||||
Prestige prestige = null;
|
Prestige prestige = null;
|
||||||
Prestige nextPrestige = null;
|
Prestige nextPrestige = null;
|
||||||
if(prestiges != null) {
|
if (prestiges != null) {
|
||||||
prestige = prestiges.getByPlayer(player);
|
prestige = prestiges.getByPlayer(player);
|
||||||
nextPrestige = prestiges.next(prestige);
|
nextPrestige = prestiges.next(prestige);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class Prestige extends Rank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEligable(Player player) {
|
public boolean isEligable(Player player) {
|
||||||
String[] groups = plugin.getPermissions().getPlayerGroups(null, player);
|
String[] groups = plugin.getPermissions().getPlayerGroups(player);
|
||||||
for (String group : groups) {
|
for (String group : groups) {
|
||||||
if (group.equalsIgnoreCase(from)) {
|
if (group.equalsIgnoreCase(from)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class Prestiges extends RankList<Prestige> {
|
|||||||
@Override
|
@Override
|
||||||
public Prestige getByPlayer(Player player) {
|
public Prestige getByPlayer(Player player) {
|
||||||
Prestige prestige = super.getByPlayer(player);
|
Prestige prestige = super.getByPlayer(player);
|
||||||
if(prestige == null) {
|
if (prestige == null) {
|
||||||
return getFirst();
|
return getFirst();
|
||||||
} else {
|
} else {
|
||||||
return prestige;
|
return prestige;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import sh.okx.rankup.messages.MessageBuilder;
|
|||||||
import sh.okx.rankup.requirements.DeductibleRequirement;
|
import sh.okx.rankup.requirements.DeductibleRequirement;
|
||||||
import sh.okx.rankup.requirements.Operation;
|
import sh.okx.rankup.requirements.Operation;
|
||||||
import sh.okx.rankup.requirements.Requirement;
|
import sh.okx.rankup.requirements.Requirement;
|
||||||
import sh.okx.rankup.requirements.operation.AllOperation;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -40,7 +39,7 @@ public class Rank {
|
|||||||
if (requirementsSection != null) {
|
if (requirementsSection != null) {
|
||||||
requirements = plugin.getRequirementRegistry().getRequirements(requirementsSection);
|
requirements = plugin.getRequirementRegistry().getRequirements(requirementsSection);
|
||||||
operation = plugin.getOperationRegistry().getOperation(section.getString("operation"));
|
operation = plugin.getOperationRegistry().getOperation(section.getString("operation"));
|
||||||
} else if(section.contains("next")) {
|
} else if (section.contains("next")) {
|
||||||
plugin.getLogger().severe("Rank " + section.getName() + " has no requirements.");
|
plugin.getLogger().severe("Rank " + section.getName() + " has no requirements.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -61,7 +60,7 @@ public class Rank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isIn(Player player) {
|
public boolean isIn(Player player) {
|
||||||
String[] groups = plugin.getPermissions().getPlayerGroups(null, player);
|
String[] groups = plugin.getPermissions().getPlayerGroups(player);
|
||||||
for (String group : groups) {
|
for (String group : groups) {
|
||||||
if (group.equalsIgnoreCase(rank)) {
|
if (group.equalsIgnoreCase(rank)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package sh.okx.rankup.requirements;
|
package sh.okx.rankup.requirements;
|
||||||
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class GroupRequirement extends Requirement {
|
|||||||
int matched = 0;
|
int matched = 0;
|
||||||
String[] groups = getValueString().split(" ");
|
String[] groups = getValueString().split(" ");
|
||||||
for (String requiredGroup : groups) {
|
for (String requiredGroup : groups) {
|
||||||
for (String group : plugin.getPermissions().getPlayerGroups(null, player)) {
|
for (String group : plugin.getPermissions().getPlayerGroups(player)) {
|
||||||
if (group.equalsIgnoreCase(requiredGroup)) {
|
if (group.equalsIgnoreCase(requiredGroup)) {
|
||||||
matched++;
|
matched++;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ public class PermissionRequirement extends Requirement {
|
|||||||
public double getRemaining(Player player) {
|
public double getRemaining(Player player) {
|
||||||
int matched = 0;
|
int matched = 0;
|
||||||
String[] permissions = getValueString().split(" ");
|
String[] permissions = getValueString().split(" ");
|
||||||
for(String permission : permissions) {
|
for (String permission : permissions) {
|
||||||
if(player.hasPermission(permission)) {
|
if (player.hasPermission(permission)) {
|
||||||
matched++;
|
matched++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class PlaceholderRequirement extends Requirement {
|
|||||||
public boolean check(Player player) {
|
public boolean check(Player player) {
|
||||||
String[] parts = getValueString().split(" ");
|
String[] parts = getValueString().split(" ");
|
||||||
String parsed = PlaceholderAPI.setPlaceholders(player, parts[0]);
|
String parsed = PlaceholderAPI.setPlaceholders(player, parts[0]);
|
||||||
if(!PlaceholderAPI.containsPlaceholders(parts[0]) || parsed.equals(parts[0])) {
|
if (!PlaceholderAPI.containsPlaceholders(parts[0]) || parsed.equals(parts[0])) {
|
||||||
throw new IllegalArgumentException(parts[0] + " is not a PlaceholderAPI placeholder!");
|
throw new IllegalArgumentException(parts[0] + " is not a PlaceholderAPI placeholder!");
|
||||||
} else if (parts.length < 3) {
|
} else if (parts.length < 3) {
|
||||||
throw new IllegalArgumentException("Placeholder requirements must be in the form %placeholder% <operation> string");
|
throw new IllegalArgumentException("Placeholder requirements must be in the form %placeholder% <operation> string");
|
||||||
@@ -26,7 +26,7 @@ public class PlaceholderRequirement extends Requirement {
|
|||||||
String value = parts[2];
|
String value = parts[2];
|
||||||
|
|
||||||
// string operations
|
// string operations
|
||||||
switch(parts[1]) {
|
switch (parts[1]) {
|
||||||
case "=":
|
case "=":
|
||||||
return parsed.equals(value);
|
return parsed.equals(value);
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ public class PlaceholderRequirement extends Requirement {
|
|||||||
// numeric operations
|
// numeric operations
|
||||||
double p = Double.parseDouble(parsed);
|
double p = Double.parseDouble(parsed);
|
||||||
double v = Double.parseDouble(value);
|
double v = Double.parseDouble(value);
|
||||||
switch(parts[1]) {
|
switch (parts[1]) {
|
||||||
case ">":
|
case ">":
|
||||||
return p > v;
|
return p > v;
|
||||||
case ">=":
|
case ">=":
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: Rankup
|
name: Rankup
|
||||||
version: 3.3.2-beta
|
version: 3.3.2-beta.1
|
||||||
main: sh.okx.rankup.Rankup
|
main: sh.okx.rankup.Rankup
|
||||||
author: Okx
|
author: Okx
|
||||||
depend: [Vault]
|
depend: [Vault]
|
||||||
@@ -7,47 +7,47 @@ softdepend: [PlaceholderAPI, mcMMO, AdvancedAchievements]
|
|||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
rankup:
|
rankup:
|
||||||
permission: rankup.rankup
|
permission: rankup.rankup
|
||||||
description: Rankup.
|
description: Rankup.
|
||||||
rankup3:
|
rankup3:
|
||||||
permission: rankup3.info
|
permission: rankup3.info
|
||||||
description: View Rankup version and perform some administrative commands.
|
description: View Rankup version and perform some administrative commands.
|
||||||
# support the old command
|
# support the old command
|
||||||
aliases: [pru]
|
aliases: [pru]
|
||||||
ranks:
|
ranks:
|
||||||
permission: rankup.ranks
|
permission: rankup.ranks
|
||||||
description: List all the ranks.
|
description: List all the ranks.
|
||||||
prestige:
|
prestige:
|
||||||
permission: rankup.prestige
|
permission: rankup.prestige
|
||||||
description: Prestige.
|
description: Prestige.
|
||||||
prestiges:
|
prestiges:
|
||||||
permission: rankup.prestiges
|
permission: rankup.prestiges
|
||||||
description: List all the prestiges.
|
description: List all the prestiges.
|
||||||
permissions:
|
permissions:
|
||||||
rankup.*:
|
rankup.*:
|
||||||
children:
|
children:
|
||||||
rankup.info: true
|
rankup.info: true
|
||||||
rankup.rankup: true
|
rankup.rankup: true
|
||||||
rankup.checkversion: true
|
rankup.checkversion: true
|
||||||
rankup.ranks: true
|
rankup.ranks: true
|
||||||
rankup.reload: true
|
rankup.reload: true
|
||||||
rankup.prestige: true
|
rankup.prestige: true
|
||||||
rankup.prestiges: true
|
rankup.prestiges: true
|
||||||
rankup.auto: true
|
rankup.auto: true
|
||||||
rankup.info:
|
rankup.info:
|
||||||
default: true
|
default: true
|
||||||
rankup.rankup:
|
rankup.rankup:
|
||||||
default: true
|
default: true
|
||||||
rankup.checkversion:
|
rankup.checkversion:
|
||||||
default: op
|
default: op
|
||||||
rankup.reload:
|
rankup.reload:
|
||||||
default: op
|
default: op
|
||||||
rankup.ranks:
|
rankup.ranks:
|
||||||
default: true
|
default: true
|
||||||
rankup.prestige:
|
rankup.prestige:
|
||||||
default: true
|
default: true
|
||||||
rankup.prestiges:
|
rankup.prestiges:
|
||||||
default: true
|
default: true
|
||||||
rankup.auto:
|
rankup.auto:
|
||||||
default: true
|
default: true
|
||||||
@@ -35,8 +35,8 @@ Cexample:
|
|||||||
rank: 'C'
|
rank: 'C'
|
||||||
next: 'Dexample'
|
next: 'Dexample'
|
||||||
requirements:
|
requirements:
|
||||||
money: 5000
|
money: 5000
|
||||||
xp-level: 2
|
xp-level: 2
|
||||||
# you can have a custom messages for each rank
|
# you can have a custom messages for each rank
|
||||||
# you can use this to list the requirements needed.
|
# you can use this to list the requirements needed.
|
||||||
rankup:
|
rankup:
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package sh.okx.rankup.messages;
|
|||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.hamcrest.CoreMatchers.instanceOf;
|
||||||
import static org.hamcrest.CoreMatchers.*;
|
import static org.junit.Assert.assertThat;
|
||||||
|
|
||||||
|
|
||||||
public class MessageBuilderTest {
|
public class MessageBuilderTest {
|
||||||
|
|||||||
Reference in New Issue
Block a user