mirror of
https://github.com/RoinujNosde/SimpleClans.git
synced 2026-11-05 01:10:04 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4a253efb7 | ||
|
|
f34b947e59 |
No files matched your search
+12
-3
@@ -1,5 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
@@ -11,12 +20,12 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.13-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.MilkBowl:VaultAPI:1.7" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13.1-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<name>SimpleClans</name>
|
||||
<version>2.14.3</version>
|
||||
<version>2.14.6</version>
|
||||
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
@@ -130,7 +130,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<version>2.14.4.1</version>
|
||||
<version>2.14.6</version>
|
||||
<name>SimpleClans</name>
|
||||
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -24,6 +24,8 @@ import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -51,11 +53,14 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
private int homeX = 0;
|
||||
private int homeY = 0;
|
||||
private int homeZ = 0;
|
||||
private String homeWorld = "";
|
||||
private float homeYaw = 0;
|
||||
private float homePitch = 0;
|
||||
private @Nullable String homeWorld = "";
|
||||
private boolean allowWithdraw = false;
|
||||
private boolean allowDeposit = true;
|
||||
private boolean feeEnabled;
|
||||
private List<Rank> ranks = new ArrayList<>();
|
||||
private String defaultRank = null;
|
||||
private @Nullable ItemStack banner;
|
||||
|
||||
/**
|
||||
@@ -1060,6 +1065,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
cp.setClan(this);
|
||||
cp.setLeader(false);
|
||||
cp.setTrusted(SimpleClans.getInstance().getSettingsManager().isClanTrustByDefault());
|
||||
if (defaultRank != null) {
|
||||
cp.setRank(defaultRank);
|
||||
}
|
||||
|
||||
importMember(cp);
|
||||
|
||||
@@ -1633,6 +1641,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
json.put("homeX", homeX);
|
||||
json.put("homeY", homeY);
|
||||
json.put("homeZ", homeZ);
|
||||
json.put("homePitch", homePitch);
|
||||
json.put("homeYaw", homeYaw);
|
||||
json.put("homeWorld", homeWorld == null ? "" : homeWorld);
|
||||
|
||||
return json.toString();
|
||||
@@ -1674,16 +1684,19 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
if (flag.equals("homeZ")) {
|
||||
homeZ = ((Long) flags.get(flag)).intValue();
|
||||
}
|
||||
|
||||
if (flag.equals("homeYaw")) {
|
||||
homeYaw = ((Double) flags.get(flag)).floatValue();
|
||||
}
|
||||
if (flag.equals("homePitch")) {
|
||||
homePitch = ((Double) flags.get(flag)).floatValue();
|
||||
}
|
||||
if (flag.equals("homeWorld")) {
|
||||
homeWorld = (String) flags.get(flag);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
for (StackTraceElement el : ex.getStackTrace()) {
|
||||
System.out.print("Failed reading flag: " + flag);
|
||||
System.out.print("Value: " + flags.get(flag));
|
||||
System.out.print(el.toString());
|
||||
}
|
||||
Logger logger = SimpleClans.getInstance().getLogger();
|
||||
logger.log(Level.SEVERE, String.format("Failed reading flag: %s, value: %s", flag,
|
||||
flags.get(flag)), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1710,6 +1723,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
homeY = 0;
|
||||
homeX = 0;
|
||||
homeZ = 0;
|
||||
homePitch = 0;
|
||||
homeYaw = 0;
|
||||
homeWorld = null;
|
||||
} else {
|
||||
home.setY(home.getBlockY() + 1);
|
||||
@@ -1717,7 +1732,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
homeX = home.getBlockX();
|
||||
homeY = home.getBlockY();
|
||||
homeZ = home.getBlockZ();
|
||||
homeWorld = home.getWorld().getName();
|
||||
homeYaw = home.getYaw();
|
||||
homePitch = home.getPitch();
|
||||
homeWorld = home.getWorld() == null ? null : home.getWorld().getName();
|
||||
}
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
}
|
||||
@@ -1736,9 +1753,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
if (!(world.getBlockAt(homeX, homeY, homeZ).getType().equals(XMaterial.AIR.parseMaterial())) ||
|
||||
!(world.getBlockAt(homeX, homeY + 1, homeZ).getType().equals(XMaterial.AIR.parseMaterial()))
|
||||
|| homeY == 0) {
|
||||
return new Location(world, homeX, world.getHighestBlockYAt(homeX, homeZ), homeZ);
|
||||
return new Location(world, homeX, world.getHighestBlockYAt(homeX, homeZ), homeZ, homeYaw, homePitch);
|
||||
} else {
|
||||
return new Location(world, homeX, homeY, homeZ);
|
||||
return new Location(world, homeX, homeY, homeZ, homeYaw, homePitch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1887,6 +1904,29 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default rank for this clan.
|
||||
*
|
||||
* @param name The name of the rank to be set as default
|
||||
*/
|
||||
public void setDefaultRank(@Nullable String name) {
|
||||
// I don't know how this could happen, but if it somehow does, here's a check for it
|
||||
if (!hasRank(name)) {
|
||||
defaultRank = null;
|
||||
} else {
|
||||
defaultRank = name;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default rank for this clan.
|
||||
*
|
||||
* @return The default rank or null if there is no default
|
||||
*/
|
||||
public @Nullable String getDefaultRank() {
|
||||
return defaultRank;
|
||||
}
|
||||
|
||||
public void setBanner(@Nullable ItemStack banner) {
|
||||
if (banner == null) {
|
||||
this.banner = null;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.KDRFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.VanishUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -77,51 +79,74 @@ public class Helper {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a JSON String to a list of Ranks
|
||||
*
|
||||
* @param json the JSON String
|
||||
* @return a list of ranks or null if the JSON String is null/empty
|
||||
*/
|
||||
public static @Nullable List<Rank> ranksFromJson(String json) {
|
||||
if (json != null && !json.isEmpty()) {
|
||||
try {
|
||||
JSONObject jo = (JSONObject) new JSONParser().parse(json);
|
||||
Object ranks = jo.get("ranks");
|
||||
if (ranks != null) {
|
||||
JSONArray array = (JSONArray) ranks;
|
||||
List<Rank> rankList = new ArrayList<>();
|
||||
for (Object o : array) {
|
||||
JSONObject r = (JSONObject) o;
|
||||
String name = (String) r.get("name");
|
||||
String displayName = (String) r.get("displayName");
|
||||
Set<String> permissions = new HashSet<>();
|
||||
for (Object p : (JSONArray) r.get("permissions")) {
|
||||
permissions.add((String) p);
|
||||
}
|
||||
Rank rank = new Rank(name, displayName, permissions);
|
||||
rankList.add(rank);
|
||||
}
|
||||
|
||||
return rankList;
|
||||
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
public static @Nullable JSONObject parseJson(String json) {
|
||||
if (json != null && !json.isEmpty()) {
|
||||
try {
|
||||
return (JSONObject) new JSONParser().parse(json);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a list of Ranks to a JSON String
|
||||
* Parses a list of ranks from the specified JSONObject
|
||||
*
|
||||
* @param ranks
|
||||
* @param jo the JSON Object
|
||||
* @return a list of ranks or null if the JSON String is null/empty
|
||||
*/
|
||||
public static @Nullable List<Rank> ranksFromJson(JSONObject jo) {
|
||||
if (jo != null && !jo.isEmpty()) {
|
||||
Object ranks = jo.get("ranks");
|
||||
if (ranks != null) {
|
||||
JSONArray array = (JSONArray) ranks;
|
||||
List<Rank> rankList = new ArrayList<>();
|
||||
for (Object o : array) {
|
||||
JSONObject r = (JSONObject) o;
|
||||
String name = (String) r.get("name");
|
||||
String displayName = (String) r.get("displayName");
|
||||
Set<String> permissions = new HashSet<>();
|
||||
for (Object p : (JSONArray) r.get("permissions")) {
|
||||
permissions.add((String) p);
|
||||
}
|
||||
Rank rank = new Rank(name, displayName, permissions);
|
||||
rankList.add(rank);
|
||||
}
|
||||
|
||||
return rankList;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the default rank from the specified JSONObject
|
||||
*
|
||||
* @param jo the JSON object
|
||||
* @return the default rank or null if not found and/or it does not exist
|
||||
*/
|
||||
public static @Nullable String defaultRankFromJson(JSONObject jo) {
|
||||
if (jo != null && !jo.isEmpty()) {
|
||||
if (!jo.containsKey("defaultRank")) {
|
||||
return null;
|
||||
} else {
|
||||
return (String) jo.get("defaultRank");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a list of ranks and the default rank to a JSON String
|
||||
*
|
||||
* @param ranks the ranks
|
||||
* @param defaultRank the default rank
|
||||
* @return a JSON String
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static String ranksToJson(List<Rank> ranks) {
|
||||
public static String ranksToJson(List<Rank> ranks, @Nullable String defaultRank) {
|
||||
if (ranks == null)
|
||||
ranks = new ArrayList<Rank>();
|
||||
|
||||
@@ -140,6 +165,7 @@ public class Helper {
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("ranks", array);
|
||||
object.put("defaultRank", defaultRank);
|
||||
return object.toJSONString();
|
||||
}
|
||||
|
||||
@@ -202,7 +228,8 @@ public class Helper {
|
||||
List<Player> players = SimpleClans.getInstance().getServer().matchPlayer(playerName);
|
||||
|
||||
if (players.size() == 1) {
|
||||
return SimpleClans.getInstance().getPermissionsManager().getPrefix(players.get(0)) + players.get(0).getName() + SimpleClans.getInstance().getPermissionsManager().getSuffix(players.get(0));
|
||||
PermissionsManager pm = SimpleClans.getInstance().getPermissionsManager();
|
||||
return pm.getPrefix(players.get(0)) + players.get(0).getName() + pm.getSuffix(players.get(0));
|
||||
}
|
||||
|
||||
return playerName;
|
||||
@@ -375,6 +402,9 @@ public class Helper {
|
||||
if (hexValue == null) {
|
||||
return "";
|
||||
}
|
||||
if (hexValue.startsWith("&#")) {
|
||||
return ChatUtils.parseColors(hexValue);
|
||||
}
|
||||
|
||||
ChatColor color = ChatColor.getByChar(hexValue);
|
||||
if (color == null) {
|
||||
@@ -511,25 +541,21 @@ public class Helper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert color hex values with ampersand to special character
|
||||
*
|
||||
* @param msg
|
||||
* @return
|
||||
* @deprecated use {@link ChatUtils#parseColors(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static String parseColors(String msg) {
|
||||
return msg.replace("&", "\u00a7");
|
||||
return ChatUtils.parseColors(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes color codes from strings
|
||||
*
|
||||
* @param msg
|
||||
* @return
|
||||
* @deprecated use {@link ChatUtils#stripColors(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static String stripColors(String msg) {
|
||||
String out = msg.replaceAll("[&][0-9a-fk-or]", "");
|
||||
out = out.replaceAll(String.valueOf((char) 194), "");
|
||||
return out.replaceAll("[\u00a7][0-9a-fk-or]", "");
|
||||
return ChatUtils.stripColors(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -817,8 +843,8 @@ public class Helper {
|
||||
|
||||
String leaderColor = sm.getAllyChatLeaderColor();
|
||||
String memberColor = sm.getAllyChatMemberColor();
|
||||
String rank = cp.getRankId().isEmpty() ? null : ChatColor.translateAlternateColorCodes('&', cp.getRankDisplayName());
|
||||
String rankFormat = rank != null ? ChatColor.translateAlternateColorCodes('&', sm.getAllyChatRank()).replace("%rank%", rank) : "";
|
||||
String rank = cp.getRankId().isEmpty() ? null : ChatUtils.parseColors(cp.getRankDisplayName());
|
||||
String rankFormat = rank != null ? ChatUtils.parseColors(sm.getAllyChatRank()).replace("%rank%", rank) : "";
|
||||
|
||||
String message = replacePlaceholders(sm.getAllyChatFormat(), cp, leaderColor, memberColor, rankFormat, msg);
|
||||
if (placeholders != null) {
|
||||
@@ -829,8 +855,13 @@ public class Helper {
|
||||
return message;
|
||||
}
|
||||
|
||||
private static String replacePlaceholders(String messageFormat, ClanPlayer cp, String leaderColor, String memberColor, String rankFormat, String msg) {
|
||||
return ChatColor.translateAlternateColorCodes('&', messageFormat)
|
||||
private static String replacePlaceholders(String messageFormat,
|
||||
ClanPlayer cp,
|
||||
String leaderColor,
|
||||
String memberColor,
|
||||
String rankFormat,
|
||||
String msg) {
|
||||
return ChatUtils.parseColors(messageFormat)
|
||||
.replace("%clan%", Objects.requireNonNull(cp.getClan()).getColorTag())
|
||||
.replace("%nick-color%", (cp.isLeader() ? leaderColor : memberColor))
|
||||
.replace("%player%", cp.getName())
|
||||
@@ -851,8 +882,8 @@ public class Helper {
|
||||
|
||||
String leaderColor = sm.getClanChatLeaderColor();
|
||||
String memberColor = sm.getClanChatMemberColor();
|
||||
String rank = cp.getRankId().isEmpty() ? null : ChatColor.translateAlternateColorCodes('&', cp.getRankDisplayName());
|
||||
String rankFormat = rank != null ? ChatColor.translateAlternateColorCodes('&', sm.getClanChatRank()).replace("%rank%", rank) : "";
|
||||
String rank = cp.getRankId().isEmpty() ? null : ChatUtils.parseColors(cp.getRankDisplayName());
|
||||
String rankFormat = rank != null ? ChatUtils.parseColors(sm.getClanChatRank()).replace("%rank%", rank) : "";
|
||||
|
||||
String message = replacePlaceholders(sm.getClanChatFormat(), cp, leaderColor, memberColor, rankFormat, msg);
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import net.sacredlabyrinth.phaed.simpleclans.managers.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.tasks.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.InventoryController;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatFormatMigration;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.UpdateChecker;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
@@ -249,7 +249,7 @@ public class SimpleClans extends JavaPlugin {
|
||||
if (lang == null) {
|
||||
return null;
|
||||
}
|
||||
String message = ChatColor.translateAlternateColorCodes('&', lang);
|
||||
String message = ChatUtils.parseColors(lang);
|
||||
// contains acf placeholders like {commandprefix}
|
||||
if (Pattern.compile("\\{(?<key>[a-zA-Z]+?)}").matcher(message).find()) {
|
||||
return message;
|
||||
|
||||
@@ -216,6 +216,7 @@ public class SCCommandManager extends PaperCommandManager {
|
||||
"modtag", "bb", "clear", "rival", "ally", "add", "remove", "stats", "coords", "vitals", "rivalries",
|
||||
"alliances", "leaderboard", "allow", "block", "auto", "check", "assign", "unassign", "delete", "me",
|
||||
"setdisplayname", "permissions", "tag", "deposit", "withdraw", "set", "status", "tp", "all", "everyone",
|
||||
"lookup", "roster", "profile", "list", "create", "description", "start", "end", "admin", "help");
|
||||
"lookup", "roster", "profile", "list", "create", "description", "start", "end", "admin", "help", "mod",
|
||||
"setdefault", "removedefault");
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import net.sacredlabyrinth.phaed.simpleclans.commands.ClanPlayerInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.conversation.CreateRankNamePrompt;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.StorageManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
import org.bukkit.conversations.ConversationFactory;
|
||||
@@ -67,7 +68,7 @@ public class RankCommand extends BaseCommand {
|
||||
@Description("{@@command.description.rank.create}")
|
||||
public void create(Player player, Clan clan) {
|
||||
Conversation conversation = new ConversationFactory(plugin).withFirstPrompt(new CreateRankNamePrompt())
|
||||
.withLocalEcho(true).buildConversation(player);
|
||||
.withLocalEcho(true).withTimeout(60).buildConversation(player);
|
||||
conversation.getContext().setSessionData("clan", clan);
|
||||
conversation.begin();
|
||||
}
|
||||
@@ -98,7 +99,7 @@ public class RankCommand extends BaseCommand {
|
||||
int count = 1;
|
||||
for (Rank rank : ranks) {
|
||||
ChatBlock.sendMessage(player, AQUA + lang("ranks.list.item", player, count,
|
||||
Helper.parseColors(rank.getDisplayName()) + AQUA, rank.getName()));
|
||||
ChatUtils.parseColors(rank.getDisplayName()) + AQUA, rank.getName()));
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -117,6 +118,23 @@ public class RankCommand extends BaseCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + lang("rank.displayname.updated", player));
|
||||
}
|
||||
|
||||
@Subcommand("%setdefault")
|
||||
@CommandPermission("simpleclans.leader.rank.setdefault")
|
||||
@CommandCompletion("@ranks")
|
||||
@Description("{@@command.description.rank.setdefault}")
|
||||
public void setDefault(Player player, Clan clan, @Name("rank") Rank rank) {
|
||||
clan.setDefaultRank(rank.getName());
|
||||
ChatBlock.sendMessage(player, AQUA + lang("rank.setdefault", player, rank.getDisplayName()));
|
||||
}
|
||||
|
||||
@Subcommand("%removedefault")
|
||||
@CommandPermission("simpleclans.leader.rank.removedefault")
|
||||
@Description("{@@command.description.rank.removedefault}")
|
||||
public void removeDefault(Player player, Clan clan) {
|
||||
clan.setDefaultRank(null);
|
||||
ChatBlock.sendMessage(player, AQUA + lang("rank.removedefault", player));
|
||||
}
|
||||
|
||||
@Subcommand("%permissions")
|
||||
public class PermissionsCommand extends BaseCommand {
|
||||
private final String validPermissionsToMessage = Helper.toMessage(Helper.fromPermissionArray(), ",");
|
||||
|
||||
+3
-3
@@ -23,12 +23,12 @@ public class CanVoteCondition extends AbstractCommandCondition {
|
||||
ClanPlayer cp = clanManager.getCreateClanPlayer(player.getUniqueId());
|
||||
Clan clan = cp.getClan();
|
||||
if (clan != null) {
|
||||
if (!clan.isLeader(player)) {
|
||||
throw new ConditionFailedException(RED + lang("no.leader.permissions", player));
|
||||
}
|
||||
if (!requestManager.hasRequest(clan.getTag())) {
|
||||
throw new ConditionFailedException(lang("nothing.to.vote", player));
|
||||
}
|
||||
if (!clan.isLeader(player)) {
|
||||
throw new ConditionFailedException(RED + lang("no.leader.permissions", player));
|
||||
}
|
||||
if (cp.getVote() != null) {
|
||||
throw new ConditionFailedException(RED + lang("you.have.already.voted", player));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands.data;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.VanishUtils;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -35,7 +36,7 @@ public class ClanRoster extends Sendable {
|
||||
Player p = cp.toPlayer();
|
||||
|
||||
String name = (cp.isTrusted() ? sm.getPageTrustedColor() : sm.getPageUnTrustedColor()) + cp.getName();
|
||||
String lastSeen = p != null && p.isOnline() && !Helper.isVanished(sender, p) ? GREEN + lang("online", sender) : WHITE + cp.getLastSeenDaysString(sender);
|
||||
String lastSeen = p != null && p.isOnline() && !VanishUtils.isVanished(sender, p) ? GREEN + lang("online", sender) : WHITE + cp.getLastSeenDaysString(sender);
|
||||
|
||||
chatBlock.addRow(" " + name, YELLOW + Helper.parseColors(cp.getRankDisplayName()) + RESET, lastSeen);
|
||||
}
|
||||
@@ -48,7 +49,7 @@ public class ClanRoster extends Sendable {
|
||||
Player p = cp.toPlayer();
|
||||
|
||||
String name = sm.getPageLeaderColor() + cp.getName();
|
||||
String lastSeen = p != null && p.isOnline() && !Helper.isVanished(sender, p) ? GREEN + lang("online", sender)
|
||||
String lastSeen = p != null && p.isOnline() && !VanishUtils.isVanished(sender, p) ? GREEN + lang("online", sender)
|
||||
: WHITE + cp.getLastSeenDaysString(sender);
|
||||
|
||||
chatBlock.addRow(" " + name, YELLOW + Helper.parseColors(cp.getRankDisplayName()) + RESET, lastSeen);
|
||||
|
||||
@@ -75,10 +75,19 @@ public class Lookup extends Sendable {
|
||||
|
||||
@NotNull
|
||||
private String getPlayerStatus() {
|
||||
return target == null || targetClan == null ? lang("free.agent", sender) : (target.isLeader() ?
|
||||
sm.getPageLeaderColor() + lang("leader", sender) : (target.isTrusted() ?
|
||||
sm.getPageTrustedColor() + lang("trusted", sender) : sm.getPageUnTrustedColor() +
|
||||
lang("untrusted", sender)));
|
||||
if (target == null || targetClan == null) {
|
||||
return lang("free.agent", sender);
|
||||
}
|
||||
if (target.isLeader()) {
|
||||
return sm.getPageLeaderColor() + lang("leader", sender);
|
||||
}
|
||||
if (target.isTrusted()) {
|
||||
return sm.getPageTrustedColor() + lang("trusted", sender);
|
||||
}
|
||||
if (target.getRankId() != null && !target.getRankId().isEmpty()) {
|
||||
return sm.getPageTrustedColor() + lang("in.rank", sender);
|
||||
}
|
||||
return sm.getPageUnTrustedColor() + lang("untrusted", sender);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class GeneralCommands extends BaseCommand {
|
||||
initialData.put(TAG_KEY, tag);
|
||||
initialData.put(NAME_KEY, name);
|
||||
Conversation conversation = new ConversationFactory(plugin).withFirstPrompt(new CreateClanTagPrompt())
|
||||
.withLocalEcho(true).withInitialSessionData(initialData).buildConversation(player);
|
||||
.withLocalEcho(true).withTimeout(60).withInitialSessionData(initialData).buildConversation(player);
|
||||
conversation.begin();
|
||||
}
|
||||
|
||||
|
||||
+49
-16
@@ -6,12 +6,15 @@ import co.aikar.commands.bukkit.contexts.OnlinePlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.commands.ClanInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.commands.ClanPlayerInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.TagChangeEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.language.LanguageResource;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.StorageManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.InventoryController;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.TagValidator;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@@ -41,7 +44,7 @@ public class StaffCommands extends BaseCommand {
|
||||
@Dependency
|
||||
private StorageManager storage;
|
||||
|
||||
@Subcommand("%place")
|
||||
@Subcommand("%mod %place")
|
||||
@CommandPermission("simpleclans.mod.place")
|
||||
@CommandCompletion("@players @clans")
|
||||
@HelpSearchTags("move put")
|
||||
@@ -59,9 +62,8 @@ public class StaffCommands extends BaseCommand {
|
||||
}
|
||||
|
||||
if (oldClan.isLeader(player) && oldClan.getLeaders().size() <= 1) {
|
||||
oldClan.clanAnnounce(player.getName(), AQUA + lang("clan.has.been.disbanded",
|
||||
oldClan.getName()));
|
||||
oldClan.disband();
|
||||
ChatBlock.sendMessage(sender, RED + lang("you.cannot.move.the.last.leader", sender));
|
||||
return;
|
||||
} else {
|
||||
oldClan.addBb(player.getName(), AQUA + lang("0.has.resigned", player.getName()));
|
||||
oldClan.removePlayerFromClan(player.getUniqueId());
|
||||
@@ -75,7 +77,37 @@ public class StaffCommands extends BaseCommand {
|
||||
newClanInput.addPlayerToClan(cp);
|
||||
}
|
||||
|
||||
@Subcommand("%reload")
|
||||
@Subcommand("%mod %modtag")
|
||||
@CommandPermission("simpleclans.mod.modtag")
|
||||
@Description("{@@command.description.modtag.other}")
|
||||
public void modtag(Player player, @Name("clan") ClanInput clanInput, @Single @Name("tag") String tag) {
|
||||
Clan clan = clanInput.getClan();
|
||||
TagChangeEvent event = new TagChangeEvent(player, clan, tag);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
tag = event.getNewTag();
|
||||
String cleanTag = Helper.cleanTag(tag);
|
||||
|
||||
TagValidator validator = new TagValidator(plugin, player, tag);
|
||||
if (validator.getErrorMessage() != null) {
|
||||
ChatBlock.sendMessage(player, validator.getErrorMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cleanTag.equals(clan.getTag())) {
|
||||
ChatBlock.sendMessage(player, RED + lang("you.can.only.modify.the.color.and.case.of.the.tag",
|
||||
player));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(player.getName(), AQUA + lang("tag.changed.to.0", ChatUtils.parseColors(tag)));
|
||||
clan.changeClanTag(tag);
|
||||
player.sendMessage(lang("0.tag.changed.to.1", player, clan.getTag(), tag));
|
||||
}
|
||||
|
||||
@Subcommand("%admin %reload")
|
||||
@CommandPermission("simpleclans.admin.reload")
|
||||
@Description("{@@command.description.reload}")
|
||||
public void reload(CommandSender sender) {
|
||||
@@ -92,7 +124,7 @@ public class StaffCommands extends BaseCommand {
|
||||
ChatBlock.sendMessage(sender, AQUA + lang("configuration.reloaded", sender));
|
||||
}
|
||||
|
||||
@Subcommand("%home %set")
|
||||
@Subcommand("%mod %home %set")
|
||||
@CommandPermission("simpleclans.mod.home")
|
||||
@CommandCompletion("@clans")
|
||||
@Description("{@@command.description.mod.home.set}")
|
||||
@@ -104,7 +136,7 @@ public class StaffCommands extends BaseCommand {
|
||||
ChatColor.YELLOW + Helper.toLocationString(loc));
|
||||
}
|
||||
|
||||
@Subcommand("%home %tp")
|
||||
@Subcommand("%mod %home %tp")
|
||||
@CommandCompletion("@clans:has_home")
|
||||
@CommandPermission("simpleclans.mod.hometp")
|
||||
@Description("{@@command.description.mod.home.tp}")
|
||||
@@ -119,7 +151,7 @@ public class StaffCommands extends BaseCommand {
|
||||
plugin.getTeleportManager().teleportToHome(player, clan.getClan());
|
||||
}
|
||||
|
||||
@Subcommand("%ban")
|
||||
@Subcommand("%mod %ban")
|
||||
@CommandPermission("simpleclans.mod.ban")
|
||||
@CommandCompletion("@players")
|
||||
@Description("{@@command.description.ban}")
|
||||
@@ -139,7 +171,7 @@ public class StaffCommands extends BaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@Subcommand("%unban")
|
||||
@Subcommand("%mod %unban")
|
||||
@CommandPermission("simpleclans.mod.ban")
|
||||
@CommandCompletion("@players")
|
||||
@Description("{@@command.description.unban}")
|
||||
@@ -159,7 +191,7 @@ public class StaffCommands extends BaseCommand {
|
||||
ChatBlock.sendMessage(sender, AQUA + lang("player.removed.from.the.banned.list", sender));
|
||||
}
|
||||
|
||||
@Subcommand("%globalff %allow")
|
||||
@Subcommand("%mod %globalff %allow")
|
||||
@CommandPermission("simpleclans.mod.globalff")
|
||||
@Description("{@@command.description.globalff.allow}")
|
||||
public void allowGlobalFf(CommandSender sender) {
|
||||
@@ -171,7 +203,7 @@ public class StaffCommands extends BaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@Subcommand("%globalff %auto")
|
||||
@Subcommand("%mod %globalff %auto")
|
||||
@CommandPermission("simpleclans.mod.globalff")
|
||||
@Description("{@@command.description.globalff.auto}")
|
||||
public void autoGlobalFf(CommandSender sender) {
|
||||
@@ -186,7 +218,7 @@ public class StaffCommands extends BaseCommand {
|
||||
}
|
||||
|
||||
|
||||
@Subcommand("%verify")
|
||||
@Subcommand("%mod %verify")
|
||||
@CommandPermission("simpleclans.mod.verify")
|
||||
@CommandCompletion("@clans:unverified")
|
||||
@Description("{@@command.description.mod.verify}")
|
||||
@@ -202,7 +234,7 @@ public class StaffCommands extends BaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@Subcommand("%purge")
|
||||
@Subcommand("%admin %purge")
|
||||
@CommandPermission("simpleclans.admin.purge")
|
||||
@CommandCompletion("@players")
|
||||
@Description("{@@command.description.purge}")
|
||||
@@ -220,7 +252,7 @@ public class StaffCommands extends BaseCommand {
|
||||
ChatBlock.sendMessage(sender, AQUA + lang("player.purged", sender));
|
||||
}
|
||||
|
||||
@Subcommand("%disband")
|
||||
@Subcommand("%mod %disband")
|
||||
@CommandCompletion("@clans")
|
||||
@CommandPermission("simpleclans.mod.disband")
|
||||
@Description("{@@command.description.mod.disband}")
|
||||
@@ -248,6 +280,7 @@ public class StaffCommands extends BaseCommand {
|
||||
|
||||
clan.addBb(sender.getName(), AQUA + lang("promoted.to.leader", promotePl.getName()));
|
||||
clan.promote(promotePl.getUniqueId());
|
||||
ChatBlock.sendMessage(sender, AQUA + lang("player.successfully.promoted", sender));
|
||||
}
|
||||
|
||||
@Subcommand("%admin %demote")
|
||||
@@ -267,7 +300,7 @@ public class StaffCommands extends BaseCommand {
|
||||
ChatBlock.sendMessage(sender, AQUA + lang("player.successfully.demoted", sender));
|
||||
}
|
||||
|
||||
@Subcommand("%resetkdr %everyone")
|
||||
@Subcommand("%admin %resetkdr %everyone")
|
||||
@CommandPermission("simpleclans.admin.resetkdr")
|
||||
@Description("{@@command.description.resetkdr.everyone}")
|
||||
public void resetKdr(CommandSender sender) {
|
||||
@@ -277,7 +310,7 @@ public class StaffCommands extends BaseCommand {
|
||||
ChatBlock.sendMessage(sender, RED + lang("you.have.reseted.kdr.of.all.players", sender));
|
||||
}
|
||||
|
||||
@Subcommand("%resetkdr")
|
||||
@Subcommand("%admin %resetkdr")
|
||||
@CommandCompletion("@players")
|
||||
@CommandPermission("simpleclans.admin.resetkdr")
|
||||
@Description("{@@command.description.resetkdr.player}")
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.sacredlabyrinth.phaed.simpleclans.events;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Request;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -22,7 +23,7 @@ public class RequestEvent extends Event {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
public @NotNull HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class TagChangeEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
private final @NotNull Clan clan;
|
||||
private final @NotNull Clan clan;
|
||||
private @NotNull String newTag;
|
||||
private boolean cancelled;
|
||||
|
||||
|
||||
@@ -12,9 +12,15 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public class FriendlyFire implements Listener {
|
||||
|
||||
private final SimpleClans plugin;
|
||||
private final Map<UUID, Long> warned = new HashMap<>();
|
||||
private static final long WARN_DELAY = 10000;
|
||||
|
||||
public FriendlyFire(@NotNull SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
@@ -59,14 +65,24 @@ public class FriendlyFire implements Listener {
|
||||
}
|
||||
|
||||
if (victimClan.equals(attackerClan)) {
|
||||
ChatBlock.sendMessageKey(attacker, "cannot.attack.clan.member");
|
||||
warn(attacker, "cannot.attack.clan.member");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (victimClan.isAlly(attackerClan.getTag())) {
|
||||
ChatBlock.sendMessageKey(attacker, "cannot.attack.ally");
|
||||
warn(attacker, "cannot.attack.ally");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void warn(Player attacker, String messageKey) {
|
||||
long timestamp = warned.getOrDefault(attacker.getUniqueId(), 0L);
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
if (timestamp + WARN_DELAY <= currentTimeMillis) {
|
||||
ChatBlock.sendMessageKey(attacker, messageKey);
|
||||
warned.put(attacker.getUniqueId(), currentTimeMillis);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class PvPOnlyInWar implements Listener {
|
||||
|
||||
@@ -39,7 +40,8 @@ public class PvPOnlyInWar implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
private void process(EntityDamageEvent event, Player attacker, Player victim, Clan attackerClan, Clan victimClan) {
|
||||
private void process(EntityDamageEvent event, Player attacker, Player victim, @Nullable Clan attackerClan,
|
||||
@Nullable Clan victimClan) {
|
||||
if (attackerClan == null || victimClan == null) {
|
||||
ChatBlock.sendMessageKey(attacker, "must.be.in.clan.to.pvp", victim.getName());
|
||||
event.setCancelled(true);
|
||||
|
||||
@@ -14,8 +14,6 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.*;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.ClanPlayer.Channel.CLAN;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.ClanPlayer.Channel.NONE;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
@@ -76,14 +74,15 @@ public class SCPlayerListener implements Listener {
|
||||
@EventHandler
|
||||
public void handleChatTags(AsyncPlayerChatEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player.getUniqueId());
|
||||
if (cp == null || plugin.getSettingsManager().isBlacklistedWorld(player.getWorld())) {
|
||||
if (plugin.getSettingsManager().isBlacklistedWorld(player.getWorld())) {
|
||||
return;
|
||||
}
|
||||
Clan clan = Objects.requireNonNull(cp.getClan());
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getAnyClanPlayer(player.getUniqueId());
|
||||
String tagLabel = cp != null && cp.isTagEnabled() ? cp.getTagLabel() : null;
|
||||
|
||||
if (plugin.getSettingsManager().isCompatMode() && plugin.getSettingsManager().isChatTags()) {
|
||||
if (cp.isTagEnabled()) {
|
||||
String tagLabel = clan.getTagLabel(cp.isLeader());
|
||||
if (tagLabel != null) {
|
||||
if (player.getDisplayName().contains("{clan}")) {
|
||||
player.setDisplayName(player.getDisplayName().replace("{clan}", tagLabel));
|
||||
} else if (event.getFormat().contains("{clan}")) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.sacredlabyrinth.phaed.simpleclans.managers;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.RequestEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.RequestFinishedEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -406,42 +407,24 @@ public final class RequestManager {
|
||||
* @param req the Request
|
||||
*/
|
||||
public void ask(final Request req) {
|
||||
final String tag = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + req.getClan().getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight();
|
||||
final String message = tag + " " + plugin.getSettingsManager().getRequestMessageColor() + req.getMsg();
|
||||
|
||||
if (req.getType().equals(ClanRequest.INVITE)) {
|
||||
Player player = Bukkit.getPlayerExact(req.getTarget());
|
||||
|
||||
if (player != null) {
|
||||
String options = lang("accept.or.deny", player, ChatBlock.makeEmpty(Helper.stripColors(tag)) + " " + ChatColor.DARK_GREEN + "/" + plugin.getSettingsManager().getCommandAccept() + plugin.getSettingsManager().getPageHeadingsColor(), ChatColor.DARK_RED + "/" + plugin.getSettingsManager().getCommandDeny());
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, message);
|
||||
ChatBlock.sendMessage(player, options);
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
String message = lang("request.message", req.getClan().getColorTag(), req.getMsg());
|
||||
ArrayList<Player> recipients = new ArrayList<>();
|
||||
if (req.getType() == ClanRequest.INVITE) {
|
||||
recipients.add(Bukkit.getPlayerExact(req.getTarget()));
|
||||
} else {
|
||||
for (ClanPlayer cp : req.getAcceptors()) {
|
||||
if (cp.getVote() == null) {
|
||||
Player player = cp.toPlayer();
|
||||
|
||||
if (player != null) {
|
||||
String options = lang("accept.or.deny", player, ChatBlock.makeEmpty(Helper.stripColors(tag)) + " " + ChatColor.DARK_GREEN + "/" + plugin.getSettingsManager().getCommandAccept() + plugin.getSettingsManager().getPageHeadingsColor(), ChatColor.DARK_RED + "/" + plugin.getSettingsManager().getCommandDeny());
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, message);
|
||||
ChatBlock.sendMessage(player, options);
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
recipients.add(cp.toPlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new RequestEvent(req));
|
||||
for (Player recipient : recipients) {
|
||||
if (recipient != null) {
|
||||
recipient.spigot().sendMessage(ChatUtils.toBaseComponents(recipient, message));
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
|
||||
Bukkit.getScheduler().runTask(plugin, () -> Bukkit.getPluginManager().callEvent(new RequestEvent(req)));
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -177,7 +178,7 @@ public final class SettingsManager {
|
||||
private boolean moneyperkill;
|
||||
private double KDRMultipliesPerKill;
|
||||
private boolean teleportBlocks;
|
||||
private boolean AutoGroupGroupName;
|
||||
private boolean autoGroupGroupName;
|
||||
private boolean tamableMobsSharing;
|
||||
private boolean allowReGroupCommand;
|
||||
private boolean useThreads;
|
||||
@@ -205,6 +206,7 @@ public final class SettingsManager {
|
||||
config = plugin.getConfig();
|
||||
main = new File(plugin.getDataFolder() + File.separator + "config.yml");
|
||||
load();
|
||||
warnAboutAutoGroupGroupName();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -391,7 +393,7 @@ public final class SettingsManager {
|
||||
teleportBlocks = getConfig().getBoolean("settings.teleport-blocks");
|
||||
language = getConfig().getString("settings.language", "");
|
||||
languagePerPlayer = getConfig().getBoolean("settings.user-language-selector", true);
|
||||
AutoGroupGroupName = getConfig().getBoolean("permissions.auto-group-groupname");
|
||||
autoGroupGroupName = getConfig().getBoolean("permissions.auto-group-groupname");
|
||||
tamableMobsSharing = getConfig().getBoolean("settings.tameable-mobs-sharing");
|
||||
allowReGroupCommand = getConfig().getBoolean("settings.allow-regroup-command");
|
||||
loreLength = getConfig().getInt("settings.lore-length", 38);
|
||||
@@ -425,6 +427,15 @@ public final class SettingsManager {
|
||||
}
|
||||
}
|
||||
|
||||
private void warnAboutAutoGroupGroupName() {
|
||||
Plugin luckPerms = Bukkit.getServer().getPluginManager().getPlugin("LuckPerms");
|
||||
if (luckPerms != null && autoGroupGroupName) {
|
||||
plugin.getLogger().warning("LuckPerms was found and the setting auto-group-groupname is enabled.");
|
||||
plugin.getLogger().warning("Be careful with that as players will be automatically added in the group" +
|
||||
" that matches their clan tag.");
|
||||
}
|
||||
}
|
||||
|
||||
public int getLoreLength() {
|
||||
return loreLength;
|
||||
}
|
||||
@@ -1681,7 +1692,7 @@ public final class SettingsManager {
|
||||
* @return the AutoGroupGroupName
|
||||
*/
|
||||
public boolean isAutoGroupGroupName() {
|
||||
return AutoGroupGroupName;
|
||||
return autoGroupGroupName;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.storage.DBCore;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.storage.MySQLCore;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.storage.SQLiteCore;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.YAMLSerializer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDFetcher;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
@@ -17,6 +18,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
@@ -86,20 +88,20 @@ public final class StorageManager {
|
||||
plugin.getLogger().info("Creating table: sc_clans");
|
||||
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_clans` ("
|
||||
+ " `id` bigint(20) NOT NULL auto_increment,"
|
||||
+ " `verified` tinyint(1) default '0',"
|
||||
+ " `tag` varchar(25) NOT NULL,"
|
||||
+ " `color_tag` varchar(25) NOT NULL,"
|
||||
+ " `name` varchar(100) NOT NULL,"
|
||||
+ " `description` varchar(255),"
|
||||
+ " `friendly_fire` tinyint(1) default '0',"
|
||||
+ " `founded` bigint NOT NULL,"
|
||||
+ " `last_used` bigint NOT NULL,"
|
||||
+ " `packed_allies` text NOT NULL,"
|
||||
+ " `packed_rivals` text NOT NULL,"
|
||||
+ " `packed_bb` mediumtext NOT NULL,"
|
||||
+ " `cape_url` varchar(255) NOT NULL,"
|
||||
+ " `flags` text NOT NULL,"
|
||||
+ " `id` bigint(20) NOT NULL auto_increment,"
|
||||
+ " `verified` tinyint(1) default '0',"
|
||||
+ " `tag` varchar(25) NOT NULL,"
|
||||
+ " `color_tag` varchar(255) NOT NULL,"
|
||||
+ " `name` varchar(100) NOT NULL,"
|
||||
+ " `description` varchar(255),"
|
||||
+ " `friendly_fire` tinyint(1) default '0',"
|
||||
+ " `founded` bigint NOT NULL,"
|
||||
+ " `last_used` bigint NOT NULL,"
|
||||
+ " `packed_allies` text NOT NULL,"
|
||||
+ " `packed_rivals` text NOT NULL,"
|
||||
+ " `packed_bb` mediumtext NOT NULL,"
|
||||
+ " `cape_url` varchar(255) NOT NULL,"
|
||||
+ " `flags` text NOT NULL,"
|
||||
+ " `balance` double(64,2),"
|
||||
+ " `fee_enabled` tinyint(1) default '0',"
|
||||
+ " `fee_value` double(64,2),"
|
||||
@@ -162,20 +164,20 @@ public final class StorageManager {
|
||||
plugin.getLogger().info("Creating table: sc_clans");
|
||||
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_clans` ("
|
||||
+ " `id` bigint(20),"
|
||||
+ " `verified` tinyint(1) default '0',"
|
||||
+ " `tag` varchar(25) NOT NULL,"
|
||||
+ " `color_tag` varchar(25) NOT NULL,"
|
||||
+ " `name` varchar(100) NOT NULL,"
|
||||
+ " `description` varchar(255),"
|
||||
+ " `friendly_fire` tinyint(1) default '0',"
|
||||
+ " `founded` bigint NOT NULL,"
|
||||
+ " `last_used` bigint NOT NULL,"
|
||||
+ " `packed_allies` text NOT NULL,"
|
||||
+ " `packed_rivals` text NOT NULL,"
|
||||
+ " `packed_bb` mediumtext NOT NULL,"
|
||||
+ " `cape_url` varchar(255) NOT NULL,"
|
||||
+ " `flags` text NOT NULL,"
|
||||
+ " `id` bigint(20),"
|
||||
+ " `verified` tinyint(1) default '0',"
|
||||
+ " `tag` varchar(25) NOT NULL,"
|
||||
+ " `color_tag` varchar(255) NOT NULL,"
|
||||
+ " `name` varchar(100) NOT NULL,"
|
||||
+ " `description` varchar(255),"
|
||||
+ " `friendly_fire` tinyint(1) default '0',"
|
||||
+ " `founded` bigint NOT NULL,"
|
||||
+ " `last_used` bigint NOT NULL,"
|
||||
+ " `packed_allies` text NOT NULL,"
|
||||
+ " `packed_rivals` text NOT NULL,"
|
||||
+ " `packed_bb` mediumtext NOT NULL,"
|
||||
+ " `cape_url` varchar(255) NOT NULL,"
|
||||
+ " `flags` text NOT NULL,"
|
||||
+ " `balance` double(64,2) default 0.0,"
|
||||
+ " `fee_enabled` tinyint(1) default '0',"
|
||||
+ " `fee_value` double(64,2),"
|
||||
@@ -360,7 +362,7 @@ public final class StorageManager {
|
||||
boolean verified = res.getBoolean("verified");
|
||||
boolean friendly_fire = res.getBoolean("friendly_fire");
|
||||
String tag = res.getString("tag");
|
||||
String color_tag = Helper.parseColors(res.getString("color_tag"));
|
||||
String color_tag = ChatUtils.parseColors(res.getString("color_tag"));
|
||||
String name = res.getString("name");
|
||||
String description = res.getString("description");
|
||||
String packed_allies = res.getString("packed_allies");
|
||||
@@ -368,7 +370,7 @@ public final class StorageManager {
|
||||
String packed_bb = res.getString("packed_bb");
|
||||
String cape_url = res.getString("cape_url");
|
||||
String flags = res.getString("flags");
|
||||
String ranks = res.getString("ranks");
|
||||
JSONObject ranks = Helper.parseJson(res.getString("ranks"));
|
||||
long founded = res.getLong("founded");
|
||||
long last_used = res.getLong("last_used");
|
||||
double balance = res.getDouble("balance");
|
||||
@@ -402,6 +404,7 @@ public final class StorageManager {
|
||||
clan.setMemberFee(feeValue);
|
||||
clan.setMemberFeeEnabled(feeEnabled);
|
||||
clan.setRanks(Helper.ranksFromJson(ranks));
|
||||
clan.setDefaultRank(Helper.defaultRankFromJson(ranks));
|
||||
clan.setBanner(banner);
|
||||
|
||||
out.add(clan);
|
||||
@@ -440,7 +443,7 @@ public final class StorageManager {
|
||||
boolean verified = res.getBoolean("verified");
|
||||
boolean friendly_fire = res.getBoolean("friendly_fire");
|
||||
String tag = res.getString("tag");
|
||||
String color_tag = Helper.parseColors(res.getString("color_tag"));
|
||||
String color_tag = ChatUtils.parseColors(res.getString("color_tag"));
|
||||
String name = res.getString("name");
|
||||
String description = res.getString("description");
|
||||
String packed_allies = res.getString("packed_allies");
|
||||
@@ -448,7 +451,7 @@ public final class StorageManager {
|
||||
String packed_bb = res.getString("packed_bb");
|
||||
String cape_url = res.getString("cape_url");
|
||||
String flags = res.getString("flags");
|
||||
String ranks = res.getString("ranks");
|
||||
JSONObject ranks = Helper.parseJson(res.getString("ranks"));
|
||||
long founded = res.getLong("founded");
|
||||
long last_used = res.getLong("last_used");
|
||||
double balance = res.getDouble("balance");
|
||||
@@ -482,6 +485,7 @@ public final class StorageManager {
|
||||
clan.setMemberFee(feeValue);
|
||||
clan.setMemberFeeEnabled(feeEnabled);
|
||||
clan.setRanks(Helper.ranksFromJson(ranks));
|
||||
clan.setDefaultRank(Helper.defaultRankFromJson(ranks));
|
||||
clan.setBanner(banner);
|
||||
|
||||
out = clan;
|
||||
@@ -528,7 +532,7 @@ public final class StorageManager {
|
||||
long last_seen = res.getLong("last_seen");
|
||||
long join_date = res.getLong("join_date");
|
||||
String flags = res.getString("flags");
|
||||
String packed_past_clans = Helper.parseColors(res.getString("packed_past_clans"));
|
||||
String packed_past_clans = ChatUtils.parseColors(res.getString("packed_past_clans"));
|
||||
String resign_times = res.getString("resign_times");
|
||||
Locale locale = Helper.forLanguageTag(res.getString("locale"));
|
||||
|
||||
@@ -699,7 +703,7 @@ public final class StorageManager {
|
||||
"`packed_bb`, `cape_url`, `flags`, `balance`) ";
|
||||
String values = "VALUES ( '"
|
||||
+ Helper.escapeQuotes(YAMLSerializer.serialize(clan.getBanner())) + "','"
|
||||
+ Helper.escapeQuotes(Helper.ranksToJson(clan.getRanks())) + "','"
|
||||
+ Helper.escapeQuotes(Helper.ranksToJson(clan.getRanks(), clan.getDefaultRank())) + "','"
|
||||
+ Helper.escapeQuotes(clan.getDescription())+ "',"
|
||||
+ (clan.isMemberFeeEnabled() ? 1 : 0) +","
|
||||
+ Helper.escapeQuotes(String.valueOf(clan.getMemberFee())) + ","
|
||||
@@ -787,7 +791,7 @@ public final class StorageManager {
|
||||
|
||||
private String getUpdateClanQuery(Clan clan) {
|
||||
String query = "UPDATE `sc_clans`" +
|
||||
" SET ranks = '"+ Helper.escapeQuotes(Helper.ranksToJson(clan.getRanks())) +"'," +
|
||||
" SET ranks = '"+ Helper.escapeQuotes(Helper.ranksToJson(clan.getRanks(), clan.getDefaultRank())) +"'," +
|
||||
" banner = '" + Helper.escapeQuotes(YAMLSerializer.serialize(clan.getBanner())) + "'," +
|
||||
" description = '" + Helper.escapeQuotes(clan.getDescription())+ "'," +
|
||||
" fee_enabled = "+ (clan.isMemberFeeEnabled() ? 1 : 0) +"," +
|
||||
@@ -1062,15 +1066,15 @@ public final class StorageManager {
|
||||
private void updateDatabase() {
|
||||
String query = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* From 2.2.6.3 to 2.3
|
||||
*/
|
||||
if (!core.existsColumn("sc_clans", "balance")) {
|
||||
query = "ALTER TABLE sc_clans ADD COLUMN `balance` double(64,2);";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/*
|
||||
* From 2.7.16 to 2.7.17
|
||||
*/
|
||||
if (!core.existsColumn("sc_clans", "fee_enabled")) {
|
||||
@@ -1081,24 +1085,24 @@ public final class StorageManager {
|
||||
query = "ALTER TABLE sc_clans ADD COLUMN `fee_value` double(64,2);";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/*
|
||||
* From 2.7.21 to 2.7.22
|
||||
*/
|
||||
if (!core.existsColumn("sc_clans", "description")) {
|
||||
query = "ALTER TABLE sc_clans ADD COLUMN `description` varchar(255);";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/*
|
||||
* From 2.7.22 to 2.7.23
|
||||
*/
|
||||
if (!core.existsColumn("sc_players", "resign_times")) {
|
||||
query = "ALTER TABLE sc_players ADD COLUMN `resign_times` text;";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/*
|
||||
* From 2.8.2 to 2.9
|
||||
*/
|
||||
if (!core.existsColumn("sc_clans", "ranks")) {
|
||||
@@ -1115,7 +1119,11 @@ public final class StorageManager {
|
||||
core.execute("ALTER TABLE sc_clans ADD COLUMN `banner` text;");
|
||||
}
|
||||
|
||||
/**
|
||||
if (plugin.getSettingsManager().isUseMysql()) {
|
||||
core.execute("ALTER TABLE sc_clans MODIFY color_tag VARCHAR(255);");
|
||||
}
|
||||
|
||||
/*
|
||||
* Bukkit 1.7.5+ UUID Migration
|
||||
*/
|
||||
if (!core.existsColumn("sc_kills", "attacker_uuid")) {
|
||||
|
||||
@@ -84,7 +84,7 @@ public final class TeleportManager {
|
||||
z = z + zz;
|
||||
|
||||
plugin.getTeleportManager().addPlayer(player, new Location(location.getWorld(), x + .5,
|
||||
location.getBlockY(), z + .5), clan.getName());
|
||||
location.getBlockY(), z + .5, location.getYaw(), location.getPitch()), clan.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,11 +4,11 @@ import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.FrameOpenEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.util.ChatPaginator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -69,6 +69,10 @@ public class InventoryDrawer {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated use {@link InventoryDrawer#open(SCFrame)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void update(@NotNull SCFrame frame) {
|
||||
open(frame);
|
||||
@@ -105,7 +109,7 @@ public class InventoryDrawer {
|
||||
if (oldLore != null) {
|
||||
ArrayList<String> newLore = new ArrayList<>();
|
||||
for (String line : oldLore) {
|
||||
String[] strings = ChatPaginator.wordWrap(line, plugin.getSettingsManager().getLoreLength());
|
||||
String[] strings = ChatUtils.wordWrap(line, plugin.getSettingsManager().getLoreLength());
|
||||
newLore.addAll(Arrays.asList(strings));
|
||||
}
|
||||
itemMeta.setLore(newLore);
|
||||
|
||||
@@ -3,9 +3,9 @@ package net.sacredlabyrinth.phaed.simpleclans.ui.frames;
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.KDRFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.Paginator;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.VanishUtils;
|
||||
@@ -41,16 +41,14 @@ public class Components {
|
||||
boolean openDetails) {
|
||||
SimpleClans pl = SimpleClans.getInstance();
|
||||
|
||||
String status = cp.getClan() == null ? lang("free.agent",viewer)
|
||||
: (cp.isLeader() ? lang("leader",viewer)
|
||||
: (cp.isTrusted() ? lang("trusted",viewer) : lang("untrusted",viewer)));
|
||||
String status = getPlayerStatus(viewer, cp);
|
||||
SCComponent c = new SCComponentImpl(lang("gui.playerdetails.player.title",viewer, cp.getName()),
|
||||
Arrays.asList(
|
||||
cp.getClan() == null ? lang("gui.playerdetails.player.lore.noclan",viewer)
|
||||
: lang("gui.playerdetails.player.lore.clan",viewer, cp.getClan().getColorTag(),
|
||||
cp.getClan().getName()),
|
||||
lang("gui.playerdetails.player.lore.rank",viewer,
|
||||
Helper.parseColors(cp.getRankDisplayName())),
|
||||
ChatUtils.parseColors(cp.getRankDisplayName())),
|
||||
lang("gui.playerdetails.player.lore.status",viewer, status),
|
||||
lang("gui.playerdetails.player.lore.kdr",viewer,
|
||||
new DecimalFormat("#.#").format(cp.getKDR())),
|
||||
@@ -78,6 +76,23 @@ public class Components {
|
||||
return c;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getPlayerStatus(Player viewer, ClanPlayer cp) {
|
||||
if (cp.getClan() == null) {
|
||||
return lang("free.agent", viewer);
|
||||
}
|
||||
if (cp.isLeader()) {
|
||||
return lang("leader", viewer);
|
||||
}
|
||||
if (cp.isTrusted()) {
|
||||
return lang("trusted", viewer);
|
||||
}
|
||||
if (cp.getRankId() != null && !cp.getRankId().isEmpty()) {
|
||||
return lang("in.rank", viewer);
|
||||
}
|
||||
return lang("untrusted", viewer);
|
||||
}
|
||||
|
||||
public static SCComponent getClanComponent(@NotNull SCFrame frame, @NotNull Player viewer,
|
||||
@Nullable Clan clan, int slot, boolean openDetails) {
|
||||
SimpleClans pl = SimpleClans.getInstance();
|
||||
@@ -167,6 +182,7 @@ public class Components {
|
||||
return c;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void setOwningPlayer(@NotNull ItemStack item, @NotNull OfflinePlayer player) {
|
||||
SkullMeta itemMeta = (SkullMeta) item.getItemMeta();
|
||||
if (itemMeta == null) {
|
||||
|
||||
+6
-3
@@ -2,6 +2,7 @@ package net.sacredlabyrinth.phaed.simpleclans.ui.frames;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.*;
|
||||
@@ -18,17 +19,19 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
|
||||
private final SimpleClans plugin = SimpleClans.getInstance();
|
||||
private final OfflinePlayer subject;
|
||||
private final String subjectName;
|
||||
private final Clan clan;
|
||||
|
||||
public PlayerDetailsFrame(Player viewer, SCFrame parent, OfflinePlayer subject) {
|
||||
super(parent, viewer);
|
||||
this.subject = subject;
|
||||
clan = plugin.getClanManager().getAnyClanPlayer(viewer.getUniqueId()).getClan();
|
||||
ClanPlayer cp = plugin.getClanManager().getCreateClanPlayer(viewer.getUniqueId());
|
||||
subjectName = cp.getName();
|
||||
clan = cp.getClan();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createComponents() {
|
||||
String subjectName = subject.getName();
|
||||
for (int slot = 0; slot < 9; slot++) {
|
||||
if (slot == 4)
|
||||
continue;
|
||||
@@ -93,7 +96,7 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public @NotNull String getTitle() {
|
||||
return lang("gui.playerdetails.title",getViewer(), subject.getName());
|
||||
return lang("gui.playerdetails.title",getViewer(), subjectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-6
@@ -3,10 +3,10 @@ package net.sacredlabyrinth.phaed.simpleclans.ui.frames.staff;
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.frames.Components;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.frames.RosterFrame;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -50,7 +50,7 @@ public class ClanDetailsFrame extends SCFrame {
|
||||
Collections.singletonList(lang("gui.staffclandetails.disband.lore", getViewer())),
|
||||
XMaterial.BARRIER, 34);
|
||||
disband.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"disband", false, clan.getTag()));
|
||||
"mod disband", false, clan.getTag()));
|
||||
disband.setConfirmationRequired(ClickType.LEFT);
|
||||
disband.setPermission(ClickType.LEFT, "simpleclans.mod.disband");
|
||||
add(disband);
|
||||
@@ -71,7 +71,7 @@ public class ClanDetailsFrame extends SCFrame {
|
||||
verify.setPermission(ClickType.LEFT, "simpleclans.mod.verify");
|
||||
verify.setConfirmationRequired(ClickType.LEFT);
|
||||
verify.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"verify", false, clan.getTag()));
|
||||
"mod verify", false, clan.getTag()));
|
||||
}
|
||||
add(verify);
|
||||
}
|
||||
@@ -84,10 +84,10 @@ public class ClanDetailsFrame extends SCFrame {
|
||||
SCComponent home = new SCComponentImpl(lang("gui.clandetails.home.title", getViewer()), lore,
|
||||
XMaterial.MAGENTA_BED, 30);
|
||||
home.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"home tp", false, clan.getTag()));
|
||||
"mod home tp", false, clan.getTag()));
|
||||
home.setPermission(ClickType.LEFT, "simpleclans.mod.hometp");
|
||||
home.setListener(ClickType.RIGHT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"home set", false, clan.getTag()));
|
||||
"mod home set", false, clan.getTag()));
|
||||
home.setPermission(ClickType.RIGHT, "simpleclans.mod.home");
|
||||
home.setConfirmationRequired(ClickType.RIGHT);
|
||||
add(home);
|
||||
@@ -111,7 +111,7 @@ public class ClanDetailsFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public @NotNull String getTitle() {
|
||||
return lang("gui.clandetails.title", getViewer(), Helper.stripColors(clan.getColorTag()),
|
||||
return lang("gui.clandetails.title", getViewer(), ChatUtils.stripColors(clan.getColorTag()),
|
||||
clan.getName());
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ public class ClanListFrame extends SCFrame {
|
||||
} else {
|
||||
if (toPlace != null) {
|
||||
c.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"place", false, toPlace.getName(), clan.getTag()));
|
||||
"mod place", false, toPlace.getName(), clan.getTag()));
|
||||
c.setConfirmationRequired(ClickType.LEFT);
|
||||
c.setPermission(ClickType.LEFT, "simpleclans.mod.place");
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class ClanListFrame extends SCFrame {
|
||||
}
|
||||
|
||||
private void updateFrame() {
|
||||
InventoryDrawer.update(this);
|
||||
InventoryDrawer.open(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -64,7 +64,7 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
lang("gui.playerdetails.purge.lore", getViewer())).build();
|
||||
purge.setConfirmationRequired(ClickType.LEFT);
|
||||
purge.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"purge", false, subjectName));
|
||||
"admin purge", false, subjectName));
|
||||
purge.setPermission(ClickType.LEFT, "simpleclans.admin.purge");
|
||||
add(purge);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
.withSlot(30).withDisplayName(lang("gui.main.reset.kdr.title", getViewer()))
|
||||
.withLoreLine(lang("gui.playerdetails.resetkdr.lore", getViewer())).build();
|
||||
resetKdr.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"resetkdr", false, subjectName));
|
||||
"admin resetkdr", false, subjectName));
|
||||
resetKdr.setConfirmationRequired(ClickType.LEFT);
|
||||
resetKdr.setPermission(ClickType.LEFT, "simpleclans.admin.resetkdr");
|
||||
add(resetKdr);
|
||||
@@ -100,9 +100,9 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
banUnban.setPermission(ClickType.LEFT, "simpleclans.mod.ban");
|
||||
banUnban.setPermission(ClickType.RIGHT, "simpleclans.mod.ban");
|
||||
banUnban.setListener(ClickType.LEFT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"ban", false, subjectName));
|
||||
"mod ban", false, subjectName));
|
||||
banUnban.setListener(ClickType.RIGHT, () -> InventoryController.runSubcommand(getViewer(),
|
||||
"unban", false, subjectName));
|
||||
"mod unban", false, subjectName));
|
||||
add(banUnban);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public class StaffFrame extends SCFrame {
|
||||
reload.setPermission(ClickType.LEFT, "simpleclans.admin.reload");
|
||||
reload.setConfirmationRequired(ClickType.LEFT);
|
||||
reload.setListener(ClickType.LEFT, () ->
|
||||
InventoryController.runSubcommand(getViewer(), "reload", false));
|
||||
InventoryController.runSubcommand(getViewer(), "admin reload", false));
|
||||
add(reload);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class StaffFrame extends SCFrame {
|
||||
} else {
|
||||
arg = "allow";
|
||||
}
|
||||
InventoryController.runSubcommand(getViewer(), "globalff", true, arg);
|
||||
InventoryController.runSubcommand(getViewer(), "mod globalff", true, arg);
|
||||
});
|
||||
add(globalFf);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.utils;
|
||||
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.chat.*;
|
||||
import net.md_5.bungee.api.chat.ComponentBuilder.FormatRetention;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static net.md_5.bungee.api.chat.ClickEvent.Action.RUN_COMMAND;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
|
||||
public class ChatUtils {
|
||||
|
||||
private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("(%([A-Za-z]+)%)");
|
||||
private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("&#(\\w{5}[0-9A-Fa-f])");
|
||||
private static boolean supportsHexColors;
|
||||
|
||||
static {
|
||||
try {
|
||||
ChatColor.class.getDeclaredMethod("of", String.class);
|
||||
supportsHexColors = true;
|
||||
} catch (NoSuchMethodException e) {
|
||||
supportsHexColors = false;
|
||||
}
|
||||
}
|
||||
|
||||
private ChatUtils() {
|
||||
}
|
||||
|
||||
public static String parseColors(@NotNull String text) {
|
||||
// Special thanks to the Spigot community!
|
||||
// https://www.spigotmc.org/threads/hex-color-code-translate.449748/#post-3867795
|
||||
if (supportsHexColors) {
|
||||
Matcher matcher = HEX_COLOR_PATTERN.matcher(text);
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
while (matcher.find()) {
|
||||
matcher.appendReplacement(buffer, ChatColor.of("#" + matcher.group(1)).toString());
|
||||
}
|
||||
text = matcher.appendTail(buffer).toString();
|
||||
}
|
||||
return ChatColor.translateAlternateColorCodes('&', text);
|
||||
}
|
||||
|
||||
public static String stripColors(String text) {
|
||||
if (supportsHexColors) {
|
||||
Matcher matcher = HEX_COLOR_PATTERN.matcher(text);
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
while (matcher.find()) {
|
||||
matcher.appendReplacement(buffer, "");
|
||||
}
|
||||
text = matcher.appendTail(buffer).toString();
|
||||
}
|
||||
return oldStripColors(text);
|
||||
}
|
||||
|
||||
private static String oldStripColors(String text) {
|
||||
return text.replaceAll("[&][0-9A-Za-z]", "")
|
||||
.replaceAll(String.valueOf((char) 194), "") //don't know why
|
||||
.replaceAll("[\u00a7][0-9A-Za-z]", "");
|
||||
}
|
||||
|
||||
public static BaseComponent[] toBaseComponents(@Nullable CommandSender receiver, @NotNull String text) {
|
||||
ComponentBuilder builder = new ComponentBuilder("");
|
||||
ArrayList<String> placeholders = new ArrayList<>();
|
||||
Matcher matcher = PLACEHOLDER_PATTERN.matcher(text);
|
||||
while (matcher.find()) {
|
||||
placeholders.add(matcher.group(0));
|
||||
}
|
||||
String[] split = PLACEHOLDER_PATTERN.split(text);
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
builder.append(split[i]);
|
||||
if (i >= placeholders.size()) {
|
||||
continue;
|
||||
}
|
||||
appendPlaceholder(receiver, builder, placeholders.get(i));
|
||||
}
|
||||
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void appendPlaceholder(@Nullable CommandSender receiver, ComponentBuilder builder, String placeholder) {
|
||||
Matcher matcher = PLACEHOLDER_PATTERN.matcher(placeholder);
|
||||
if (!matcher.find()) {
|
||||
return;
|
||||
}
|
||||
placeholder = matcher.group(2);
|
||||
builder.retain(FormatRetention.FORMATTING).append(lang("clickable." + placeholder, receiver))
|
||||
.event(new ClickEvent(RUN_COMMAND, "/" + placeholder))
|
||||
.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(
|
||||
(lang("hover.click.to." + placeholder, receiver)))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Breaks a raw string up into a series of lines. Words are wrapped using
|
||||
* spaces as decimeters and the newline character is respected.
|
||||
*
|
||||
* @param rawString The raw string to break.
|
||||
* @param lineLength The length of a line of text.
|
||||
* @return An array of word-wrapped lines.
|
||||
*/
|
||||
@NotNull
|
||||
public static String[] wordWrap(@Nullable String rawString, int lineLength) {
|
||||
// A null string is a single line
|
||||
if (rawString == null) {
|
||||
return new String[]{""};
|
||||
}
|
||||
|
||||
// A string shorter than the lineWidth is a single line
|
||||
if (rawString.length() <= lineLength && !rawString.contains("\n")) {
|
||||
return new String[]{rawString};
|
||||
}
|
||||
|
||||
Pattern splitPattern = Pattern.compile("(?<=\\G.{" + lineLength + "})");
|
||||
char[] rawChars = (rawString + ' ').toCharArray(); // add a trailing space to trigger pagination
|
||||
StringBuilder word = new StringBuilder();
|
||||
StringBuilder line = new StringBuilder();
|
||||
List<String> lines = new LinkedList<>();
|
||||
int lineColorChars = 0;
|
||||
|
||||
for (int i = 0; i < rawChars.length; i++) {
|
||||
char c = rawChars[i];
|
||||
|
||||
// skip chat color modifiers
|
||||
if (c == ChatColor.COLOR_CHAR) {
|
||||
word.append(ChatColor.COLOR_CHAR);
|
||||
word.append(rawChars[i + 1]);
|
||||
lineColorChars += 2;
|
||||
i++; // Eat the next character as we have already processed it
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == ' ' || c == '\n') {
|
||||
|
||||
if (line.length() == 0 && word.length() - lineColorChars > lineLength) { // special case: extremely long word begins a line
|
||||
lines.addAll(Arrays.asList(splitPattern.split(word.toString())));
|
||||
} else if (line.length() + 1 + word.length() - lineColorChars == lineLength) { // Line exactly the correct length...newline
|
||||
if (line.length() > 0) {
|
||||
line.append(' ');
|
||||
}
|
||||
line.append(word);
|
||||
lines.add(line.toString());
|
||||
line = new StringBuilder();
|
||||
lineColorChars = 0;
|
||||
} else if (line.length() + 1 + word.length() - lineColorChars > lineLength) { // Line too long...break the line
|
||||
for (String partialWord : splitPattern.split(word.toString())) {
|
||||
lines.add(line.toString());
|
||||
line = new StringBuilder(partialWord);
|
||||
}
|
||||
lineColorChars = 0;
|
||||
} else {
|
||||
if (line.length() > 0) {
|
||||
line.append(' ');
|
||||
}
|
||||
line.append(word);
|
||||
}
|
||||
word = new StringBuilder();
|
||||
|
||||
if (c == '\n') { // Newline forces the line to flush
|
||||
lines.add(line.toString());
|
||||
line = new StringBuilder();
|
||||
}
|
||||
} else {
|
||||
word.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
if (line.length() > 0) { // Only add the last line if there is anything to add
|
||||
lines.add(line.toString());
|
||||
}
|
||||
|
||||
// Iterate over the wrapped lines, applying the last color from one line to the beginning of the next
|
||||
applyLastColorToFollowingLines(lines);
|
||||
|
||||
return lines.toArray(new String[0]);
|
||||
}
|
||||
|
||||
private static void applyLastColorToFollowingLines(List<String> lines) {
|
||||
if (lines.get(0).length() == 0 || lines.get(0).charAt(0) != ChatColor.COLOR_CHAR) {
|
||||
lines.set(0, ChatColor.WHITE + lines.get(0));
|
||||
}
|
||||
for (int i = 1; i < lines.size(); i++) {
|
||||
final String pLine = lines.get(i - 1);
|
||||
final String subLine = lines.get(i);
|
||||
|
||||
char color = pLine.charAt(pLine.lastIndexOf(ChatColor.COLOR_CHAR) + 1);
|
||||
if (subLine.length() == 0 || subLine.charAt(0) != ChatColor.COLOR_CHAR) {
|
||||
lines.set(i, ChatColor.getByChar(color) + subLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,6 @@ import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
|
||||
public class TagValidator {
|
||||
@@ -31,9 +29,9 @@ public class TagValidator {
|
||||
*/
|
||||
@Nullable
|
||||
public String getErrorMessage() {
|
||||
String cleanTag = Helper.stripColors(this.tag);
|
||||
if (tag.length() > 25) {
|
||||
return lang("your.clan.color.tag.cannot.be.longer.than.characters", player, 25);
|
||||
String cleanTag = ChatUtils.stripColors(this.tag);
|
||||
if (tag.length() > 255 && plugin.getSettingsManager().isUseMysql()) {
|
||||
return lang("your.clan.color.tag.cannot.be.longer.than.characters", player, 255);
|
||||
}
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.mod.bypass")) {
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -52,7 +53,7 @@ public class UpdateChecker {
|
||||
if (parse.isJsonObject()) {
|
||||
String latestVersion = parse.getAsJsonObject().get("name").getAsString();
|
||||
|
||||
if (!version.equals(latestVersion)) {
|
||||
if (compareVersions(version, latestVersion) < 0) {
|
||||
plugin.getLogger().info(String.format("You're running an outdated version (%s).", version));
|
||||
plugin.getLogger().info(String.format("The latest version is %s. Download it at:", latestVersion));
|
||||
plugin.getLogger().info("https://www.spigotmc.org/resources/simpleclans.71242/");
|
||||
@@ -69,4 +70,18 @@ public class UpdateChecker {
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
public static int compareVersions(@NotNull String a, @NotNull String b) {
|
||||
String[] aSplit = a.split("\\.");
|
||||
String[] bSplit = b.split("\\.");
|
||||
int length = Math.max(aSplit.length, bSplit.length);
|
||||
for (int i = 0; i < length; i++) {
|
||||
int aPart = aSplit.length > i ? Integer.parseInt(aSplit[i]) : 0;
|
||||
int bPart = bSplit.length > i ? Integer.parseInt(bSplit[i]) : 0;
|
||||
if (aPart != bPart) {
|
||||
return Integer.compare(aPart, bPart);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ create.command=create
|
||||
delete.command=delete
|
||||
rank.command=rank
|
||||
setdisplayname.command=setdisplayname
|
||||
setdefault.command=setdefault
|
||||
removedefault.command=removedefault
|
||||
permissions.command=permissions
|
||||
list.command=list
|
||||
list.order.asc=asc
|
||||
@@ -49,6 +51,7 @@ purge.command=purge
|
||||
trust.command=trust
|
||||
untrust.command=untrust
|
||||
admin.command=admin
|
||||
mod.command=mod
|
||||
promote.command=promote
|
||||
demote.command=demote
|
||||
clanff.command=clanff
|
||||
@@ -177,6 +180,8 @@ command.description.rank.create=Creates a rank
|
||||
command.description.rank.delete=Deletes a rank
|
||||
command.description.rank.list=Lists your clan''s ranks
|
||||
command.description.rank.setdisplayname=Sets a rank''s display name
|
||||
command.description.rank.setdefault=Sets the default rank
|
||||
command.description.rank.removedefault=Removes the default rank
|
||||
command.description.rank.permissions.available=Lists the available rank permissions
|
||||
command.description.rank.permissions.rank=Lists a rank''s permissions
|
||||
command.description.rank.permissions.add=Adds a permission to a rank
|
||||
@@ -209,6 +214,7 @@ leader=leader
|
||||
roster=roster
|
||||
trusted=trusted
|
||||
untrusted=untrusted
|
||||
in.rank=in rank
|
||||
deaths=Deaths
|
||||
weights=Weights
|
||||
stats=stats
|
||||
@@ -256,7 +262,12 @@ inviting.you.to.join={0} is inviting you to join {1}
|
||||
asking.for.the.deletion={0} is asking for the deletion of the clan
|
||||
asking.for.the.promotion={0} is asking for the promotion of {1}
|
||||
asking.for.the.demotion={0} is asking for the demotion of {1}
|
||||
accept.or.deny={0} or {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
request.message= \n &8[&8{0}&8] &b{1}\n %accept% &bor %deny%\n
|
||||
clickable.accept=&a&l[ACCEPT]
|
||||
clickable.deny=&c&l[DENY]
|
||||
hover.click.to.accept=&aClick here to accept
|
||||
hover.click.to.deny=&cClick here to deny
|
||||
not.sufficient.money=You do not have sufficient money in your account
|
||||
account.has.been.debited=Your account has been debited {0}
|
||||
mysql.connection.successful=MySQL Connection successful
|
||||
@@ -349,6 +360,7 @@ inactive.0=Inactive: {0}
|
||||
clan.commands=clan commands
|
||||
you.can.only.modify.the.color.and.case.of.the.tag=You can only modify the color and case of the tag
|
||||
tag.changed.to.0=Tag changed to {0}
|
||||
0.tag.changed.to.1=&bSuccessfully changed {0}''s tag to {1}
|
||||
name.0=Name: {0}
|
||||
description.0=Description: {0}
|
||||
leaders.0=Leaders: {0}
|
||||
@@ -463,7 +475,9 @@ resign.no=No
|
||||
resign.confirmation=Are you sure you want to resign? {0}
|
||||
resign.success=You have successfully resigned from your clan
|
||||
you.cannot.demote.the.last.leader=You cannot demote the last leader
|
||||
you.cannot.move.the.last.leader=You cannot move the last leader
|
||||
player.successfully.demoted=The player was successfully demoted
|
||||
player.successfully.promoted=The player was successfully promoted
|
||||
bb.ago= ago
|
||||
bb.moments=moments
|
||||
bb.seconds= seconds
|
||||
@@ -489,6 +503,8 @@ no.description=No description
|
||||
the.player.must.wait.0.before.joining.your.clan.again=This player must wait {0} minute(s) before joining your clan again
|
||||
disabled.command=Disabled command
|
||||
rank.displayname.updated=The rank''s display name was updated!
|
||||
rank.setdefault=The clan''s default rank has now been set to {0}
|
||||
rank.removedefault=The clan''s default rank has been removed
|
||||
rank.0.permissions=Rank {0}''s permissions:
|
||||
available.rank.permissions=Available permissions for ranks:
|
||||
rank.already.exists=Rank already exists
|
||||
@@ -778,6 +794,7 @@ clans.not.at.war.pvp.denied=&cYour clan is not at war with {0}!
|
||||
cannot.attack.civilians=&cYou cannot attack civilians!
|
||||
cannot.attack.clan.member=&cYou cannot attack another clan member!
|
||||
cannot.attack.ally=&cYou cannot attack an ally!
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
cannot.change.member.fee.now=&cYou cannot change the member fee close to its collection time.
|
||||
cannot.change.member.fee.hours=&cTry again in {0} hours...
|
||||
cannot.change.member.fee.minutes=&cTry again in {0} minute(s)...
|
||||
@@ -0,0 +1,22 @@
|
||||
description.command=popis
|
||||
create.command=vytvořit
|
||||
delete.command=smazat
|
||||
rank.command=hodnost
|
||||
setdisplayname.command=setdisplayname
|
||||
permissions.command=permissions
|
||||
list.command=list
|
||||
list.order.asc=vzestupne
|
||||
list.order.desc=sestupne
|
||||
list.type.name=jmeno
|
||||
list.type.kdr=kdr
|
||||
list.type.size=velikost
|
||||
list.type.founded=nalezen
|
||||
list.type.active=aktivní
|
||||
profile.command=profil
|
||||
roster.command=roster
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -83,6 +83,7 @@ acf-core.parameter.order=bestellung
|
||||
acf-core.parameter.help=seite oder schlüsselwörter
|
||||
command.description.stats=Zeigt die Mitgliederstatistik deines Clans an
|
||||
command.description.rivalries=Zeigt alle Clan-Rivalitäten
|
||||
command.description.kick=Wirf ein Mitglied aus deinem Clan
|
||||
home-menu=/{0} Home{1} - Teleportiert dich in die Clan Basis
|
||||
home-set-menu=/{0} Home set{1} - Setzt die Clan Basis
|
||||
home-clear-menu=/{0} Home clear{1} - Entfernt die Clan Basis
|
||||
@@ -156,7 +157,7 @@ proposing.an.alliance={0} schlägt vor ein Allianz mit {1} einzugehen
|
||||
inviting.you.to.join={0} lädt dich zum Beitritt ein {1}
|
||||
asking.for.the.deletion={0} fragt nach einer Löschung des Clans
|
||||
asking.for.the.promotion={0} fragt nach einer Beförderung für {1}
|
||||
accept.or.deny={0} bzw. {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=Du hast nicht genügend Geld auf deinem Konto
|
||||
account.has.been.debited=Ihr Konto wurde belastet {0}
|
||||
mysql.connection.successful=Verbindung hergestellt
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
description.command=description
|
||||
create.command=create
|
||||
delete.command=delete
|
||||
delete.command=eliminar
|
||||
rank.command=rank
|
||||
setdisplayname.command=setdisplayname
|
||||
permissions.command=permissions
|
||||
permissions.command=permisos
|
||||
list.command=list
|
||||
list.order.asc=asc
|
||||
list.order.desc=desc
|
||||
list.type.name=name
|
||||
list.type.name=nombre
|
||||
list.type.kdr=kdr
|
||||
list.type.size=size
|
||||
list.type.founded=founded
|
||||
list.type.active=active
|
||||
list.type.size=tamaño
|
||||
list.type.founded=fundado
|
||||
list.type.active=activo
|
||||
profile.command=profile
|
||||
roster.command=roster
|
||||
lookup.command=lookup
|
||||
@@ -22,29 +22,29 @@ vitals.command=vitals
|
||||
coords.command=coords
|
||||
stats.command=stats
|
||||
ally.command=ally
|
||||
add.command=add
|
||||
remove.command=remove
|
||||
allow.command=allow
|
||||
block.command=block
|
||||
add.command=añadir
|
||||
remove.command=eliminar
|
||||
allow.command=permitir
|
||||
block.command=bloquear
|
||||
auto.command=auto
|
||||
check.command=check
|
||||
assign.command=assign
|
||||
unassign.command=unassign
|
||||
check.command=verificar
|
||||
assign.command=asignar
|
||||
unassign.command=desasignar
|
||||
rival.command=rival
|
||||
bb.command=bb
|
||||
clear.command=clear
|
||||
clear.command=limpiar
|
||||
modtag.command=modtag
|
||||
toggle.command=toggle
|
||||
tag.command=tag
|
||||
deposit.command=deposit
|
||||
all.command=all
|
||||
withdraw.command=withdraw
|
||||
tag.command=etiqueta
|
||||
deposit.command=deposito
|
||||
all.command=todo
|
||||
withdraw.command=retirar
|
||||
invite.command=invite
|
||||
kick.command=kick
|
||||
bank.command=bank
|
||||
status.command=status
|
||||
status.command=estado
|
||||
fee.command=fee
|
||||
set.command=set
|
||||
set.command=poner
|
||||
purge.command=purge
|
||||
trust.command=trust
|
||||
untrust.command=untrust
|
||||
@@ -63,27 +63,27 @@ globalff.command=globalff
|
||||
kills.command=kills
|
||||
mostkilled.command=mostkilled
|
||||
war.command=war
|
||||
start.command=start
|
||||
end.command=end
|
||||
start.command=iniciar
|
||||
end.command=terminar
|
||||
home.command=home
|
||||
regroup.command=regroup
|
||||
me.command=me
|
||||
regroup.command=reagrupar
|
||||
me.command=yo
|
||||
tp.command=tp
|
||||
setrank.command=setrank
|
||||
place.command=place
|
||||
resetkdr.command=resetkdr
|
||||
everyone.command=everyone
|
||||
setbanner.command=setbanner
|
||||
everyone.command=todos
|
||||
setbanner.command=fijarbanner
|
||||
help.command=ayuda
|
||||
acf-core.parameter.member=miembro
|
||||
acf-core.parameter.rank=rango
|
||||
acf-core.parameter.leader=líder
|
||||
acf-core.parameter.leader=lider
|
||||
acf-core.parameter.displayname=nombre de pantalla
|
||||
acf-core.parameter.permission=permiso
|
||||
acf-core.parameter.permission=permisos
|
||||
acf-core.parameter.message=mensaje
|
||||
acf-core.parameter.tag=tag
|
||||
acf-core.parameter.tag=etiqueta
|
||||
acf-core.parameter.fee=tarifa
|
||||
acf-core.parameter.description=descripción
|
||||
acf-core.parameter.description=descripcion
|
||||
acf-core.parameter.player=jugador
|
||||
acf-core.parameter.clan=clan
|
||||
acf-core.parameter.type=tipo
|
||||
@@ -255,7 +255,7 @@ inviting.you.to.join={0} te esta invitando unirte a {1}
|
||||
asking.for.the.deletion={0} esta solicitando la eliminacion del clan
|
||||
asking.for.the.promotion={0} esta solicitando promover a {1}
|
||||
asking.for.the.demotion={0} esta solicitando degradar a {1}
|
||||
accept.or.deny={0} o {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=No tienes suficiente dinero en tu cuenta
|
||||
account.has.been.debited=Se ha descontado de tu cuenta {0}
|
||||
mysql.connection.successful=MySQL Connection successful
|
||||
@@ -529,6 +529,7 @@ gui.main.reset.kdr.lore=&7Clic izquierdo para reiniciar tu KDR
|
||||
gui.main.leaderboard.title=&fTablero de posiciones
|
||||
gui.main.leaderboard.lore=&7Clic izquierdo para ver el tablero de posiciones
|
||||
gui.main.staff.title=&fStaff
|
||||
gui.main.staff.lore=&7Clic izquierdo para abrir el menú del personal
|
||||
gui.staff.title=Staff
|
||||
gui.staff.clan.list.lore.left.click=&7Clic izquierdo para ver la lista de clanes
|
||||
gui.staff.clan.list.lore.right.click=&7Clic derecho para ver la lista de clanes sin verificar
|
||||
@@ -750,3 +751,6 @@ clans.not.at.war.pvp.denied=&cTu clan no esta en guerra con {0}\!
|
||||
cannot.attack.civilians=&cNo puedes atacar civiles\!
|
||||
cannot.attack.clan.member=&cNo puedes atacar miembros de tu clan\!
|
||||
cannot.attack.ally=&cNo puedes atacar a un aliado\!
|
||||
cannot.change.member.fee.now=&cNo puedes cambiar la cuota de miembro cerca de su tiempo de recogida.
|
||||
cannot.change.member.fee.hours=&cInténtalo de nuevo en {0} horas...
|
||||
cannot.change.member.fee.minutes=&cInténtalo de nuevo en {0} minuto(s)...
|
||||
@@ -6,7 +6,7 @@ setdisplayname.command=setdisplayname
|
||||
permissions.command=permissions
|
||||
list.command=liste
|
||||
list.order.desc=desc
|
||||
list.type.name=nome
|
||||
list.type.name=nom
|
||||
list.type.kdr=kda
|
||||
list.type.size=taille
|
||||
list.type.founded=fondé
|
||||
@@ -21,7 +21,7 @@ vitals.command=vitaux
|
||||
coords.command=coordonnées
|
||||
stats.command=statistiques
|
||||
ally.command=allie
|
||||
add.command=ajouter
|
||||
add.command=ajoute
|
||||
remove.command=retirer
|
||||
allow.command=autoriser
|
||||
block.command=bloquer
|
||||
@@ -48,6 +48,7 @@ purge.command=purge
|
||||
trust.command=confiance
|
||||
untrust.command=méfiance
|
||||
admin.command=admin
|
||||
mod.command=modérateur
|
||||
promote.command=promouvoir
|
||||
demote.command=rétrograder
|
||||
clanff.command=clanff
|
||||
@@ -81,10 +82,12 @@ acf-core.parameter.displayname=Nom affiché
|
||||
acf-core.parameter.permission=autorisation
|
||||
acf-core.parameter.message=message
|
||||
acf-core.parameter.tag=tag
|
||||
acf-core.parameter.name=nom
|
||||
acf-core.parameter.description=description
|
||||
acf-core.parameter.player=joueur
|
||||
acf-core.parameter.clan=clan
|
||||
acf-core.parameter.help=page ou mots-clés
|
||||
command.description.stats=Montre les stats des membres de votre clan
|
||||
command.description.list=Liste de tous les clans
|
||||
command.description.ally=Parle dans le chat des alliés
|
||||
command.description.deny=Refuser une demande
|
||||
@@ -212,7 +215,7 @@ inviting.you.to.join={0} vous invite à rejoindre {1}
|
||||
asking.for.the.deletion={0} demande la suppression du clan
|
||||
asking.for.the.promotion={0} demande la promotion de {1}
|
||||
asking.for.the.demotion={0} demande la rétrogradation de {1}
|
||||
accept.or.deny={0} ou {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=Vous n'avez pas assez d'argent sur votre compte
|
||||
account.has.been.debited=Votre compte a été débité {0}
|
||||
mysql.connection.successful=MySQL Connexion réussie
|
||||
|
||||
@@ -72,7 +72,7 @@ inviting.you.to.join={0} meghívott téged, hogy csatlakozz {1}
|
||||
asking.for.the.deletion={0} a klán törlését kéri
|
||||
asking.for.the.promotion={0} kéri a promóció {1}
|
||||
asking.for.the.demotion={0} kéri a promóció {1}
|
||||
accept.or.deny={0} vagy {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=Nincs elegendő pénz a fiókodban
|
||||
account.has.been.debited=A fiókod terhelésre került {0}
|
||||
mysql.connection.successful=MySQL kapcsolat sikeres
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
description.command=descrizione
|
||||
create.command=creare
|
||||
create.command=crea
|
||||
delete.command=elimina
|
||||
rank.command=grado
|
||||
rank.command=rango
|
||||
profile.command=profilo
|
||||
roster.command=membri
|
||||
lookup.command=ricerca
|
||||
@@ -144,7 +144,7 @@ proposing.an.alliance={0} sta proponendo un''alleanza con {1}
|
||||
inviting.you.to.join={0} ti sta invitando ad unirti a {1}
|
||||
asking.for.the.deletion={0} chiede l''eliminazione del clan
|
||||
asking.for.the.promotion={0} chiede la promozione di {1}
|
||||
accept.or.deny={0} oppure {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=Non hai abbastanza soldi sul tuo conto
|
||||
mysql.connection.successful=Connessione MySQL riuscita
|
||||
mysql.connection.failed=Connessione MySQL fallita
|
||||
|
||||
@@ -95,4 +95,5 @@ command.description.regroup.me=Hergroepeert je clan leden naar je locatie
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -46,4 +46,5 @@ help.command=hjelp
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -1,5 +1,5 @@
|
||||
description.command=opis
|
||||
create.command=stworz
|
||||
description.command=Opis
|
||||
create.command=utwórz
|
||||
delete.command=usun
|
||||
rank.command=ranking
|
||||
setdisplayname.command=ustaw nazwe wyswietlana
|
||||
@@ -255,7 +255,7 @@ inviting.you.to.join={0} zaprasza cie do przylaczenia sie do {1}}
|
||||
asking.for.the.deletion={0} wnioskuje za usunieciem klanu
|
||||
asking.for.the.promotion={0} wnioskuje o awansowanie {1}
|
||||
asking.for.the.demotion={0} wnioskuje o degradacje {1}
|
||||
accept.or.deny={0} lub {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=Nie posiadasz wystarczajacej ilosci dukatow
|
||||
account.has.been.debited=Twoje konto zostalo zmniejszone o {0}
|
||||
mysql.connection.successful=MySQL udane polaczenie
|
||||
@@ -753,4 +753,4 @@ cannot.attack.clan.member=&cNie możesz zaatakować innego członka klanu\!
|
||||
cannot.attack.ally=&cNie możesz zaatakować sojusznika\!
|
||||
cannot.change.member.fee.now=&cNie możesz zmienić składki członkowskiej blisko czasu jej pobrania.
|
||||
cannot.change.member.fee.hours=&cSpróbuj ponownie za {0} godzin...
|
||||
cannot.change.member.fee.minutes=&cSpróbuj ponownie za {0} minut...
|
||||
cannot.change.member.fee.minutes=&cSpróbuj ponownie za {0} minut...
|
||||
@@ -49,6 +49,7 @@ purge.command=apagar
|
||||
trust.command=confiar
|
||||
untrust.command=naoconfiar
|
||||
admin.command=admin
|
||||
mod.command=mod
|
||||
promote.command=promover
|
||||
demote.command=rebaixar
|
||||
clanff.command=clanff
|
||||
@@ -82,6 +83,7 @@ acf-core.parameter.displayname=nome de exibição
|
||||
acf-core.parameter.permission=permissão
|
||||
acf-core.parameter.message=mensagem
|
||||
acf-core.parameter.tag=tag
|
||||
acf-core.parameter.name=nome
|
||||
acf-core.parameter.fee=taxa
|
||||
acf-core.parameter.description=descrição
|
||||
acf-core.parameter.player=jogador
|
||||
@@ -208,6 +210,7 @@ leader=líder
|
||||
roster=membros
|
||||
trusted=confiável
|
||||
untrusted=não-confiável
|
||||
in.rank=no cargo
|
||||
deaths=Morreu
|
||||
weights=Pesos
|
||||
stats=estatísticas
|
||||
@@ -255,7 +258,12 @@ inviting.you.to.join={0} está te convidando para ser membro de {1}
|
||||
asking.for.the.deletion={0} está pedindo pela remoção do clã
|
||||
asking.for.the.promotion={0} está pedindo pela promoção de {1}
|
||||
asking.for.the.demotion={0} está pedindo pelo rebaixamento de {1}
|
||||
accept.or.deny={0} ou {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
request.message= \n &8[&8{0}&8] &b{1}\n %accept% &bou %deny%\n
|
||||
clickable.accept=&a&l[ACEITAR]
|
||||
clickable.deny=&c&l[REJEITAR]
|
||||
hover.click.to.accept=&aClique aqui para aceitar
|
||||
hover.click.to.deny=&cClique aqui para rejeitar
|
||||
not.sufficient.money=Você não tem dinheiro suficiente em sua conta
|
||||
account.has.been.debited={0} foram debitados de sua conta
|
||||
mysql.connection.successful=Conexão MySQL bem sucedida
|
||||
@@ -348,6 +356,7 @@ inactive.0=Inativo\: {0}
|
||||
clan.commands=comandos de clã
|
||||
you.can.only.modify.the.color.and.case.of.the.tag=Você pode modificar apenas a cor ou a caixa (maiúsculo ou minúsculo) da tag
|
||||
tag.changed.to.0=Tag modificada para {0}
|
||||
0.tag.changed.to.1=&bAlterou a tag do clã de {0} para {1}
|
||||
name.0=Nome\: {0}
|
||||
description.0=Descrição\: {0}
|
||||
leaders.0=Líderes\: {0}
|
||||
@@ -529,7 +538,7 @@ gui.main.reset.kdr.lore=&7Clique com o botão esquerdo para redefinir o seu KDR
|
||||
gui.main.leaderboard.title=&fRanking
|
||||
gui.main.leaderboard.lore=&7Clique com o botão esquerdo para ver o ranking
|
||||
gui.main.staff.title=&fEquipe
|
||||
gui.main.staff.lore=&7Clique com o botão esquerdo para abrir o menu da Staff
|
||||
gui.main.staff.lore=&7Clique com o botão esquerdo para abrir o menu da equipe
|
||||
gui.staff.title=Equipe
|
||||
gui.staff.clan.list.lore.left.click=&7Clique com o botão esquerdo para ver todos os clãs
|
||||
gui.staff.clan.list.lore.right.click=&7Clique com o botão direito para ver todos os clãs não verificados
|
||||
@@ -753,4 +762,4 @@ cannot.attack.clan.member=&cVocê não pode atacar um membro do clã\!
|
||||
cannot.attack.ally=&cVocê não pode atacar um aliado\!
|
||||
cannot.change.member.fee.now=&cVocê não pode modificar a taxa perto do horário de coleta.
|
||||
cannot.change.member.fee.hours=&cTente novamente em {0} horas...
|
||||
cannot.change.member.fee.minutes=&cTente novamente em {0} minuto(s)...
|
||||
cannot.change.member.fee.minutes=&cTente novamente em {0} minuto(s)...
|
||||
@@ -73,4 +73,5 @@ command.description.regroup.home=Adu' membri clanului la casa ta
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -49,6 +49,7 @@ purge.command=очистка
|
||||
trust.command=доверие
|
||||
untrust.command=недоверие
|
||||
admin.command=админ
|
||||
mod.command=мод
|
||||
promote.command=повысить
|
||||
demote.command=понизить
|
||||
clanff.command=кланфф
|
||||
@@ -66,7 +67,7 @@ war.command=война
|
||||
start.command=начать
|
||||
end.command=конец
|
||||
home.command=дом
|
||||
regroup.command=перегруппироваться
|
||||
regroup.command=созвать
|
||||
me.command=мне
|
||||
tp.command=телепортировать
|
||||
setrank.command=установить ранг
|
||||
@@ -82,6 +83,7 @@ acf-core.parameter.displayname=отображаемое имя
|
||||
acf-core.parameter.permission=права
|
||||
acf-core.parameter.message=сообщение
|
||||
acf-core.parameter.tag=тег
|
||||
acf-core.parameter.name=имя
|
||||
acf-core.parameter.fee=комиссия
|
||||
acf-core.parameter.description=описание
|
||||
acf-core.parameter.player=игрок
|
||||
@@ -92,7 +94,7 @@ acf-core.parameter.help=страница или ключевые слова
|
||||
command.description.stats=Показать статистику участников вашего клана
|
||||
command.description.rivalries=Показать всех соперников клана
|
||||
command.description.mostkilled=Показать общую статистику убийств на всём сервере
|
||||
command.description.kills=Показывает количество убийств вашего или другого игрока
|
||||
command.description.kills=Показать количество убийств вашего или другого игрока
|
||||
command.description.lookup=Посмотреть информацию о себе
|
||||
command.description.lookup.other=Посмотреть информацию об игроке
|
||||
command.description.leaderboard=Показать таблицу лидеров
|
||||
@@ -108,16 +110,16 @@ command.description.deny=Отклонить запрос
|
||||
command.description.accept=Принять запрос
|
||||
command.description.more=Показать больше информации
|
||||
command.description.create=Создать клан
|
||||
command.description.ff.allow=Разрешить участникам вашего клана бить друг друга
|
||||
command.description.ff.allow=Разрешить "огонь по своим" для вас
|
||||
command.description.ff.auto=Установить ваш статус "огонь по своим" по умолчанию
|
||||
command.description.globalff.allow=Разрешить участникам всех кланов бить друг друга
|
||||
command.description.globalff.allow=Установить глобальный статус "огонь по своим" на разрешено
|
||||
command.description.globalff.auto=Установить глобальный статус "огонь по своим" по умолчанию
|
||||
command.description.clanff.allow=Разрешить "огонь по своим" участникам вашего клана
|
||||
command.description.clanff.block=Запретить "огонь по своим" участникам вашего клана
|
||||
command.description.description=Установить описание вашего клана
|
||||
command.description.ban=Запретить игроку использовать команды клана
|
||||
command.description.unban=Разрешить игроку использовать команды клана
|
||||
command.description.regroup.me=Перегруппировать участников вашего клана в ваше текущее местоположение
|
||||
command.description.regroup.me=Созвать участников вашего клана к вам
|
||||
command.description.regroup.home=Созвать всех участников на вашу базу
|
||||
command.description.home.tp=Телепортироваться на базу вашего клана
|
||||
command.description.home.clear=Удалить базу вашего клана
|
||||
@@ -163,7 +165,7 @@ command.description.admin.demote=Понизить лидера из любого
|
||||
command.description.demote=Понизить лидера
|
||||
command.description.admin.promote=Повысить любого участника из любого клана
|
||||
command.description.promote=Повысить участника до лидера
|
||||
command.description.toggle.bb=Следует ли показывать вашим участникам доску объявлений при входе на сервер
|
||||
command.description.toggle.bb=Следует ли показывать доску объявлений при входе на сервер
|
||||
command.description.toggle.tag=Показывать ли рядом с вашим именем тег клана
|
||||
command.description.toggle.deposit=Можно ли вносить средства в банковский счёт вашего клана
|
||||
command.description.toggle.withdraw=Можно ли выводить средства с банковского счёта вашего клана
|
||||
@@ -208,6 +210,7 @@ leader=лидер
|
||||
roster=список
|
||||
trusted=проверенный
|
||||
untrusted=недоверенный
|
||||
in.rank=в ранге
|
||||
deaths=Смертей
|
||||
weights=Весит
|
||||
stats=статистика
|
||||
@@ -222,7 +225,7 @@ profile=профиль
|
||||
civilian.abbreviation=Жители
|
||||
rank=Ранг
|
||||
leaders=Лидеры
|
||||
none=Нету
|
||||
none=Нет
|
||||
today=Сегодня
|
||||
kills=Убиты
|
||||
mostkilled=Наибольшее число убийств
|
||||
@@ -255,7 +258,12 @@ inviting.you.to.join={0} пригласил вас присоединится к
|
||||
asking.for.the.deletion={0} предлагает удалить клан
|
||||
asking.for.the.promotion={0} просит повышение {1}
|
||||
asking.for.the.demotion={0} просит понизить {1}
|
||||
accept.or.deny={0} или {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
request.message= \n&8[&8{0}&8] &b{1}\n %accept% &bили %deny%\n
|
||||
clickable.accept=&a&l[ПРИНЯТЬ]
|
||||
clickable.deny=&c&l[ОТКЛОНИТЬ]
|
||||
hover.click.to.accept=Нажмите, чтобы принять
|
||||
hover.click.to.deny=Нажмите, чтобы отклонить
|
||||
not.sufficient.money=На вашем балансе недостаточно средств
|
||||
account.has.been.debited=С вашего баланса было списано {0}
|
||||
mysql.connection.successful=Соединение с MySQL прошло успешно
|
||||
@@ -271,7 +279,7 @@ nothing.more.to.see=Больше ничего нет
|
||||
nothing.to.vote=&cНечего принимать или отклонять
|
||||
no.leader.permissions=Вы не имеете права лидера
|
||||
you.have.already.voted=Вы уже проголосовали
|
||||
has.voted.to.deny={0} проголосовал за отказ
|
||||
has.voted.to.deny={0} проголосовал, чтобы отклонить
|
||||
view.next.page=Введите /{0} для просмотра следующей страницы.
|
||||
voted.to.accept={0} проголосовал за принятие
|
||||
bulletin.board.header={0}* {1}{2} доска объявлений
|
||||
@@ -348,6 +356,7 @@ inactive.0=Неактивно\: {0}
|
||||
clan.commands=команды клана
|
||||
you.can.only.modify.the.color.and.case.of.the.tag=Вы можете изменить только цвет и регистр тега
|
||||
tag.changed.to.0=Тег изменён на {0}
|
||||
0.tag.changed.to.1=&bТег {0} успешно изменён на {1}
|
||||
name.0=Имя\: {0}
|
||||
description.0=Описание\:{0}
|
||||
leaders.0=Лидер\: {0}
|
||||
@@ -425,7 +434,7 @@ depositoff=Пополнение выключено
|
||||
withdrawon=Вывод включён
|
||||
withdrawoff=Вывод выключен
|
||||
feeoff=Участники клана больше не вносят комиссию на банковский счёт вашего клана.
|
||||
feeon=Участники клана теперь вносят комиссию на банковский счёт вашего клана. \nУчастники, не имеющие достаточное количество денег, будут автоматически кикнуты с клана.
|
||||
feeon=Участники клана теперь вносят комиссию на банковский счёт вашего клана. Участники, не имеющие достаточное количество денег, будут автоматически кикнуты с клана.
|
||||
home.base.only.once=База клана может быть установлена лишь один раз
|
||||
now.at.homebase=Вы сейчас находитесь на базе клана {0}
|
||||
hombase.set=База клана\: {0}
|
||||
@@ -436,7 +445,7 @@ rival.limit.reached=Вы достигли лимита войн, пока что
|
||||
you.moved.teleport.cancelled=Вы перемещены, телепортация отменена
|
||||
waiting.for.teleport.stand.still.for.0.seconds=Ожидание телепортирования, оставайтесь на месте ещё {0} секунд
|
||||
on=включить
|
||||
off=Выключить
|
||||
off=выключить
|
||||
leave=покинуть
|
||||
join=присоединиться
|
||||
mute=молчать
|
||||
@@ -521,7 +530,7 @@ gui.main.languageselector.lore.left.click=&7ЛКМ\: Посмотреть спи
|
||||
gui.main.languageselector.lore.right.click=&7ПКМ\: &bПомочь с переводом
|
||||
gui.main.other.commands.title=&fДругие команды
|
||||
gui.main.other.commands.lore=&7ЛКМ\: Посмотреть все команды клана
|
||||
gui.main.clan.list.title=&fСписок Кланов
|
||||
gui.main.clan.list.title=&fСписок кланов
|
||||
gui.main.clan.list.lore=&7ЛКМ\: Список всех кланов
|
||||
gui.main.reset.kdr.title=&fСбросить KDR
|
||||
gui.main.reset.kdr.lore.price=&7Цена\: &b{0}
|
||||
@@ -569,7 +578,7 @@ gui.clanlist.clan.lore.members=&7Участники\: &b{0}
|
||||
gui.coords.title=Координаты
|
||||
gui.coords.player.lore.distance=&7Расстояние\: &b{0}
|
||||
gui.coords.player.lore.coords=&7Координаты\: &b{0} {1} {2}
|
||||
gui.coords.player.lore.world=&fМир\: {0}
|
||||
gui.coords.player.lore.world=&7Мир\: &b{0}
|
||||
gui.invite.title=Пригласить игрока
|
||||
gui.invite.player.title=&f{0}
|
||||
gui.invite.player.price.lore=&7Цена\: &b{0}
|
||||
@@ -605,7 +614,7 @@ gui.clandetails.clan.lore.status=&7Статус\: &b{0}
|
||||
gui.clandetails.clan.lore.leaders=&7Лидеры\: &b{0}
|
||||
gui.clandetails.clan.lore.online.members=&7Участников онлайн\: &b{0}/{1}
|
||||
gui.clandetails.clan.lore.kdr=&7KDR\: &b{0}
|
||||
gui.clandetails.clan.lore.kill.totals=&7Убито всего\: &b[Враги\:{0} Нейтральные\:{1} Игроки\:{2}]
|
||||
gui.clandetails.clan.lore.kill.totals=&7Убито всего\: &b[Соперники\: {0} Нейтралы\: {1} Без клана\: {2}]
|
||||
gui.clandetails.clan.lore.deaths=&7Смертей\: &b{0}
|
||||
gui.clandetails.clan.lore.fee=&7Комиссия\: &b{0}, {1}$
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -629,11 +638,11 @@ gui.clandetails.home.title=&fДом
|
||||
gui.clandetails.home.lore.teleport.price=&7Цена телепортирования\: &b{0}
|
||||
gui.clandetails.home.lore.teleport=&7ЛКМ\: Телепортироваться на базу вашего клана
|
||||
gui.staffclandetails.home.lore.teleport=&7ЛКМ\: Телепорироваться на базу этого клана
|
||||
gui.clandetails.home.lore.clear=&7Кликните средней кнопкой мыши, чтобы очистить дом вашего клана
|
||||
gui.clandetails.home.lore.clear=&7СКМ\: Удалить точку базы вашего клана
|
||||
gui.clandetails.home.lore.set.price=&7Установить цену\: &b{0}
|
||||
gui.clandetails.home.lore.set=&7ПКМ\: Установить точку базы вашего клана
|
||||
gui.staffclandetails.home.lore.set=&7ПКМ\: Установить точку базы для этого клана
|
||||
gui.clandetails.regroup.title=&fПерегруппировать
|
||||
gui.clandetails.regroup.title=&fСозвать
|
||||
gui.clandetails.regroup.lore.price=&7Цена\: &b{0}
|
||||
gui.clandetails.regroup.lore.home=&7ЛКМ\: Телепортировать всех участников вашего клана на базу
|
||||
gui.clandetails.regroup.lore.me=&7ПКМ\: Телепортировать участников вашего клана к вам
|
||||
@@ -653,7 +662,7 @@ gui.clandetails.fee.status.lore=&7Статус\: &b{0}
|
||||
gui.clandetails.fee.value.lore=&7Значение\: &b{0}
|
||||
gui.clandetails.fee.toggle.lore=&7ЛКМ\: Изменить статус комиссии
|
||||
gui.clandetails.rank.title=&fРанг
|
||||
gui.clandetails.rank.lore=&7ЛКМ\: Посмотреть список рангов клана и их редактирование
|
||||
gui.clandetails.rank.lore=&7ЛКМ\: Посмотреть ранги клана и редактировать их
|
||||
gui.clandetails.verified.title=&fПодтвержден
|
||||
gui.clandetails.not.verified.title=&fНе подтвержден
|
||||
gui.clandetails.verify.price.lore=&7Цена\: &b{0}
|
||||
@@ -680,7 +689,7 @@ gui.playerdetails.player.lore.clan=&7Клан\: &b[{0}&b] {1}
|
||||
gui.playerdetails.player.lore.rank=&7Ранг\: &b{0}
|
||||
gui.playerdetails.player.lore.status=&7Статус\: &b{0}
|
||||
gui.playerdetails.player.lore.kdr=&7KDR\: &b{0}
|
||||
gui.playerdetails.player.lore.kill.totals=&7Убито всего\: &b[Враги\:{0} Нейтральные\:{1} Игроки\:{2}]
|
||||
gui.playerdetails.player.lore.kill.totals=&7Убито всего\: &b[Соперники\: {0} Нейтралы\: {1} Без клана\: {2}]
|
||||
gui.playerdetails.player.lore.deaths=&7Смертей\: &b{0}
|
||||
gui.playerdetails.player.lore.join.date=&7Дата вступления\: &b{0}
|
||||
gui.playerdetails.player.lore.last.seen=&7Был в сети\: &b{0}
|
||||
@@ -737,7 +746,7 @@ you.must.hold.a.banner=&cУ вас в руках должен быть флаг\
|
||||
you.changed.clan.banner=&bВы изменили флаг своего клана\!
|
||||
your.clan.already.verified=&cКлан уже подтвержден\!
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
clan.profile=\n&7Профиль клана &b%clan_name% &8-------------------------------------------\n \n &7Название\: &e[&8%clan_color_tag%&e] &b%clan_name%\n &7Описание\: &f%clan_description%\n &7Статус\: &f%clan_verified%\n &7Лидеры\: %clan_leaders%\n &7Участников онлайн\: &f%clan_online_count%&7/&f%clan_size%\n &7KDR\: &e%clan_kdr%\n &7Всего убийств\: &8[Соперников\: &f%clan_rival_kills%, &8Нейтральных\: &f%clan_neutral_kills%, &8Гражданских\:&f%clan_civilian_kills%&8]\n &7Смертей\: &f%clan_deaths%\n &7Комиссия\: &f%clan_fee_enabled%&7, &f%clan_fee_value% $\n &7Союзники\: &f%clan_allies%\n &7Соперники\: &f%clan_rivals%\n &7Основан\: &f%clan_founded%\n &7Неактивность клана\: &f%clan_inactive_days%&7/&f%clan_max_inactive_days% дня\n
|
||||
clan.profile=\n&7Профиль клана &b%clan_name% &8-------------------------------------------\n \n &7Название\: &e[&8%clan_color_tag%&e] &b%clan_name%\n &7Описание\: &f%clan_description%\n &7Статус\: &f%clan_verified%\n &7Лидеры\: %clan_leaders%\n &7Участников онлайн\: &f%clan_online_count%&7/&f%clan_size%\n &7KDR\: &e%clan_kdr%\n &7Всего убийств\: &8[Соперников\:&f%clan_rival_kills% &8Нейтральных\:&f%clan_neutral_kills% &8Гражданских\:&f%clan_civilian_kills%&8]\n &7Смерти\: &f%clan_deaths%\n &7Комиссия\: &f%clan_fee_enabled%&7, &f%clan_fee_value% $\n &7Союзники\: &f%clan_allies%\n &7Враги\: &f%clan_rivals%\n &7Основан\: &f%clan_founded%\n &7Неактивно\: &f%clan_inactive_days%&7/&f%clan_max_inactive_days% дня\n
|
||||
player.lookup.clanname=&e[&8%clan_color_tag%&e] &b%clan_name%
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
player.lookup.killtype=&7Тип убийства\: %player_kill_type%\n
|
||||
@@ -753,4 +762,4 @@ cannot.attack.clan.member=&cВы не можете атаковать участ
|
||||
cannot.attack.ally=&cВы не можете атаковать союзников\!
|
||||
cannot.change.member.fee.now=&cИзменить комиссию участника клана невозможно, так как приближается время её сбора
|
||||
cannot.change.member.fee.hours=&cПовторите попытку через {0} часов...
|
||||
cannot.change.member.fee.minutes=&cПовторите попытку через {0} минут(ы)...
|
||||
cannot.change.member.fee.minutes=&cПовторите попытку через {0} минут(ы)...
|
||||
@@ -36,4 +36,5 @@ reload.command=omladda
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -140,7 +140,7 @@ inviting.you.to.join={0} seni klana katılmaya davet ediyor {1}
|
||||
asking.for.the.deletion={0} Klanın silinmesini istiyor
|
||||
asking.for.the.promotion={0} Promosyonunu istiyor {1}
|
||||
asking.for.the.demotion={0} düşmanı istiyor {1}
|
||||
accept.or.deny={0} veya {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=Hesabınızda yeterli para yok
|
||||
account.has.been.debited={0} Hesabınız borçlandırıldı
|
||||
mysql.connection.successful=MySQL bağlantısı başarılı
|
||||
|
||||
@@ -43,4 +43,5 @@ help.command=допомогу
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -115,7 +115,7 @@ inviting.you.to.join={0} 邀请您加入 {1}
|
||||
asking.for.the.deletion={0} 正在请求删除帮派
|
||||
asking.for.the.promotion={0} 正在请求 {1} 的提升
|
||||
asking.for.the.demotion={0} 正在请求 {1} 的降级
|
||||
accept.or.deny={0} 或 {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
not.sufficient.money=您的账户没有足够的资金
|
||||
account.has.been.debited=你的账户已经被扣除了 {0}
|
||||
mysql.connection.successful=MySQL 连接成功
|
||||
|
||||
@@ -62,4 +62,5 @@ command.description.accept=接受請求
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -1,15 +1,13 @@
|
||||
name: SimpleClans
|
||||
main: net.sacredlabyrinth.phaed.simpleclans.SimpleClans
|
||||
version: '${project.version}'
|
||||
softdepend: [VanishNoPacket, Permissions, PermissionsBukkit, Vault, PermissionsEx, mChat, mChatSuite, PlaceholderAPI]
|
||||
softdepend: [VanishNoPacket, Permissions, PermissionsBukkit, Vault, PermissionsEx, mChat, mChatSuite, PlaceholderAPI, LuckPerms]
|
||||
api-version: '1.13'
|
||||
authors:
|
||||
- Phaed
|
||||
- RoinujNosde
|
||||
website: https://www.spigotmc.org/resources/simpleclans.71242/
|
||||
permissions:
|
||||
simpleclans.admin.permissions:
|
||||
description: Can grant clans permissions
|
||||
simpleclans.admin.reload:
|
||||
description: Can reload configuration
|
||||
simpleclans.admin.purge:
|
||||
@@ -30,10 +28,6 @@ permissions:
|
||||
description: Can disband any clan
|
||||
simpleclans.mod.globalff:
|
||||
description: Can turn off global friendly fire protection
|
||||
simpleclans.mod.nohide:
|
||||
description: Messages from these players cannot be hidden via chat commands
|
||||
simpleclans.mod.home:
|
||||
description: Can set other clan's home
|
||||
simpleclans.mod.hometp:
|
||||
description: Can teleport to all clans homes
|
||||
simpleclans.mod.bypass:
|
||||
@@ -109,14 +103,10 @@ permissions:
|
||||
description: Can modify his clan's tag
|
||||
simpleclans.leader.description:
|
||||
description: Can modify his clan's description
|
||||
simpleclans.leader.cape:
|
||||
description: Can set his clan's cape url
|
||||
simpleclans.leader.bb-clear:
|
||||
description: Can clear his clan's bb
|
||||
simpleclans.leader.setbanner:
|
||||
description: Can set his clan's banner
|
||||
simpleclans.member.cape-toggle:
|
||||
description: Can toggle his cape on/off
|
||||
simpleclans.member.kills:
|
||||
description: Can view his and other's kills
|
||||
simpleclans.member.tag-toggle:
|
||||
@@ -129,6 +119,8 @@ permissions:
|
||||
description: Can keep items when teleporting home
|
||||
simpleclans.mod.place:
|
||||
description: Can manually place players in clans
|
||||
simpleclans.mod.modtag:
|
||||
description: Can change a clan's tag
|
||||
simpleclans.mod.staffgui:
|
||||
description: Can open the staff gui
|
||||
simpleclans.leader.fee:
|
||||
@@ -151,8 +143,6 @@ permissions:
|
||||
description: Can set trust levels for members
|
||||
simpleclans.leader.war:
|
||||
description: Can start wars
|
||||
simpleclans.leader.setrank:
|
||||
description: Can set ranks
|
||||
simpleclans.leader.coloredrank:
|
||||
description: Can set colored ranks
|
||||
default: true
|
||||
@@ -178,6 +168,10 @@ permissions:
|
||||
description: Can remove permissions from a rank
|
||||
simpleclans.leader.rank.setdisplayname:
|
||||
description: Can set the rank displayname
|
||||
simpleclans.leader.rank.setdefault:
|
||||
description: Can set the default rank
|
||||
simpleclans.leader.rank.removedefault:
|
||||
description: Can remove the default rank
|
||||
simpleclans.member.bank:
|
||||
description: Can use banks
|
||||
simpleclans.admin.*:
|
||||
@@ -204,6 +198,7 @@ permissions:
|
||||
simpleclans.mod.nopvpinwar: true
|
||||
simpleclans.mod.place: true
|
||||
simpleclans.mod.staffgui: true
|
||||
simpleclans.mod.modtag: true
|
||||
simpleclans.anyone.*:
|
||||
description: Permissions for anyone
|
||||
default: true
|
||||
@@ -269,6 +264,8 @@ permissions:
|
||||
simpleclans.leader.coloredrank: true
|
||||
simpleclans.leader.bb-clear: true
|
||||
simpleclans.leader.rank.setdisplayname: true
|
||||
simpleclans.leader.rank.setdefault: true
|
||||
simpleclans.leader.rank.removedefault: true
|
||||
simpleclans.leader.rank.list: true
|
||||
simpleclans.leader.rank.create: true
|
||||
simpleclans.leader.rank.assign: true
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.utils;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class UpdateCheckerTest {
|
||||
|
||||
@Test
|
||||
void compareVersions() {
|
||||
assertEquals(UpdateChecker.compareVersions("0.0", "0"), 0);
|
||||
assertTrue(UpdateChecker.compareVersions("0.1", "0") > 0);
|
||||
assertTrue(UpdateChecker.compareVersions("1", "1.1.1") < 0);
|
||||
assertTrue(UpdateChecker.compareVersions("1.1", "1") > 0);
|
||||
assertTrue(UpdateChecker.compareVersions("1", "0") > 0);
|
||||
assertEquals(UpdateChecker.compareVersions("1.0.0", "1"), 0);
|
||||
assertEquals(UpdateChecker.compareVersions("1.0", "1"), 0);
|
||||
assertEquals(UpdateChecker.compareVersions("1.0.0", "1.0"), 0);
|
||||
assertEquals(UpdateChecker.compareVersions("1.0.0", "1.0.0"), 0);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user