mirror of
https://github.com/RoinujNosde/SimpleClans.git
synced 2026-11-05 01:10:04 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe866d959a | ||
|
|
6083766a12 | ||
|
|
14b663801d | ||
|
|
b331e2c236 | ||
|
|
b3d5be1ec0 | ||
|
|
b6d9c3a605 | ||
|
|
e2c7b109d9 | ||
|
|
6bb370facd | ||
|
|
b3c8131c96 | ||
|
|
d4c9537296 | ||
|
|
f89d446ac0 | ||
|
|
009564f732 | ||
|
|
a6e10da510 | ||
|
|
a9fe589794 | ||
|
|
2d0b524557 | ||
|
|
ba66f16f54 | ||
|
|
4d6a489b43 | ||
|
|
92da40ca76 | ||
|
|
f1d0741ac8 | ||
|
|
03b2f73e74 | ||
|
|
2a65295e8b | ||
|
|
a7cb9ed171 | ||
|
|
ac0a387198 | ||
|
|
e3cd7d37a8 | ||
|
|
63595258f4 | ||
|
|
0c866044df | ||
|
|
2217efa8a7 | ||
|
|
df97e43c4d | ||
|
|
169b44e793 | ||
|
|
f2303c5336 | ||
|
|
af8cd133c2 | ||
|
|
fa66424402 | ||
|
|
2727203bed | ||
|
|
eedc743d5b | ||
|
|
4e12e4d6f5 | ||
|
|
32855c2611 | ||
|
|
d7118aea82 | ||
|
|
f472432eb6 | ||
|
|
e07c8a9343 | ||
|
|
b84e46d156 | ||
|
|
daba767a5a | ||
|
|
e59a760776 | ||
|
|
6aa30a5d2d | ||
|
|
9fe944fe5b | ||
|
|
178382e685 | ||
|
|
2fcc765447 | ||
|
|
6d5dc79568 | ||
|
|
29c8955f9d | ||
|
|
62f69e0a1e | ||
|
|
3518024428 | ||
|
|
ad7f6fd402 | ||
|
|
732932763d | ||
|
|
6440e937bc | ||
|
|
72ffaaa7fe | ||
|
|
9b69020677 | ||
|
|
50d25bb881 | ||
|
|
5fc0477e9f | ||
|
|
10482ecf23 | ||
|
|
00158a3e3c | ||
|
|
96d65c2d8f | ||
|
|
4036b13bad | ||
|
|
2abe64284b | ||
|
|
1b62ecf296 | ||
|
|
c59afd27b3 | ||
|
|
fecc50c083 | ||
|
|
230a0e9ba5 | ||
|
|
9f96f8c19f | ||
|
|
1b16fd3b2b | ||
|
|
4e5461b533 | ||
|
|
70f4a4a109 | ||
|
|
ae3ebee649 | ||
|
|
235a69cf15 | ||
|
|
2c18498f08 | ||
|
|
2ac4085915 | ||
|
|
9b5e727fed | ||
|
|
dcf1659e6b | ||
|
|
d64190cc8f | ||
|
|
dc1c417222 | ||
|
|
3872790c25 | ||
|
|
da1894e55d | ||
|
|
63763e9afd | ||
|
|
756a30303e |
No files matched your search
+5
-1
@@ -1,3 +1,7 @@
|
||||
/target/
|
||||
/.idea/
|
||||
SimpleClans.iml
|
||||
SimpleClans.iml
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
/dependency-reduced-pom.xml
|
||||
+1
-1
@@ -5,7 +5,7 @@ language: java
|
||||
|
||||
script: mvn install
|
||||
|
||||
jdk: [openjdk7]
|
||||
jdk: [openjdk8]
|
||||
|
||||
# if one build failed, exit testing
|
||||
matrix:
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
SimpleClans
|
||||
==========
|
||||
|
||||
Full featured clan system for PVP Minecraft Servers
|
||||
|
||||
[](https://travis-ci.org/marcelo-mason/SimpleClans)
|
||||
[](http://104.236.246.108:8080/job/SimpleClans/)
|
||||
[](https://github.com/marcelo-mason/SimpleClans/issues)
|
||||
[](https://ghit.me/repo/marcelo-mason/SimpleClans)
|
||||
|
||||
## Disclaimer:
|
||||
|
||||
Active development for this plugin has stopped. It is in maintenance mode and will continue to be kept up to date as-is with any new Minecraft version indefinitely.
|
||||
|
||||
Pull-requests for bug fixes or new features are welcomed and will be merged in if they do not break existing functionalities.
|
||||
SimpleClans
|
||||
==========
|
||||
|
||||
Full featured clan system for PVP Minecraft Servers
|
||||
|
||||
[](https://travis-ci.org/marcelo-mason/SimpleClans)
|
||||
[](https://github.com/marcelo-mason/SimpleClans/releases)
|
||||
[](https://github.com/marcelo-mason/SimpleClans/issues)
|
||||
[](https://crowdin.com/project/simpleclans)
|
||||
+28
-27
@@ -1,28 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.9-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.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:17.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.2.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.8.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.milkbowl.vault:VaultAPI:1.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.nijikokun.bukkit:Permissions:2.7.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sacredlabyrinth.Phaed:PreciousStones:9.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.getspout:spoutplugin:dev-SNAPSHOT" level="project" />
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.9-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.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:17.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.2.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.8.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.milkbowl.vault:VaultAPI:1.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.nijikokun.bukkit:Permissions:2.7.4" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sacredlabyrinth.Phaed:PreciousStones:9.7.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: me.clip:placeholderapi:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.getspout:spoutplugin:dev-SNAPSHOT" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,124 +1,165 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<version>2.7.12</version>
|
||||
<name>SimpleClans</name>
|
||||
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>
|
||||
|
||||
<build>
|
||||
<finalName>${project.name}</finalName>
|
||||
|
||||
<!-- Resources -->
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>.</targetPath>
|
||||
<filtering>true</filtering>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>plugin.yml</include>
|
||||
<include>config.yml</include>
|
||||
<include>language.yml</include>
|
||||
<include>language-br.yml</include>
|
||||
<include>language-zh.yml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<!-- Plugins -->
|
||||
<plugins>
|
||||
<!-- Compilation plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- JAR creation plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
</plugin>
|
||||
|
||||
<!-- Release plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Dependencies -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.12-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>VaultAPI</artifactId>
|
||||
<version>1.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- Repositories -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<!-- GitHub/Jenkins -->
|
||||
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
<url>http://104.236.246.108:8080</url>
|
||||
</ciManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git:@github.com:marcelo-mason/SimpleClans.git</connection>
|
||||
<developerConnection>scm:git:git:@github.com:marcelo-mason/SimpleClans.git</developerConnection>
|
||||
<url>http://github.com/marcelo-mason/SimpleClans.git/tree/master/</url>
|
||||
<tag>SimpleClans</tag>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<!-- Upstream Distribution -->
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>SacredCoding</id>
|
||||
<name>SacredCoding-releases</name>
|
||||
<url>http://104.236.246.108:8081/artifactory/plugins-release-local</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>SacredCoding</id>
|
||||
<name>SacredCoding-snapshots</name>
|
||||
<url>http://104.236.246.108:8081/artifactory/plugins-release-local</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<version>2.10.2</version>
|
||||
<name>SimpleClans</name>
|
||||
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>
|
||||
|
||||
<build>
|
||||
<finalName>${project.name}</finalName>
|
||||
|
||||
<!-- Resources -->
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>.</targetPath>
|
||||
<filtering>true</filtering>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>plugin.yml</include>
|
||||
<include>config.yml</include>
|
||||
<include>*.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<!-- Plugins -->
|
||||
<plugins>
|
||||
<!-- Compilation plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- JAR creation plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
</plugin>
|
||||
|
||||
<!-- Release plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</plugin>
|
||||
|
||||
<!-- Shade plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.bstats.bukkit</pattern>
|
||||
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.metrics</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Dependencies -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>VaultAPI</artifactId>
|
||||
<version>1.7</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>1.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>2.10.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- Repositories -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>CodeMC</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>paper-repo</id>
|
||||
<url>https://repo.destroystokyo.com/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>placeholderapi-repo</id>
|
||||
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<!-- GitHub/Jenkins -->
|
||||
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
<url>http://104.236.246.108:8080</url>
|
||||
</ciManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git:@github.com:marcelo-mason/SimpleClans.git</connection>
|
||||
<developerConnection>scm:git:git:@github.com:marcelo-mason/SimpleClans.git</developerConnection>
|
||||
<url>http://github.com/marcelo-mason/SimpleClans.git/tree/master/</url>
|
||||
<tag>SimpleClans</tag>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<!-- Upstream Distribution -->
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>SacredCoding</id>
|
||||
<name>SacredCoding-releases</name>
|
||||
<url>http://104.236.246.108:8081/artifactory/plugins-release-local</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>SacredCoding</id>
|
||||
<name>SacredCoding-snapshots</name>
|
||||
<url>http://104.236.246.108:8081/artifactory/plugins-release-local</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
@@ -19,11 +19,23 @@ public class ChatBlock {
|
||||
private final ArrayList<String> columnAlignments = new ArrayList<>();
|
||||
private final LinkedList<String[]> rows = new LinkedList<>();
|
||||
private String color = "";
|
||||
private boolean cropRight = true;
|
||||
private boolean padRight = true;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final Logger LOG = Logger.getLogger("Minecraft");
|
||||
|
||||
|
||||
public void setCropRight(boolean cropRight) {
|
||||
this.cropRight = cropRight;
|
||||
}
|
||||
|
||||
public void setPadRight(boolean padRight) {
|
||||
this.padRight = padRight;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param columnAlignment
|
||||
*/
|
||||
@@ -182,15 +194,27 @@ public class ChatBlock {
|
||||
}
|
||||
} else if (align.equalsIgnoreCase("l")) {
|
||||
if (msgLength(section) > colsize) {
|
||||
col = cropRightToFit(section, colsize);
|
||||
if (cropRight) {
|
||||
col = cropRightToFit(section, colsize);
|
||||
} else {
|
||||
col = section;
|
||||
}
|
||||
} else if (msgLength(section) < colsize) {
|
||||
col = paddRightToFit(section, colsize);
|
||||
if (padRight) {
|
||||
col = paddRightToFit(section, colsize);
|
||||
} else {
|
||||
col = section;
|
||||
}
|
||||
}
|
||||
} else if (align.equalsIgnoreCase("c")) {
|
||||
if (msgLength(section) > colsize) {
|
||||
col = cropRightToFit(section, colsize);
|
||||
if (cropRight) {
|
||||
col = cropRightToFit(section, colsize);
|
||||
} else {
|
||||
col = section;
|
||||
}
|
||||
} else if (msgLength(section) < colsize) {
|
||||
col = centerInLineOf(section, colsize);
|
||||
col = centerInLineOf(section, colsize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,9 +277,10 @@ public class ChatBlock {
|
||||
}
|
||||
|
||||
// crop and print out
|
||||
|
||||
String msg = cropRightToFit((prefix_used ? empty_prefix : prefix + " ") + finalString, LINE_LENGTH);
|
||||
|
||||
String msg = (prefix_used ? empty_prefix : prefix + " ") + finalString;
|
||||
if (cropRight) {
|
||||
msg = cropRightToFit(msg, LINE_LENGTH);
|
||||
}
|
||||
if (color.length() > 0) {
|
||||
msg = color + msg;
|
||||
}
|
||||
@@ -638,6 +663,10 @@ public class ChatBlock {
|
||||
public static String[] say(String message) {
|
||||
return colorize(wordWrap(message));
|
||||
}
|
||||
|
||||
public static String[] getColorizedMessage(String msg) {
|
||||
return colorize(wordWrap(msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
@@ -697,4 +726,4 @@ public class ChatBlock {
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,12 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
*
|
||||
* @author RoinujNosde
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ChatFormatMigration {
|
||||
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
|
||||
public void migrateClanChat() {
|
||||
SettingsManager sm = plugin.getSettingsManager();
|
||||
FileConfiguration c = sm.getConfig();
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import net.md_5.bungee.api.chat.HoverEvent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.*;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.json.simple.JSONArray;
|
||||
@@ -15,6 +19,7 @@ import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -26,7 +31,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
private String tag;
|
||||
private String colorTag;
|
||||
private String name;
|
||||
private String description;
|
||||
private double balance;
|
||||
private double fee;
|
||||
private boolean friendlyFire;
|
||||
private long founded;
|
||||
private long lastUsed;
|
||||
@@ -42,6 +49,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
private String homeWorld = "";
|
||||
private boolean allowWithdraw = false;
|
||||
private boolean allowDeposit = true;
|
||||
private boolean feeEnabled;
|
||||
private List<Rank> ranks = new ArrayList<>();
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -152,7 +161,46 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the clan's description
|
||||
*
|
||||
* @return the description or null if it doesn't have one
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* (used internally)
|
||||
*
|
||||
* @param description
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the clan's fee
|
||||
*
|
||||
* @param fee
|
||||
*/
|
||||
public void setMemberFee(double fee) {
|
||||
if (fee < 0) {
|
||||
fee = 0;
|
||||
}
|
||||
this.fee = fee;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the clan's fee
|
||||
*
|
||||
* @return the fee
|
||||
*/
|
||||
public double getMemberFee() {
|
||||
return fee;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the clan's balance
|
||||
*
|
||||
@@ -249,31 +297,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return confirmation
|
||||
*/
|
||||
public boolean isMember(Player player) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return this.members.contains(player.getUniqueId().toString());
|
||||
} else {
|
||||
return this.members.contains(player.getName().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the player is a member of this clan
|
||||
*
|
||||
* @param playerName
|
||||
* @return confirmation
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isMember(String playerName) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID PlayerUniqueId = UUIDMigration.getForcedPlayerUUID(playerName);
|
||||
if (PlayerUniqueId != null) {
|
||||
return this.members.contains(PlayerUniqueId.toString());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return this.members.contains(playerName.toLowerCase());
|
||||
}
|
||||
return this.members.contains(player.getUniqueId().toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,27 +393,33 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @param msg
|
||||
*/
|
||||
public void addBb(String msg) {
|
||||
addBbWithoutSaving(msg);
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a bulletin board message without saving it to the database
|
||||
*
|
||||
* @param msg
|
||||
*/
|
||||
public void addBbWithoutSaving(String msg) {
|
||||
while (bb.size() > SimpleClans.getInstance().getSettingsManager().getBbSize()) {
|
||||
bb.remove(0);
|
||||
}
|
||||
|
||||
bb.add(msg);
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
bb.add(System.currentTimeMillis() + "_" + msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a bulletin board message without announcer
|
||||
* Adds a bulletin board message without announcer and saves it to the database
|
||||
*
|
||||
* @param msg
|
||||
*
|
||||
* @param updateLastUsed should the clan's last used time be updated as well?
|
||||
*/
|
||||
public void addBb(String msg, boolean updateLastUsed) {
|
||||
while (bb.size() > SimpleClans.getInstance().getSettingsManager().getBbSize()) {
|
||||
bb.remove(0);
|
||||
}
|
||||
|
||||
bb.add(msg);
|
||||
addBbWithoutSaving(msg);
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this, updateLastUsed);
|
||||
}
|
||||
|
||||
@@ -407,35 +437,15 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @param cp
|
||||
*/
|
||||
public void importMember(ClanPlayer cp) {
|
||||
String NameOrUUID;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
if (cp.getUniqueId() != null) {
|
||||
NameOrUUID = cp.getUniqueId().toString();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
NameOrUUID = cp.getCleanName();
|
||||
}
|
||||
if (!this.members.contains(NameOrUUID)) {
|
||||
this.members.add(NameOrUUID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (used internally)
|
||||
*
|
||||
* @param playerName
|
||||
*/
|
||||
@Deprecated
|
||||
public void removeMember(String playerName) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID PlayerUniqueId = UUIDMigration.getForcedPlayerUUID(playerName);
|
||||
if (PlayerUniqueId != null) {
|
||||
this.members.remove(PlayerUniqueId.toString());
|
||||
}
|
||||
} else {
|
||||
this.members.remove(playerName.toLowerCase());
|
||||
String uuid;
|
||||
if (cp.getUniqueId() != null) {
|
||||
uuid = cp.getUniqueId().toString();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.members.contains(uuid)) {
|
||||
this.members.add(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,12 +671,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
String out = "";
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -686,31 +691,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return the leaders
|
||||
*/
|
||||
public boolean isLeader(Player player) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return isLeader(player.getUniqueId());
|
||||
} else {
|
||||
return isLeader(player.getName());
|
||||
}
|
||||
return isLeader(player.getUniqueId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player is a leader of a clan
|
||||
*
|
||||
* @param playerName
|
||||
* @return the leaders
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isLeader(String playerName) {
|
||||
if (isMember(playerName)) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(playerName.toLowerCase());
|
||||
|
||||
if (cp != null && cp.isLeader()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player is a leader of a clan
|
||||
@@ -730,6 +713,24 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all members that must pay the fee (that excludes leaders and players with the permission to bypass it)
|
||||
*
|
||||
* @return the fee payers
|
||||
*/
|
||||
public Set<ClanPlayer> getFeePayers() {
|
||||
Set<ClanPlayer> feePayers = new HashSet<>();
|
||||
|
||||
getNonLeaders().forEach(cp -> {
|
||||
OfflinePlayer op= Bukkit.getOfflinePlayer(cp.getUniqueId());
|
||||
if (!SimpleClans.getInstance().getPermissionsManager().has(null, op, "simpleclans.member.bypass-fee")) {
|
||||
feePayers.add(cp);
|
||||
}
|
||||
});
|
||||
|
||||
return feePayers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all members (leaders, and non-leaders) in the clan
|
||||
*
|
||||
@@ -739,12 +740,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -763,12 +759,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -789,12 +780,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -816,12 +802,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -845,12 +826,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -896,12 +872,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
int totalDeaths = 0;
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -930,12 +901,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -959,12 +925,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -988,12 +949,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -1017,12 +973,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -1046,12 +997,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
} else {
|
||||
cp = SimpleClans.getInstance().getClanManager().getClanPlayer(member.toLowerCase());
|
||||
}
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -1095,13 +1041,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
|
||||
// add clan permission
|
||||
SimpleClans.getInstance().getPermissionsManager().addClanPermissions(cp);
|
||||
SimpleClans.getInstance().getPermissionsManager().addPlayerPermissions(cp);
|
||||
|
||||
Player player;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
player = SimpleClans.getInstance().getServer().getPlayer(cp.getUniqueId());
|
||||
} else {
|
||||
player = SimpleClans.getInstance().getServer().getPlayerExact(cp.getName());
|
||||
}
|
||||
Player player = SimpleClans.getInstance().getServer().getPlayer(cp.getUniqueId());
|
||||
|
||||
if (player != null) {
|
||||
SimpleClans.getInstance().getClanManager().updateDisplayName(player);
|
||||
@@ -1109,39 +1051,6 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new PlayerJoinedClanEvent(this, cp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a player from a clan
|
||||
*
|
||||
* @param playerName
|
||||
*/
|
||||
@Deprecated
|
||||
public void removePlayerFromClan(String playerName) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(playerName);
|
||||
|
||||
// remove clan group-permission
|
||||
SimpleClans.getInstance().getPermissionsManager().removeClanPermissions(cp);
|
||||
|
||||
// remove permissions
|
||||
SimpleClans.getInstance().getPermissionsManager().removeClanPlayerPermissions(cp);
|
||||
|
||||
cp.setClan(null);
|
||||
cp.addPastClan(getColorTag() + (cp.isLeader() ? ChatColor.DARK_RED + "*" : ""));
|
||||
cp.setLeader(false);
|
||||
cp.setTrusted(false);
|
||||
cp.setJoinDate(0);
|
||||
removeMember(playerName);
|
||||
|
||||
SimpleClans.getInstance().getStorageManager().updateClanPlayer(cp);
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
|
||||
Player matched = cp.toPlayer();
|
||||
|
||||
if (matched != null) {
|
||||
SimpleClans.getInstance().getClanManager().updateDisplayName(matched);
|
||||
}
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new PlayerKickedClanEvent(this, cp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a player from a clan
|
||||
*
|
||||
@@ -1161,6 +1070,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
cp.setLeader(false);
|
||||
cp.setTrusted(false);
|
||||
cp.setJoinDate(0);
|
||||
cp.setRank(null);
|
||||
removeMember(playerUniqueId);
|
||||
|
||||
SimpleClans.getInstance().getStorageManager().updateClanPlayer(cp);
|
||||
@@ -1174,27 +1084,6 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new PlayerKickedClanEvent(this, cp));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Promote a member to a leader of a clan
|
||||
*
|
||||
* @param playerName
|
||||
*/
|
||||
@Deprecated
|
||||
public void promote(String playerName) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(playerName);
|
||||
|
||||
cp.setLeader(true);
|
||||
cp.setTrusted(true);
|
||||
|
||||
SimpleClans.getInstance().getStorageManager().updateClanPlayer(cp);
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
|
||||
// add clan permission
|
||||
SimpleClans.getInstance().getPermissionsManager().addClanPermissions(cp);
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new PlayerPromoteEvent(this, cp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Promote a member to a leader of a clan
|
||||
*
|
||||
@@ -1214,25 +1103,6 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new PlayerPromoteEvent(this, cp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Demote a leader back to a member of a clan
|
||||
*
|
||||
* @param playerName
|
||||
*/
|
||||
@Deprecated
|
||||
public void demote(String playerName) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(playerName);
|
||||
|
||||
cp.setLeader(false);
|
||||
|
||||
SimpleClans.getInstance().getStorageManager().updateClanPlayer(cp);
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
|
||||
// add clan permission
|
||||
SimpleClans.getInstance().getPermissionsManager().addClanPermissions(cp);
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new PlayerDemoteEvent(this, cp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Demote a leader back to a member of a clan
|
||||
*
|
||||
@@ -1327,21 +1197,43 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return
|
||||
*/
|
||||
public boolean isAnyOnline() {
|
||||
for (String member : members) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
if (Helper.isOnline(UUID.fromString(member))) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (Helper.isOnline(member)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String member : members) {
|
||||
if (Helper.isOnline(UUID.fromString(member))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there are enough leaders online to vote
|
||||
*
|
||||
* @param cp the one to demote
|
||||
* @return true if there are
|
||||
*/
|
||||
public boolean enoughLeadersOnlineToDemote(ClanPlayer cp) {
|
||||
List<ClanPlayer> online = getOnlineLeaders();
|
||||
online.remove(cp);
|
||||
|
||||
double minimum = SimpleClans.getInstance().getSettingsManager().getPercentageOnlineToDemote();
|
||||
// all leaders minus the one being demoted
|
||||
double totalLeaders = getLeaders().size() - 1;
|
||||
double onlineLeaders = online.size();
|
||||
|
||||
|
||||
return ((onlineLeaders / totalLeaders) * 100) >= minimum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the online leaders
|
||||
*
|
||||
* @return the online leaders
|
||||
*/
|
||||
public List<ClanPlayer> getOnlineLeaders() {
|
||||
return getOnlineMembers().stream().filter(ClanPlayer::isLeader).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether all leaders of a clan are online
|
||||
*
|
||||
@@ -1350,17 +1242,11 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
public boolean allLeadersOnline() {
|
||||
List<ClanPlayer> leaders = getLeaders();
|
||||
|
||||
for (ClanPlayer leader : leaders) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
if (!Helper.isOnline(leader.getUniqueId())) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!Helper.isOnline(leader.getName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (ClanPlayer leader : leaders) {
|
||||
if (!Helper.isOnline(leader.getUniqueId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1495,7 +1381,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
public void displayBb(Player player) {
|
||||
if (isVerified()) {
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, MessageFormat.format(SimpleClans.getInstance().getLang("bulletin.board.header"), SimpleClans.getInstance().getSettingsManager().getBbAccentColor(), SimpleClans.getInstance().getSettingsManager().getPageHeadingsColor(), Helper.capitalize(getName())));
|
||||
ChatBlock.saySingle(player, MessageFormat.format(SimpleClans.getInstance().getLang("bulletin.board.header"), SimpleClans.getInstance().getSettingsManager().getBbAccentColor(), SimpleClans.getInstance().getSettingsManager().getPageHeadingsColor(), getName()));
|
||||
|
||||
int maxSize = SimpleClans.getInstance().getSettingsManager().getBbSize();
|
||||
|
||||
@@ -1504,12 +1390,72 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
for (String msg : bb) {
|
||||
ChatBlock.sendMessage(player, SimpleClans.getInstance().getSettingsManager().getBbAccentColor() + "* " + SimpleClans.getInstance().getSettingsManager().getBbColor() + Helper.parseColors(msg));
|
||||
if (!sendBbTime(player, msg)) {
|
||||
ChatBlock.sendMessage(player, SimpleClans.getInstance().getSettingsManager().getBbAccentColor() + "* " + SimpleClans.getInstance().getSettingsManager().getBbColor() + Helper.parseColors(msg));
|
||||
}
|
||||
}
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays bb to a player
|
||||
* @implNote may want to refactor displaybb(Player) to use this?
|
||||
*
|
||||
* @param player
|
||||
* @param maxSize amount of lines to display
|
||||
*/
|
||||
public void displayBb(Player player, int maxSize) {
|
||||
if (isVerified()) {
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, MessageFormat.format(SimpleClans.getInstance().getLang("bulletin.board.header"), SimpleClans.getInstance().getSettingsManager().getBbAccentColor(), SimpleClans.getInstance().getSettingsManager().getPageHeadingsColor(), getName()));
|
||||
|
||||
List<String> localBb = new ArrayList<>(bb);
|
||||
while (localBb.size() > maxSize) {
|
||||
localBb.remove(0);
|
||||
}
|
||||
|
||||
for (String msg : localBb) {
|
||||
if (!sendBbTime(player, msg)) {
|
||||
ChatBlock.sendMessage(player, SimpleClans.getInstance().getSettingsManager().getBbAccentColor() + "* " + SimpleClans.getInstance().getSettingsManager().getBbColor() + Helper.parseColors(msg));
|
||||
}
|
||||
}
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a bb message with the timestamp in a hover message, if the bb message is timestamped
|
||||
* @param msg the bb message
|
||||
* @return true if sent
|
||||
*/
|
||||
private boolean sendBbTime(Player player, String msg) {
|
||||
try {
|
||||
int index = msg.indexOf("_");
|
||||
if (index < 1)
|
||||
return false;
|
||||
long time;
|
||||
time = (System.currentTimeMillis()
|
||||
- Long.parseLong(msg.substring(0, index))) / 1000L;
|
||||
msg = String.join("", ChatBlock
|
||||
.getColorizedMessage(SimpleClans.getInstance()
|
||||
.getSettingsManager().getBbAccentColor() + "* " +
|
||||
SimpleClans.getInstance().getSettingsManager()
|
||||
.getBbColor() + Helper.parseColors(
|
||||
msg.substring(++index, msg.length()))));
|
||||
TextComponent textComponent = new TextComponent(msg);
|
||||
textComponent.setHoverEvent(
|
||||
new HoverEvent(HoverEvent.Action.SHOW_TEXT,
|
||||
TextComponent.fromLegacyText(
|
||||
Dates.formatTime(time, 1) + SimpleClans
|
||||
.getInstance().getLang("bb.ago"))));
|
||||
player.spigot().sendMessage(textComponent);
|
||||
return true;
|
||||
} catch (Throwable rock) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disband a clan
|
||||
*/
|
||||
@@ -1537,15 +1483,15 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
String disbanded = SimpleClans.getInstance().getLang("clan.disbanded");
|
||||
|
||||
if (c.removeWarringClan(this)) {
|
||||
c.addBb(disbanded, ChatColor.AQUA + MessageFormat.format(SimpleClans.getInstance().getLang("you.are.no.longer.at.war"), Helper.capitalize(c.getName()), getColorTag()));
|
||||
c.addBb(disbanded, ChatColor.AQUA + MessageFormat.format(SimpleClans.getInstance().getLang("you.are.no.longer.at.war"), c.getName(), getColorTag()));
|
||||
}
|
||||
|
||||
if (c.removeRival(getTag())) {
|
||||
c.addBb(disbanded, ChatColor.AQUA + MessageFormat.format(SimpleClans.getInstance().getLang("has.been.disbanded.rivalry.ended"), Helper.capitalize(getName())));
|
||||
c.addBb(disbanded, ChatColor.AQUA + MessageFormat.format(SimpleClans.getInstance().getLang("has.been.disbanded.rivalry.ended"), getName()));
|
||||
}
|
||||
|
||||
if (c.removeAlly(getTag())) {
|
||||
c.addBb(disbanded, ChatColor.AQUA + MessageFormat.format(SimpleClans.getInstance().getLang("has.been.disbanded.alliance.ended"), Helper.capitalize(getName())));
|
||||
c.addBb(disbanded, ChatColor.AQUA + MessageFormat.format(SimpleClans.getInstance().getLang("has.been.disbanded.alliance.ended"), getName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1633,7 +1579,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
*
|
||||
* @return the flags
|
||||
*/
|
||||
public String getFlags() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public String getFlags() {
|
||||
JSONObject json = new JSONObject();
|
||||
|
||||
// writing the list of flags to json
|
||||
@@ -1703,8 +1650,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
public void validateWarring() {
|
||||
for (Iterator iter = warringClans.keySet().iterator(); iter.hasNext(); ) {
|
||||
String clanName = (String) iter.next();
|
||||
for (Iterator<String> iter = warringClans.keySet().iterator(); iter.hasNext(); ) {
|
||||
String clanName = iter.next();
|
||||
|
||||
Clan clan = SimpleClans.getInstance().getClanManager().getClan(clanName);
|
||||
|
||||
@@ -1776,6 +1723,24 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the fee is enabled
|
||||
*
|
||||
* @return true if enabled
|
||||
*/
|
||||
public boolean isMemberFeeEnabled() {
|
||||
return feeEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables the fee
|
||||
*
|
||||
* @param enable
|
||||
*/
|
||||
public void setMemberFeeEnabled(boolean enable) {
|
||||
feeEnabled = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the allowWithdraw
|
||||
*/
|
||||
@@ -1803,4 +1768,79 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
public void setAllowDeposit(boolean allowDeposit) {
|
||||
this.allowDeposit = allowDeposit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the clan has the specified rank
|
||||
*
|
||||
* @param name the rank
|
||||
* @return
|
||||
*/
|
||||
public boolean hasRank(String name) {
|
||||
return getRank(name) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a rank
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
public void createRank(String name) {
|
||||
ranks.add(new Rank(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the clan's ranks
|
||||
*
|
||||
* @return the ranks
|
||||
*/
|
||||
public List<Rank> getRanks() {
|
||||
return ranks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the clan's ranks
|
||||
*
|
||||
* @param ranks
|
||||
*/
|
||||
public void setRanks(List<Rank> ranks) {
|
||||
if (ranks == null) {
|
||||
ranks = new ArrayList<>();
|
||||
}
|
||||
this.ranks = ranks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a rank with the specified name
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
public void deleteRank(String name) {
|
||||
Rank r = getRank(name);
|
||||
if (r != null) {
|
||||
ranks.remove(r);
|
||||
getMembers().forEach(cp -> {
|
||||
if (cp.getRankId().equals(r.getName())) {
|
||||
cp.setRank("");
|
||||
SimpleClans.getInstance().getStorageManager().updateClanPlayer(cp);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a rank with the specified name or null if not found
|
||||
*
|
||||
* @param name the rank name
|
||||
* @return a rank or null
|
||||
*/
|
||||
public Rank getRank(String name) {
|
||||
if (name != null) {
|
||||
for (Rank r : ranks) {
|
||||
if (r.getName().equals(name)) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import org.json.simple.JSONValue;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.MessageFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@@ -32,6 +34,7 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
private long lastSeen;
|
||||
private long joinDate;
|
||||
private Set<String> pastClans = new HashSet<>();
|
||||
private Map<String, Long> resignTimes = new HashMap<>();
|
||||
private VoteResult vote;
|
||||
private Channel channel;
|
||||
|
||||
@@ -116,15 +119,8 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ClanPlayer other)
|
||||
{
|
||||
if (SimpleClans.getInstance().hasUUID())
|
||||
{
|
||||
return this.getUniqueId().compareTo(other.getUniqueId());
|
||||
} else
|
||||
{
|
||||
return this.getName().compareToIgnoreCase(other.getName());
|
||||
}
|
||||
public int compareTo(ClanPlayer other) {
|
||||
return this.getUniqueId().compareTo(other.getUniqueId());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -329,6 +325,7 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
/**
|
||||
* Adds one rival kill to this player (does not update clanplayer to db)
|
||||
*/
|
||||
@Deprecated
|
||||
public void addRivalKill()
|
||||
{
|
||||
setRivalKills(getRivalKills() + 1);
|
||||
@@ -357,6 +354,7 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
/**
|
||||
* Adds one civilian kill to this player (does not update clanplayer to db)
|
||||
*/
|
||||
@Deprecated
|
||||
public void addCivilianKill()
|
||||
{
|
||||
setCivilianKills(getCivilianKills() + 1);
|
||||
@@ -385,10 +383,27 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
/**
|
||||
* Adds one civilian kill to this player (does not update clanplayer to db)
|
||||
*/
|
||||
@Deprecated
|
||||
public void addNeutralKill()
|
||||
{
|
||||
setNeutralKills(getNeutralKills() + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds one kill to this player (does not update to db)
|
||||
*/
|
||||
public void addKill(Kill.Type type) {
|
||||
switch (type) {
|
||||
case CIVILIAN:
|
||||
civilianKills++;
|
||||
break;
|
||||
case NEUTRAL:
|
||||
neutralKills++;
|
||||
break;
|
||||
case RIVAL:
|
||||
rivalKills++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this player is allowing friendly fire
|
||||
@@ -528,6 +543,9 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
*/
|
||||
public String getLastSeenString()
|
||||
{
|
||||
if (toPlayer() != null) {
|
||||
return SimpleClans.getInstance().getLang("online");
|
||||
}
|
||||
return new java.text.SimpleDateFormat("MMM dd, ''yy h:mm a").format(new Date(this.lastSeen));
|
||||
}
|
||||
|
||||
@@ -628,6 +646,51 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
// return pc;
|
||||
return pastClans;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map containing the time the player resigned from certain clans
|
||||
*
|
||||
* @return the resign times
|
||||
*/
|
||||
public Map<String, Long> getResignTimes() {
|
||||
return resignTimes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time in millis when the player resigned from the clan
|
||||
*
|
||||
* @param tag
|
||||
* @return the time in millis
|
||||
*/
|
||||
public Long getResignTime(String tag) {
|
||||
return resignTimes.get(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the resign times (does not update to db)
|
||||
*
|
||||
* @param resignTimes
|
||||
*/
|
||||
public void setResignTimes(Map<String, Long> resignTimes) {
|
||||
if (resignTimes != null) {
|
||||
final int cooldown = SimpleClans.getInstance().getSettingsManager().getRejoinCooldown();
|
||||
resignTimes.forEach((k, v) -> {
|
||||
long timePassed = Instant.ofEpochMilli(v).until(Instant.now(), ChronoUnit.MINUTES);
|
||||
if (timePassed < cooldown) {
|
||||
this.resignTimes.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the clan to the resign times map
|
||||
*
|
||||
* @param tag
|
||||
*/
|
||||
public void addResignTime(String tag) {
|
||||
if (tag != null) resignTimes.put(tag, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this player's clan
|
||||
@@ -708,7 +771,8 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
*
|
||||
* @return the flags
|
||||
*/
|
||||
public String getFlags()
|
||||
@SuppressWarnings("unchecked")
|
||||
public String getFlags()
|
||||
{
|
||||
JSONObject json = new JSONObject();
|
||||
|
||||
@@ -916,13 +980,46 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer>
|
||||
return useChatShortcut;
|
||||
}
|
||||
|
||||
public String getRankDisplayName() {
|
||||
if (clan != null) {
|
||||
Rank r = clan.getRank(rank);
|
||||
if (r != null) {
|
||||
return r.getDisplayName();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the rank id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getRankId() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the rank displayname
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public String getRank()
|
||||
{
|
||||
return rank;
|
||||
return getRankDisplayName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the rank id
|
||||
*
|
||||
* @param rank the rank id
|
||||
*/
|
||||
public void setRank(String rank)
|
||||
{
|
||||
if (rank == null) {
|
||||
rank = "";
|
||||
}
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,138 +1,192 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
|
||||
public class Dates {
|
||||
|
||||
private Dates() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMonths(Timestamp date1, Timestamp date2) {
|
||||
return differenceInMonths(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInYears(Timestamp date1, Timestamp date2) {
|
||||
return differenceInYears(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInDays(Timestamp date1, Timestamp date2) {
|
||||
return differenceInDays(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInHours(Timestamp date1, Timestamp date2) {
|
||||
return differenceInHours(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMinutes(Timestamp date1, Timestamp date2) {
|
||||
return differenceInMinutes(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInSeconds(Timestamp date1, Timestamp date2) {
|
||||
return differenceInSeconds(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
private static double differenceInMilliseconds(Timestamp date1, Timestamp date2) {
|
||||
return differenceInMilliseconds(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMonths(Date date1, Date date2) {
|
||||
return differenceInYears(date1, date2) * 12;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInYears(Date date1, Date date2) {
|
||||
double days = differenceInDays(date1, date2);
|
||||
return days / 365.2425;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInDays(Date date1, Date date2) {
|
||||
return differenceInHours(date1, date2) / 24.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInHours(Date date1, Date date2) {
|
||||
return differenceInMinutes(date1, date2) / 60.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMinutes(Date date1, Date date2) {
|
||||
return differenceInSeconds(date1, date2) / 60.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInSeconds(Date date1, Date date2) {
|
||||
return differenceInMilliseconds(date1, date2) / 1000.0;
|
||||
}
|
||||
|
||||
private static double differenceInMilliseconds(Date date1, Date date2) {
|
||||
return Math.abs(getTimeInMilliseconds(date1) - getTimeInMilliseconds(date2));
|
||||
}
|
||||
|
||||
private static long getTimeInMilliseconds(Date date) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
return cal.getTimeInMillis() + cal.getTimeZone().getOffset(cal.getTimeInMillis());
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
|
||||
public class Dates {
|
||||
|
||||
private Dates() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMonths(Timestamp date1, Timestamp date2) {
|
||||
return differenceInMonths(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInYears(Timestamp date1, Timestamp date2) {
|
||||
return differenceInYears(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInDays(Timestamp date1, Timestamp date2) {
|
||||
return differenceInDays(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInHours(Timestamp date1, Timestamp date2) {
|
||||
return differenceInHours(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMinutes(Timestamp date1, Timestamp date2) {
|
||||
return differenceInMinutes(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInSeconds(Timestamp date1, Timestamp date2) {
|
||||
return differenceInSeconds(new Date(date1.getTime()), new Date(date2.getTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMonths(Date date1, Date date2) {
|
||||
return differenceInYears(date1, date2) * 12;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInYears(Date date1, Date date2) {
|
||||
double days = differenceInDays(date1, date2);
|
||||
return days / 365.2425;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInDays(Date date1, Date date2) {
|
||||
return differenceInHours(date1, date2) / 24.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInHours(Date date1, Date date2) {
|
||||
return differenceInMinutes(date1, date2) / 60.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInMinutes(Date date1, Date date2) {
|
||||
return differenceInSeconds(date1, date2) / 60.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @return
|
||||
*/
|
||||
public static double differenceInSeconds(Date date1, Date date2) {
|
||||
return differenceInMilliseconds(date1, date2) / 1000.0;
|
||||
}
|
||||
|
||||
private static double differenceInMilliseconds(Date date1, Date date2) {
|
||||
return Math.abs(getTimeInMilliseconds(date1) - getTimeInMilliseconds(date2));
|
||||
}
|
||||
|
||||
private static long getTimeInMilliseconds(Date date) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
return cal.getTimeInMillis() + cal.getTimeZone().getOffset(cal.getTimeInMillis());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string representation of the amount of time labeled as days, hours, minutes, seconds
|
||||
* @author RoboMWM, LaxWasHere
|
||||
* @param seconds the time in seconds
|
||||
* @param depth Max amount of detail (e.g. only display days and hours if set to 1 and seconds > 1 day)
|
||||
* @return
|
||||
*/
|
||||
public static String formatTime(Long seconds, int depth)
|
||||
{
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
if (seconds == null || seconds < 1) {
|
||||
return plugin.getLang("bb.moments");
|
||||
}
|
||||
|
||||
if (seconds < 60) {
|
||||
return seconds + plugin.getLang("bb.seconds");
|
||||
}
|
||||
|
||||
if (seconds < 3600) {
|
||||
Long count = (long) Math.ceil(seconds / 60);
|
||||
String res;
|
||||
if (count > 1) {
|
||||
res = count + plugin.getLang("bb.minutes");
|
||||
} else {
|
||||
res = plugin.getLang("bb.one.minute");
|
||||
}
|
||||
Long remaining = seconds % 60;
|
||||
if (depth > 0 && remaining >= 5) {
|
||||
return res + ", " + formatTime(remaining, --depth);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
if (seconds < 86400) {
|
||||
Long count = (long) Math.ceil(seconds / 3600);
|
||||
String res;
|
||||
if (count > 1) {
|
||||
res = count + plugin.getLang("bb.hours");
|
||||
} else {
|
||||
res = plugin.getLang("bb.one.hour");
|
||||
}
|
||||
if (depth > 0) {
|
||||
return res + ", " + formatTime(seconds % 3600, --depth);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
Long count = (long) Math.ceil(seconds / 86400);
|
||||
String res;
|
||||
if (count > 1) {
|
||||
res = count + plugin.getLang("bb.days");
|
||||
} else {
|
||||
res = plugin.getLang("bb.one.day");
|
||||
}
|
||||
if (depth > 0) {
|
||||
return res + ", " + formatTime(seconds % 86400, --depth);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,21 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
|
||||
/**
|
||||
@@ -31,6 +38,137 @@ public class Helper {
|
||||
SimpleClans.debug(el.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Player locale
|
||||
*
|
||||
* @param player the player
|
||||
* @return the locale
|
||||
*/
|
||||
public static Locale getLocale(Player player) {
|
||||
String lang = player.getLocale();
|
||||
String[] split = lang.split("_");
|
||||
|
||||
if (split.length == 2) {
|
||||
return new Locale(split[0], split[1]);
|
||||
}
|
||||
|
||||
return new Locale(lang);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a JSON String to a list of Ranks
|
||||
*
|
||||
* @param json
|
||||
* @return a list of ranks or null if the JSON String is null/empty
|
||||
*/
|
||||
public static 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a list of Ranks to a JSON String
|
||||
*
|
||||
* @param ranks
|
||||
* @return a JSON String
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static String ranksToJson(List<Rank> ranks) {
|
||||
if (ranks == null)
|
||||
ranks = new ArrayList<Rank>();
|
||||
|
||||
JSONArray array = new JSONArray();
|
||||
for (Rank rank : ranks) {
|
||||
JSONObject o = new JSONObject();
|
||||
o.put("name", rank.getName());
|
||||
o.put("displayName", rank.getDisplayName());
|
||||
JSONArray permArray = new JSONArray();
|
||||
for (String p : rank.getPermissions()) {
|
||||
permArray.add(p);
|
||||
}
|
||||
o.put("permissions", permArray);
|
||||
array.add(o);
|
||||
}
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("ranks", array);
|
||||
return object.toJSONString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a resign times map to a JSON String
|
||||
*
|
||||
* @param resignTimes
|
||||
* @return a JSON String
|
||||
*/
|
||||
public static String resignTimesToJson(Map<String, Long> resignTimes) {
|
||||
return JSONObject.toJSONString(resignTimes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a JSON String to a resign times map
|
||||
*
|
||||
* @param json JSON String
|
||||
* @return a map
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Map<String, Long> resignTimesFromJson(String json) {
|
||||
if (json != null) {
|
||||
try {
|
||||
return (Map<String, Long>) new JSONParser().parse(json);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the delay in seconds to the specified hour and minute.
|
||||
*
|
||||
* @param hour hour
|
||||
* @param minute minute
|
||||
* @return the delay in seconds
|
||||
*/
|
||||
public static long getDelayTo(int hour, int minute) {
|
||||
if (hour < 0 || hour > 23) hour = 1;
|
||||
if (minute < 0 || minute > 59) minute = 0;
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
LocalDateTime d = LocalDateTime.of(now.toLocalDate(), LocalTime.of(hour, minute));
|
||||
long delay;
|
||||
if (now.isAfter(d)) {
|
||||
delay = now.until(d.plusDays(1), ChronoUnit.SECONDS);
|
||||
} else {
|
||||
delay = now.until(d, ChronoUnit.SECONDS);
|
||||
}
|
||||
return delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a players full color name if he is online
|
||||
@@ -265,6 +403,20 @@ public class Helper {
|
||||
public static String[] toArray(List<String> list) {
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Permission values array to a String array
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String[] fromPermissionArray() {
|
||||
RankPermission[] permissions = RankPermission.values();
|
||||
String[] sa = new String[permissions.length];
|
||||
for (int i = 0; i < permissions.length; i++) {
|
||||
sa[i] = permissions[i].toString();
|
||||
}
|
||||
return sa;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes first item from a string array
|
||||
@@ -348,9 +500,9 @@ public class Helper {
|
||||
* @return
|
||||
*/
|
||||
public static String stripColors(String msg) {
|
||||
String out = msg.replaceAll("[&][0-9a-f]", "");
|
||||
String out = msg.replaceAll("[&][0-9a-fk-or]", "");
|
||||
out = out.replaceAll(String.valueOf((char) 194), "");
|
||||
return out.replaceAll("[\u00a7][0-9a-f]", "");
|
||||
return out.replaceAll("[\u00a7][0-9a-fk-or]", "");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -579,7 +731,7 @@ public class Helper {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isVanished(Player player) {
|
||||
if (player != null && player.hasMetadata("vanished") && !player.getMetadata("vanished").isEmpty()) {
|
||||
return player.getMetadata("vanished").get(0).asBoolean();
|
||||
@@ -587,7 +739,8 @@ public class Helper {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Collection<Player> getOnlinePlayers() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Collection<Player> getOnlinePlayers() {
|
||||
try {
|
||||
Method method = Bukkit.class.getDeclaredMethod("getOnlinePlayers");
|
||||
Object players = method.invoke(null);
|
||||
@@ -605,11 +758,7 @@ public class Helper {
|
||||
}
|
||||
|
||||
public static Player getPlayer(String playerName) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return SimpleClans.getInstance().getServer().getPlayer(UUIDMigration.getForcedPlayerUUID(playerName));
|
||||
}
|
||||
|
||||
return SimpleClans.getInstance().getServer().getPlayer(playerName);
|
||||
return SimpleClans.getInstance().getServer().getPlayer(UUIDMigration.getForcedPlayerUUID(playerName));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -625,25 +774,25 @@ public class Helper {
|
||||
|
||||
String leaderColor = sm.getAllyChatLeaderColor();
|
||||
String memberColor = sm.getAllyChatMemberColor();
|
||||
String rank = cp.getRank().isEmpty() ? null : ChatColor.translateAlternateColorCodes('&', cp.getRank());
|
||||
String rankFormat = rank != null ? ChatColor.translateAlternateColorCodes('&', sm.getAllyChatRank()).replaceAll("%rank%", rank) : "";
|
||||
String rank = cp.getRankId().isEmpty() ? null : ChatColor.translateAlternateColorCodes('&', cp.getRankDisplayName());
|
||||
String rankFormat = rank != null ? ChatColor.translateAlternateColorCodes('&', sm.getAllyChatRank()).replace("%rank%", rank) : "";
|
||||
|
||||
String message = replacePlaceholders(sm, cp, leaderColor, memberColor, rankFormat, msg);
|
||||
String message = replacePlaceholders(sm.getAllyChatFormat(), cp, leaderColor, memberColor, rankFormat, msg);
|
||||
if (placeholders != null) {
|
||||
for (Entry<String, String> e : placeholders.entrySet()) {
|
||||
message = message.replaceAll("%"+e.getKey()+"%", e.getValue());
|
||||
message = message.replace("%"+e.getKey()+"%", e.getValue());
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
private static String replacePlaceholders(SettingsManager sm, ClanPlayer cp, String leaderColor, String memberColor, String rankFormat, String msg) {
|
||||
String message = ChatColor.translateAlternateColorCodes('&', sm.getAllyChatFormat())
|
||||
.replaceAll("%clan%", cp.getClan().getColorTag())
|
||||
.replaceAll("%nick-color%", (cp.isLeader() ? leaderColor : memberColor))
|
||||
.replaceAll("%player%", cp.getName())
|
||||
.replaceAll("%rank%", rankFormat)
|
||||
.replaceAll("%message%", Matcher.quoteReplacement(msg));
|
||||
private static String replacePlaceholders(String messageFormat, ClanPlayer cp, String leaderColor, String memberColor, String rankFormat, String msg) {
|
||||
String message = ChatColor.translateAlternateColorCodes('&', messageFormat)
|
||||
.replace("%clan%", cp.getClan().getColorTag())
|
||||
.replace("%nick-color%", (cp.isLeader() ? leaderColor : memberColor))
|
||||
.replace("%player%", cp.getName())
|
||||
.replace("%rank%", rankFormat)
|
||||
.replace("%message%", msg);
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -660,14 +809,14 @@ public class Helper {
|
||||
|
||||
String leaderColor = sm.getClanChatLeaderColor();
|
||||
String memberColor = sm.getClanChatMemberColor();
|
||||
String rank = cp.getRank().isEmpty() ? null : ChatColor.translateAlternateColorCodes('&', cp.getRank());
|
||||
String rankFormat = rank != null ? ChatColor.translateAlternateColorCodes('&', sm.getClanChatRank()).replaceAll("%rank%", rank) : "";
|
||||
String rank = cp.getRankId().isEmpty() ? null : ChatColor.translateAlternateColorCodes('&', cp.getRankDisplayName());
|
||||
String rankFormat = rank != null ? ChatColor.translateAlternateColorCodes('&', sm.getClanChatRank()).replace("%rank%", rank) : "";
|
||||
|
||||
String message = replacePlaceholders(sm, cp, leaderColor, memberColor, rankFormat, msg);
|
||||
String message = replacePlaceholders(sm.getClanChatFormat(), cp, leaderColor, memberColor, rankFormat, msg);
|
||||
|
||||
if (placeholders != null) {
|
||||
for (Entry<String, String> e : placeholders.entrySet()) {
|
||||
message = message.replaceAll("%"+e.getKey()+"%", e.getValue());
|
||||
message = message.replace("%"+e.getKey()+"%", e.getValue());
|
||||
}
|
||||
}
|
||||
return message;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class Kill {
|
||||
|
||||
private final ClanPlayer killer;
|
||||
private final ClanPlayer victim;
|
||||
private final LocalDateTime time;
|
||||
|
||||
public Kill(ClanPlayer killer, ClanPlayer victim, LocalDateTime time) {
|
||||
this.killer = killer;
|
||||
this.victim = victim;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public ClanPlayer getKiller() {
|
||||
return killer;
|
||||
}
|
||||
|
||||
public ClanPlayer getVictim() {
|
||||
return victim;
|
||||
}
|
||||
|
||||
public LocalDateTime getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
CIVILIAN("c"), RIVAL("r"), NEUTRAL("n");
|
||||
|
||||
Type(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
private final String shortName;
|
||||
|
||||
public String getShortname() {
|
||||
return shortName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
public enum PermissionLevel {
|
||||
LEADER, TRUSTED
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RoinujNosde
|
||||
*/
|
||||
public class Rank implements Comparable<Rank> {
|
||||
|
||||
private String name;
|
||||
private String displayName;
|
||||
private Set<String> permissions;
|
||||
|
||||
public Rank(String name) {
|
||||
setName(name);
|
||||
permissions = new HashSet<String>();
|
||||
setDisplayName(displayName);
|
||||
}
|
||||
|
||||
public Rank(String name, String displayName, Set<String> permissions) {
|
||||
setName(name);
|
||||
setDisplayName(displayName);
|
||||
setPermissions(permissions);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
if (name == null || name.isEmpty()) {
|
||||
throw new IllegalArgumentException("name cannot be null or empty");
|
||||
}
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
if (displayName == null || displayName.isEmpty()) {
|
||||
displayName = name;
|
||||
}
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public void setPermissions(Set<String> permissions) {
|
||||
if (permissions == null) {
|
||||
permissions = new HashSet<String>();
|
||||
}
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
Rank other = (Rank) obj;
|
||||
if (name == null) {
|
||||
if (other.name != null)
|
||||
return false;
|
||||
} else if (!name.equals(other.name))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the rank's permissions
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Set<String> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the rank's display name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the rank's name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Rank other) {
|
||||
return Integer.compare(permissions.size(), other.permissions.size());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RoinujNosde
|
||||
*
|
||||
*/
|
||||
public enum RankPermission {
|
||||
|
||||
ALLY_ADD("simpleclans.leader.ally"), ALLY_CHAT("simpleclans.member.ally"), ALLY_REMOVE("simpleclans.leader.ally"),
|
||||
BANK_BALANCE("simpleclans.member.bank"), BANK_DEPOSIT("simpleclans.member.bank"),
|
||||
BANK_WITHDRAW("simpleclans.member.bank"), BB_ADD("simpleclans.member.bb-add"),
|
||||
BB_CLEAR("simpleclans.leader.bb-clear"), COORDS("simpleclans.member.coords"),
|
||||
FEE_ENABLE("simpleclans.leader.fee"), FEE_SET("simpleclans.leader.fee"),
|
||||
HOME_REGROUP("simpleclans.leader.home-regroup"), HOME_SET("simpleclans.leader.home-set"),
|
||||
HOME_TP("simpleclans.member.home"), INVITE("simpleclans.leader.invite"), KICK("simpleclans.leader.kick"),
|
||||
MODTAG("simpleclans.leader.modtag"), RANK_DISPLAYNAME("simpleclans.leader.rank.setdisplayname"),
|
||||
RANK_LIST("simpleclans.leader.rank.list"), RIVAL_ADD("simpleclans.leader.rival"),
|
||||
RIVAL_REMOVE("simpleclans.leader.rival"), WAR_END("simpleclans.leader.war"), WAR_START("simpleclans.leader.war"),
|
||||
STATS("simpleclans.member.stats"), VITALS("simpleclans.member.vitals"), KILLS("simpleclans.member.kills"),
|
||||
DESCRIPTION("simpleclans.leader.description"), MOSTKILLED("simpleclans.mod.mostkilled");
|
||||
|
||||
private String bukkitPermission;
|
||||
|
||||
private RankPermission(String bukkitPermission) {
|
||||
this.bukkitPermission = bukkitPermission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Bukkit equivalent to this rank permission
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getBukkitPermission() {
|
||||
return bukkitPermission;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString().replace("_", ".").toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this is a valid rank permission.
|
||||
*
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
public static boolean isValid(String permission) {
|
||||
for (RankPermission p : values()) {
|
||||
if (p.toString().equalsIgnoreCase(permission)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,186 +1,267 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.listeners.SCEntityListener;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.listeners.SCPlayerListener;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author Phaed
|
||||
*/
|
||||
public class SimpleClans extends JavaPlugin {
|
||||
|
||||
private ArrayList<String> messages = new ArrayList<>();
|
||||
private static SimpleClans instance;
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private ClanManager clanManager;
|
||||
private RequestManager requestManager;
|
||||
private StorageManager storageManager;
|
||||
private SettingsManager settingsManager;
|
||||
private PermissionsManager permissionsManager;
|
||||
private TeleportManager teleportManager;
|
||||
private LanguageManager languageManager;
|
||||
private ChatFormatMigration chatFormatMigration;
|
||||
private boolean hasUUID;
|
||||
|
||||
/**
|
||||
* @return the logger
|
||||
*/
|
||||
public static Logger getLog() {
|
||||
return logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg
|
||||
*/
|
||||
public static void debug(String msg) {
|
||||
if (getInstance().getSettingsManager().isDebugging()) {
|
||||
logger.log(Level.INFO, msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the instance
|
||||
*/
|
||||
public static SimpleClans getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static void log(String msg, Object... arg) {
|
||||
if (arg == null || arg.length == 0) {
|
||||
logger.log(Level.INFO, msg);
|
||||
} else {
|
||||
logger.log(Level.INFO, MessageFormat.format(msg, arg));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
|
||||
settingsManager = new SettingsManager();
|
||||
this.hasUUID = UUIDMigration.canReturnUUID();
|
||||
languageManager = new LanguageManager();
|
||||
|
||||
permissionsManager = new PermissionsManager();
|
||||
requestManager = new RequestManager();
|
||||
clanManager = new ClanManager();
|
||||
storageManager = new StorageManager();
|
||||
teleportManager = new TeleportManager();
|
||||
chatFormatMigration = new ChatFormatMigration();
|
||||
|
||||
chatFormatMigration.migrateAllyChat();
|
||||
chatFormatMigration.migrateClanChat();
|
||||
|
||||
logger.info(MessageFormat.format(getLang("version.loaded"), getDescription().getName(), getDescription().getVersion()));
|
||||
|
||||
getServer().getPluginManager().registerEvents(new SCEntityListener(), this);
|
||||
getServer().getPluginManager().registerEvents(new SCPlayerListener(), this);
|
||||
|
||||
permissionsManager.loadPermissions();
|
||||
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandClan());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandAccept());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandDeny());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandMore());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandAlly());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandGlobal());
|
||||
|
||||
getCommand(getSettingsManager().getCommandClan()).setExecutor(new ClanCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandAccept()).setExecutor(new AcceptCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandDeny()).setExecutor(new DenyCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandMore()).setExecutor(new MoreCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandAlly()).setExecutor(new AllyCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandGlobal()).setExecutor(new GlobalCommandExecutor());
|
||||
|
||||
getCommand(getSettingsManager().getCommandClan()).setTabCompleter(new PlayerNameTabCompleter());
|
||||
logger.info("[SimpleClans] Online Mode: " + hasUUID); //TODO: Is this necessary?
|
||||
logger.info("[SimpleClans] Modo Multithreading: " + SimpleClans.getInstance().getSettingsManager().getUseThreads());
|
||||
logger.info("[SimpleClans] Modo BungeeCord: " + SimpleClans.getInstance().getSettingsManager().getUseBungeeCord());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
getServer().getScheduler().cancelTasks(this);
|
||||
getStorageManager().closeConnection();
|
||||
getPermissionsManager().savePermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the clanManager
|
||||
*/
|
||||
public ClanManager getClanManager() {
|
||||
return clanManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the requestManager
|
||||
*/
|
||||
public RequestManager getRequestManager() {
|
||||
return requestManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the storageManager
|
||||
*/
|
||||
public StorageManager getStorageManager() {
|
||||
return storageManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the settingsManager
|
||||
*/
|
||||
public SettingsManager getSettingsManager() {
|
||||
return settingsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the permissionsManager
|
||||
*/
|
||||
public PermissionsManager getPermissionsManager() {
|
||||
return permissionsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg the path within the language file
|
||||
* @return the lang
|
||||
*/
|
||||
public String getLang(String msg) {
|
||||
return languageManager.get(msg);
|
||||
}
|
||||
|
||||
public TeleportManager getTeleportManager() {
|
||||
return teleportManager;
|
||||
}
|
||||
|
||||
public List<String> getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the hasUUID
|
||||
*/
|
||||
public boolean hasUUID() {
|
||||
return this.hasUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param trueOrFalse
|
||||
*/
|
||||
public void setUUID(boolean trueOrFalse) {
|
||||
this.hasUUID = trueOrFalse;
|
||||
}
|
||||
|
||||
public LanguageManager getLanguageManager() {
|
||||
return languageManager;
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.AcceptCommandExecutor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.AllyCommandExecutor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.ClanCommandExecutor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.DenyCommandExecutor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.GlobalCommandExecutor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.executors.MoreCommandExecutor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.language.LanguageMigration;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.language.LanguageResource;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.listeners.SCEntityListener;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.listeners.SCPlayerListener;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PlaceholdersManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.RequestManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.StorageManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.TeleportManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.tasks.CollectFeeTask;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.tasks.CollectUpkeepTask;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.tasks.SaveDataTask;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.tasks.UpkeepWarningTask;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
/**
|
||||
* @author Phaed
|
||||
*/
|
||||
public class SimpleClans extends JavaPlugin {
|
||||
|
||||
private ArrayList<String> messages = new ArrayList<>();
|
||||
private static SimpleClans instance;
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private ClanManager clanManager;
|
||||
private RequestManager requestManager;
|
||||
private StorageManager storageManager;
|
||||
private SettingsManager settingsManager;
|
||||
private PermissionsManager permissionsManager;
|
||||
private TeleportManager teleportManager;
|
||||
private ChatFormatMigration chatFormatMigration;
|
||||
private boolean hasUUID;
|
||||
|
||||
/**
|
||||
* @return the logger
|
||||
*/
|
||||
@Deprecated
|
||||
public static Logger getLog() {
|
||||
return logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg
|
||||
*/
|
||||
public static void debug(String msg) {
|
||||
if (getInstance().getSettingsManager().isDebugging()) {
|
||||
logger.log(Level.INFO, msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the instance
|
||||
*/
|
||||
public static SimpleClans getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void log(String msg, Object... arg) {
|
||||
if (arg == null || arg.length == 0) {
|
||||
logger.log(Level.INFO, msg);
|
||||
} else {
|
||||
logger.log(Level.INFO, MessageFormat.format(msg, arg));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
new LanguageMigration(this).migrate();
|
||||
settingsManager = new SettingsManager();
|
||||
this.hasUUID = UUIDMigration.canReturnUUID();
|
||||
|
||||
permissionsManager = new PermissionsManager();
|
||||
requestManager = new RequestManager();
|
||||
clanManager = new ClanManager();
|
||||
storageManager = new StorageManager();
|
||||
teleportManager = new TeleportManager();
|
||||
chatFormatMigration = new ChatFormatMigration();
|
||||
|
||||
chatFormatMigration.migrateAllyChat();
|
||||
chatFormatMigration.migrateClanChat();
|
||||
|
||||
getLogger().info(MessageFormat.format(getLang("version.loaded"), getDescription().getName(), getDescription().getVersion()));
|
||||
|
||||
getServer().getPluginManager().registerEvents(new SCEntityListener(), this);
|
||||
getServer().getPluginManager().registerEvents(new SCPlayerListener(), this);
|
||||
|
||||
permissionsManager.loadPermissions();
|
||||
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandClan());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandAccept());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandDeny());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandMore());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandAlly());
|
||||
CommandHelper.registerCommand(getSettingsManager().getCommandGlobal());
|
||||
|
||||
getCommand(getSettingsManager().getCommandClan()).setExecutor(new ClanCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandAccept()).setExecutor(new AcceptCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandDeny()).setExecutor(new DenyCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandMore()).setExecutor(new MoreCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandAlly()).setExecutor(new AllyCommandExecutor());
|
||||
getCommand(getSettingsManager().getCommandGlobal()).setExecutor(new GlobalCommandExecutor());
|
||||
|
||||
getCommand(getSettingsManager().getCommandClan()).setTabCompleter(new PlayerNameTabCompleter());
|
||||
getLogger().info("Multithreading: " + SimpleClans.getInstance().getSettingsManager().getUseThreads());
|
||||
getLogger().info("BungeeCord: " + SimpleClans.getInstance().getSettingsManager().getUseBungeeCord());
|
||||
if (!Locale.getDefault().getLanguage().equals("en")) {
|
||||
getLogger().info("Help us translate SimpleClans to your language! Access https://crowdin.com/project/simpleclans/");
|
||||
}
|
||||
|
||||
startTasks();
|
||||
startMetrics();
|
||||
hookIntoPAPI();
|
||||
new UpdateChecker(this).check();
|
||||
}
|
||||
|
||||
private void hookIntoPAPI() {
|
||||
if (getServer().getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
||||
getLogger().info("PlaceholderAPI found. Registering hook...");
|
||||
new PlaceholdersManager(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void startMetrics() {
|
||||
Metrics metrics = new Metrics(this, 7131);
|
||||
SettingsManager sm = getSettingsManager();
|
||||
ClanManager cm = getClanManager();
|
||||
String on = "enabled";
|
||||
String off = "disabled";
|
||||
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("clans", () -> cm.getClans().size()));
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("clan_players", () -> cm.getAllClanPlayers().size()));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("language", () -> sm.getLanguage().toString()));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("machine_language", () -> Locale.getDefault().toString()));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("database", () -> sm.isUseMysql() ? "MySQL" : "SQLite"));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("save_periodically", () -> sm.isSavePeriodically() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("save_interval", () -> String.valueOf(sm.getSaveInterval())));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("upkeep", () -> sm.isClanUpkeep() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("member_fee", () -> sm.isMemberFee() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("rejoin_cooldown", () -> sm.isRejoinCooldown() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("clan_verification", () -> sm.isRequireVerification() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("money_per_kill", () -> sm.isMoneyPerKill() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("threads", () -> sm.getUseThreads() ? on : off));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("bungeecord", () -> sm.getUseBungeeCord() ? on : off));
|
||||
}
|
||||
|
||||
private void startTasks() {
|
||||
if (getSettingsManager().isSavePeriodically()) {
|
||||
new SaveDataTask().start();
|
||||
}
|
||||
if (getSettingsManager().isMemberFee()) {
|
||||
new CollectFeeTask().start();
|
||||
}
|
||||
if (getSettingsManager().isClanUpkeep()) {
|
||||
new CollectUpkeepTask().start();
|
||||
new UpkeepWarningTask().start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
getServer().getScheduler().cancelTasks(this);
|
||||
if (getSettingsManager().isSavePeriodically()) {
|
||||
getStorageManager().saveModified();
|
||||
}
|
||||
getStorageManager().closeConnection();
|
||||
getPermissionsManager().savePermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the clanManager
|
||||
*/
|
||||
public ClanManager getClanManager() {
|
||||
return clanManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the requestManager
|
||||
*/
|
||||
public RequestManager getRequestManager() {
|
||||
return requestManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the storageManager
|
||||
*/
|
||||
public StorageManager getStorageManager() {
|
||||
return storageManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the settingsManager
|
||||
*/
|
||||
public SettingsManager getSettingsManager() {
|
||||
return settingsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the permissionsManager
|
||||
*/
|
||||
public PermissionsManager getPermissionsManager() {
|
||||
return permissionsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key the path within the language file
|
||||
* @return the lang
|
||||
*/
|
||||
public String getLang(String key) {
|
||||
return getLang(key, null);
|
||||
}
|
||||
|
||||
public String getLang(String key, Player player) {
|
||||
Locale locale;
|
||||
if (player == null) {
|
||||
locale = getSettingsManager().getLanguage();
|
||||
} else {
|
||||
locale = Helper.getLocale(player);
|
||||
}
|
||||
|
||||
return new LanguageResource().getLang(key, locale);
|
||||
}
|
||||
|
||||
public TeleportManager getTeleportManager() {
|
||||
return teleportManager;
|
||||
}
|
||||
|
||||
public List<String> getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the hasUUID
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean hasUUID() {
|
||||
return this.hasUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param trueOrFalse
|
||||
*/
|
||||
public void setUUID(boolean trueOrFalse) {
|
||||
this.hasUUID = trueOrFalse;
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import java.util.UUID;
|
||||
|
||||
public class TeleportState {
|
||||
private UUID playerUniqueId;
|
||||
private String playerName;
|
||||
private Location playerLocation;
|
||||
private Location destination;
|
||||
private int counter;
|
||||
@@ -17,7 +16,6 @@ public class TeleportState {
|
||||
public TeleportState(Player player, Location dest, String clanName) {
|
||||
this.destination = dest;
|
||||
this.playerLocation = player.getLocation();
|
||||
this.playerName = player.getName();
|
||||
this.clanName = clanName;
|
||||
this.counter = SimpleClans.getInstance().getSettingsManager().getWaitSecs();
|
||||
this.playerUniqueId = player.getUniqueId();
|
||||
@@ -50,11 +48,7 @@ public class TeleportState {
|
||||
* @return
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return SimpleClans.getInstance().getServer().getPlayer(this.playerUniqueId);
|
||||
} else {
|
||||
return SimpleClans.getInstance().getServer().getPlayer(this.playerName);
|
||||
}
|
||||
return SimpleClans.getInstance().getServer().getPlayer(this.playerUniqueId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RoinujNosde
|
||||
* @since 2.10.2
|
||||
*/
|
||||
public class UpdateChecker {
|
||||
|
||||
private final SimpleClans plugin;
|
||||
private static final String LATEST_VERSION_URL = "https://api.spiget.org/v2/resources/71242/versions/latest";
|
||||
private final String version;
|
||||
private final String userAgent;
|
||||
|
||||
public UpdateChecker(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
version = plugin.getDescription().getVersion();
|
||||
userAgent = "SimpleClans/" + version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the version installed is up-to-date
|
||||
*
|
||||
*/
|
||||
public void check() {
|
||||
new BukkitRunnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
URL url = new URL(LATEST_VERSION_URL);
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.addRequestProperty("User-Agent", userAgent);
|
||||
InputStreamReader reader = new InputStreamReader(connection.getInputStream());
|
||||
|
||||
JsonElement parse = new JsonParser().parse(reader);
|
||||
if (parse.isJsonObject()) {
|
||||
String latestVersion = parse.getAsJsonObject().get("name").getAsString();
|
||||
|
||||
if (!version.equals(latestVersion)) {
|
||||
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/");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
reader.close();
|
||||
} catch (MalformedURLException ignored) {
|
||||
} catch (IOException | JsonParseException ex) {
|
||||
plugin.getLogger().log(Level.WARNING, "Error checking the plugin version...");
|
||||
}
|
||||
}
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,12 +40,7 @@ public class AllyCommand {
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (arg.length != 2) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.ally"), plugin.getSettingsManager().getCommandClan()));
|
||||
@@ -67,9 +62,14 @@ public class AllyCommand {
|
||||
|
||||
if (!ally.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("cannot.ally.with.an.unverified.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.equals(plugin.getLang("add"))) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.ALLY_ADD, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (clan.isAlly(ally.getTag())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clans.are.already.allies"));
|
||||
return;
|
||||
@@ -83,16 +83,20 @@ public class AllyCommand {
|
||||
}
|
||||
|
||||
plugin.getRequestManager().addAllyRequest(cp, ally, clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.have.been.asked.for.an.alliance"), Helper.capitalize(ally.getName())));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.have.been.asked.for.an.alliance"), ally.getName()));
|
||||
} else if (action.equals(plugin.getLang("remove"))) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.ALLY_REMOVE, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!clan.isAlly(ally.getTag())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clans.are.not.allies"));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.removeAlly(ally);
|
||||
ally.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.broken.the.alliance"), Helper.capitalize(clan.getName()), ally.getName()), false);
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.broken.the.alliance"), Helper.capitalize(cp.getName()), Helper.capitalize(ally.getName())));
|
||||
ally.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.broken.the.alliance"), clan.getName(), ally.getName()), false);
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.broken.the.alliance"), cp.getName(), ally.getName()));
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.ally"), plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
|
||||
@@ -36,38 +36,23 @@ public class BanCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
String banned = arg[0];
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(arg[0]);
|
||||
if (uuid == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getSettingsManager().isBanned(uuid)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("this.player.is.already.banned"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID PlayerUniqueId = UUIDMigration.getForcedPlayerUUID(banned);
|
||||
if (plugin.getSettingsManager().isBanned(PlayerUniqueId)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("this.player.is.already.banned"));
|
||||
return;
|
||||
}
|
||||
|
||||
Player pl = SimpleClans.getInstance().getServer().getPlayer(PlayerUniqueId);
|
||||
|
||||
if (pl != null) {
|
||||
ChatBlock.sendMessage(pl, ChatColor.AQUA + plugin.getLang("you.banned"));
|
||||
}
|
||||
|
||||
plugin.getClanManager().ban(banned);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.added.to.banned.list"));
|
||||
} else {
|
||||
if (plugin.getSettingsManager().isBanned(banned)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("this.player.is.already.banned"));
|
||||
return;
|
||||
}
|
||||
|
||||
Player pl = SimpleClans.getInstance().getServer().getPlayerExact(banned);
|
||||
|
||||
if (pl != null) {
|
||||
ChatBlock.sendMessage(pl, ChatColor.AQUA + plugin.getLang("you.banned"));
|
||||
}
|
||||
|
||||
plugin.getClanManager().ban(banned);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.added.to.banned.list"));
|
||||
}
|
||||
plugin.getClanManager().ban(uuid);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.added.to.banned.list"));
|
||||
|
||||
Player pl = SimpleClans.getInstance().getServer().getPlayer(uuid);
|
||||
if (pl != null) {
|
||||
ChatBlock.sendMessage(pl, ChatColor.AQUA + plugin.getLang("you.banned"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -47,34 +49,39 @@ public class BankCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.stats"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length == 1) {
|
||||
if (arg[0].equalsIgnoreCase("status")) {
|
||||
player.sendMessage(ChatColor.AQUA + MessageFormat.format(plugin.getLang("clan.balance"), clanbalance));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.BANK_BALANCE, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
player.sendMessage(ChatColor.AQUA + MessageFormat.format(plugin.getLang("clan.balance"), clanbalance));
|
||||
}
|
||||
} else if (arg.length == 2) {
|
||||
if (arg[1].matches("[0-9]+")) {
|
||||
money = Double.parseDouble(arg[1]);
|
||||
}
|
||||
if (arg[0].equalsIgnoreCase("deposit")) {
|
||||
if (!cp.getClan().isLeader(player) && !clan.isAllowDeposit()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
if (!clan.isAllowDeposit()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("deposit.not.allowed"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.BANK_DEPOSIT, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (arg[1].equalsIgnoreCase("all")) {
|
||||
clan.deposit(plmoney, player);
|
||||
} else {
|
||||
clan.deposit(money, player);
|
||||
}
|
||||
} else if (arg[0].equalsIgnoreCase("withdraw")) {
|
||||
if (!cp.getClan().isLeader(player) && !clan.isAllowWithdraw()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
if (!clan.isAllowWithdraw()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("withdraw.not.allowed"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.BANK_WITHDRAW, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (arg[1].equalsIgnoreCase("all")) {
|
||||
clan.withdraw(clanbalance, player);
|
||||
} else {
|
||||
|
||||
@@ -45,12 +45,7 @@ public class BbCommand {
|
||||
}
|
||||
|
||||
if (arg.length == 1 && arg[0].equalsIgnoreCase("clear")) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.bb-clear")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted() || !cp.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.BB_CLEAR, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
cp.getClan().clearBb();
|
||||
@@ -58,13 +53,7 @@ public class BbCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.bb-add")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.BB_ADD, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ public class CoordsCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.coords"));
|
||||
return;
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.COORDS, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length != 0) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.coords"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
@@ -96,7 +96,7 @@ public class CoordsCommand {
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + Helper.capitalize(clan.getName()) + subColor + " " + plugin.getLang("coords") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + clan.getName() + subColor + " " + plugin.getLang("coords") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
* @author phaed
|
||||
*/
|
||||
public class DemoteCommand {
|
||||
|
||||
public DemoteCommand() {
|
||||
}
|
||||
|
||||
@@ -29,6 +30,40 @@ public class DemoteCommand {
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
if (arg.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.demote.leader"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
String demotedName = arg[0];
|
||||
|
||||
if (demotedName == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
ClanPlayer toDemote;
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(demotedName);
|
||||
toDemote = plugin.getClanManager().getAnyClanPlayer(uuid);
|
||||
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.admin.demote")) {
|
||||
if (!toDemote.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("player.is.not.a.leader.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
final Clan clan = toDemote.getClan();
|
||||
|
||||
if (clan.getLeaders().size() == 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.cannot.demote.the.last.leader"));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.demote(toDemote.getUniqueId());
|
||||
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("demoted.back.to.member"), demotedName));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.successfully.demoted"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.demote")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
@@ -46,61 +81,25 @@ public class DemoteCommand {
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
if (arg.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.demote.leader"), plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
|
||||
if (!clan.enoughLeadersOnlineToDemote(toDemote)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.enough.leaders.online.to.vote.on.demotion"));
|
||||
return;
|
||||
}
|
||||
|
||||
String demotedName = arg[0];
|
||||
boolean allOtherLeadersOnline;
|
||||
|
||||
if (demotedName == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID PlayerUniqueId = UUIDMigration.getForcedPlayerUUID(demotedName);
|
||||
if (PlayerUniqueId == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
allOtherLeadersOnline = clan.allOtherLeadersOnline(PlayerUniqueId);
|
||||
} else {
|
||||
allOtherLeadersOnline = clan.allOtherLeadersOnline(demotedName);
|
||||
}
|
||||
|
||||
if (!allOtherLeadersOnline) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("leaders.must.be.online.to.vote.on.demotion"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID PlayerUniqueId = UUIDMigration.getForcedPlayerUUID(demotedName);
|
||||
if (!clan.isLeader(PlayerUniqueId)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("player.is.not.a.leader.of.your.clan"));
|
||||
return;
|
||||
}
|
||||
if (clan.getLeaders().size() != 1 && plugin.getSettingsManager().isConfirmationForDemote()) {
|
||||
plugin.getRequestManager().addDemoteRequest(cp, demotedName, clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("demotion.vote.has.been.requested.from.all.leaders"));
|
||||
return;
|
||||
}
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("demoted.back.to.member"), Helper.capitalize(demotedName)));
|
||||
clan.demote(PlayerUniqueId);
|
||||
} else {
|
||||
if (!clan.isLeader(demotedName)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("player.is.not.a.leader.of.your.clan"));
|
||||
return;
|
||||
}
|
||||
if (clan.getLeaders().size() != 1 && plugin.getSettingsManager().isConfirmationForDemote()) {
|
||||
plugin.getRequestManager().addDemoteRequest(cp, demotedName, clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("demotion.vote.has.been.requested.from.all.leaders"));
|
||||
return;
|
||||
}
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("demoted.back.to.member"), Helper.capitalize(demotedName)));
|
||||
clan.demote(demotedName);
|
||||
}
|
||||
if (!clan.isLeader(uuid)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("player.is.not.a.leader.of.your.clan"));
|
||||
return;
|
||||
}
|
||||
if (clan.getLeaders().size() > 2 && plugin.getSettingsManager().isConfirmationForDemote()) {
|
||||
plugin.getRequestManager().addDemoteRequest(cp, demotedName, clan);
|
||||
ChatBlock.sendMessage(player,
|
||||
ChatColor.AQUA + plugin.getLang("demotion.vote.has.been.requested.from.all.leaders"));
|
||||
return;
|
||||
}
|
||||
clan.addBb(player.getName(), ChatColor.AQUA
|
||||
+ MessageFormat.format(plugin.getLang("demoted.back.to.member"), demotedName));
|
||||
clan.demote(uuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
|
||||
public class DescriptionCommand {
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param args
|
||||
*/
|
||||
public void execute(Player player, String[] args) {
|
||||
final SimpleClans plugin = SimpleClans.getInstance();
|
||||
final SettingsManager sm = plugin.getSettingsManager();
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.description")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.DESCRIPTION, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.length < 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.description"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
String description = Helper.toMessage(args);
|
||||
if (description.length() < sm.getClanMinDescriptionLength()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.clan.description.must.be.longer.than"), sm.getClanMinDescriptionLength()));
|
||||
return;
|
||||
}
|
||||
if (description.length() > sm.getClanMaxDescriptionLength()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.clan.description.cannot.be.longer.than"), sm.getClanMaxDescriptionLength()));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.setDescription(description);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("description.changed"));
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class FeeCommand {
|
||||
|
||||
/**
|
||||
* Executes the command
|
||||
*
|
||||
* @param player
|
||||
* @param args
|
||||
*/
|
||||
public void execute(Player player, String[] args) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
if (!plugin.getSettingsManager().isMemberFee()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("disabled.command"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.length >= 1) {
|
||||
ClanPlayer cp = plugin.getClanManager().getAnyClanPlayer(player.getUniqueId());
|
||||
Clan clan = cp.getClan();
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("check")) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.fee-check")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA
|
||||
+ MessageFormat.format(
|
||||
plugin.getLang("the.fee.is.0.and.its.current.value.is.1"),
|
||||
clan.isMemberFeeEnabled() ? plugin.getLang("fee.enabled") : plugin.getLang("fee.disabled"),
|
||||
clan.getMemberFee()
|
||||
));
|
||||
return;
|
||||
}
|
||||
if (args.length == 2 && args[0].equalsIgnoreCase("set")) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.FEE_SET, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (!cp.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
double newFee = 0;
|
||||
try {
|
||||
newFee = Double.parseDouble(args[1]);
|
||||
} catch (NumberFormatException ignored) {
|
||||
player.sendMessage(ChatColor.RED + plugin.getLang("invalid.fee"));
|
||||
return;
|
||||
}
|
||||
double maxFee = plugin.getSettingsManager().getMaxMemberFee();
|
||||
if (newFee > maxFee) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED
|
||||
+ MessageFormat.format(plugin.getLang("max.fee.allowed.is.0"), maxFee));
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getClanManager().purchaseMemberFeeSet(player)) {
|
||||
clan.setMemberFee(newFee);
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("bb.fee.set"), newFee));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("fee.set"));
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
ChatBlock.sendMessage(player, ChatColor.RED
|
||||
+ MessageFormat.format(plugin.getLang("usage.fee"), plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
|
||||
@@ -82,14 +82,9 @@ public class HomeCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.vitals"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length == 0) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.home")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.HOME_TP, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,12 +102,7 @@ public class HomeCommand {
|
||||
}
|
||||
|
||||
if (arg[0].equalsIgnoreCase("set")) {
|
||||
if (!cp.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.home-set")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.HOME_SET, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (plugin.getSettingsManager().isHomebaseSetOnce() && clan.getHomeLocation() != null && !plugin.getPermissionsManager().has(player, "simpleclans.mod.home")) {
|
||||
@@ -133,12 +123,7 @@ public class HomeCommand {
|
||||
}
|
||||
|
||||
if (arg[0].equalsIgnoreCase("clear")) {
|
||||
if (!cp.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.home-set")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.HOME_SET, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (plugin.getSettingsManager().isHomebaseSetOnce() && clan.getHomeLocation() != null && !plugin.getPermissionsManager().has(player, "simpleclans.mod.home")) {
|
||||
@@ -156,20 +141,23 @@ public class HomeCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.HOME_REGROUP, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location loc;
|
||||
if (arg.length >= 2 && arg[1].equalsIgnoreCase("me")) {
|
||||
loc = player.getLocation();
|
||||
} else {
|
||||
loc = cp.getClan().getHomeLocation();
|
||||
}
|
||||
|
||||
if (!cp.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
|
||||
if(loc == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("hombase.not.set"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.home-regroup")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
|
||||
|
||||
HomeRegroupEvent homeRegroupEvent = new HomeRegroupEvent(clan, cp, clan.getOnlineMembers(), loc);
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(homeRegroupEvent);
|
||||
|
||||
@@ -200,10 +188,7 @@ public class HomeCommand {
|
||||
|
||||
plugin.getTeleportManager().addPlayer(player, new Location(loc.getWorld(), x + .5, loc.getBlockY(), z + .5), clan.getName());
|
||||
}
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("hombase.set") + ChatColor.YELLOW + Helper.toLocationString(loc));
|
||||
return;
|
||||
}
|
||||
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,19 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import java.text.MessageFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -37,15 +45,15 @@ public class InviteCommand {
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.INVITE, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.invite.player"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Player invited = Helper.getPlayer(arg[0]);
|
||||
|
||||
if (invited == null) {
|
||||
@@ -60,17 +68,31 @@ public class InviteCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.cannot.invite.yourself"));
|
||||
return;
|
||||
}
|
||||
if (plugin.getSettingsManager().isBanned(player.getName())) {
|
||||
if (plugin.getSettingsManager().isBanned(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("this.player.is.banned.from.using.clan.commands"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cpInv = plugin.getClanManager().getClanPlayer(invited);
|
||||
ClanPlayer cpInv = plugin.getClanManager().getAnyClanPlayer(invited.getUniqueId());
|
||||
|
||||
if (cpInv != null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("the.player.is.already.member.of.another.clan"));
|
||||
return;
|
||||
if (cpInv.getClan() != null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("the.player.is.already.member.of.another.clan"));
|
||||
return;
|
||||
}
|
||||
if (plugin.getSettingsManager().isRejoinCooldown()) {
|
||||
Long resign = cpInv.getResignTime(clan.getTag());
|
||||
if (resign != null) {
|
||||
long timePassed = Instant.ofEpochMilli(resign).until(Instant.now(), ChronoUnit.MINUTES);
|
||||
int cooldown = plugin.getSettingsManager().getRejoinCooldown();
|
||||
if (timePassed < cooldown) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("the.player.must.wait.0.before.joining.your.clan.again"), cooldown - timePassed));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!plugin.getClanManager().purchaseInvite(player)) {
|
||||
return;
|
||||
}
|
||||
@@ -78,8 +100,8 @@ public class InviteCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("the.clan.members.reached.limit"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
plugin.getRequestManager().addInviteRequest(cp, invited.getName(), clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.asked.to.join"), Helper.capitalize(invited.getName()), clan.getName()));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.asked.to.join"), invited.getName(), clan.getName()));
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,14 @@ import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
@@ -42,22 +45,21 @@ public class KickCommand {
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.KICK, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.kick.player"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
String kicked = arg[0];
|
||||
|
||||
UUID kicked = UUIDMigration.getForcedPlayerUUID(arg[0]);
|
||||
if (kicked == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
if (kicked.equalsIgnoreCase(player.getName())) {
|
||||
if (kicked.equals(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.cannot.kick.yourself"));
|
||||
return;
|
||||
}
|
||||
@@ -70,12 +72,7 @@ public class KickCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.kicked.by"), Helper.capitalize(kicked), player.getName()));
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
clan.removePlayerFromClan(UUIDMigration.getForcedPlayerUUID(kicked));
|
||||
} else {
|
||||
clan.removePlayerFromClan(kicked);
|
||||
}
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.kicked.by"), arg[0], player.getName()));
|
||||
clan.removePlayerFromClan(kicked);
|
||||
}
|
||||
}
|
||||
@@ -1,90 +1,102 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class KillsCommand {
|
||||
public KillsCommand() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.kills")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.stats"));
|
||||
return;
|
||||
}
|
||||
|
||||
String polledPlayerName = player.getName();
|
||||
|
||||
if (arg.length == 1) {
|
||||
polledPlayerName = arg[0];
|
||||
}
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
chatBlock.setFlexibility(true, false);
|
||||
chatBlock.setAlignment("l", "c");
|
||||
chatBlock.addRow(" " + headColor + plugin.getLang("victim"), plugin.getLang("killcount"));
|
||||
|
||||
Map<String, Integer> killsPerPlayerUnordered = plugin.getStorageManager().getKillsPerPlayer(polledPlayerName);
|
||||
|
||||
if (killsPerPlayerUnordered.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("nokillsfound"));
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Integer> killsPerPlayer = Helper.sortByValue(killsPerPlayerUnordered);
|
||||
|
||||
for (Entry<String, Integer> playerKills : killsPerPlayer.entrySet()) {
|
||||
int count = playerKills.getValue();
|
||||
chatBlock.addRow(" " + playerKills.getKey(), ChatColor.AQUA + "" + count);
|
||||
}
|
||||
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + Helper.capitalize(polledPlayerName) + subColor + " " + plugin.getLang("kills") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
if (more) {
|
||||
plugin.getStorageManager().addChatBlock(player, chatBlock);
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + MessageFormat.format(plugin.getLang("view.next.page"), plugin.getSettingsManager().getCommandMore()));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.StorageManager.DataCallback;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class KillsCommand {
|
||||
public KillsCommand() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.kills")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.KILLS, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
String polledPlayerName = player.getName();
|
||||
|
||||
if (arg.length == 1) {
|
||||
polledPlayerName = arg[0];
|
||||
}
|
||||
|
||||
final String name = polledPlayerName;
|
||||
|
||||
plugin.getStorageManager().getKillsPerPlayer(polledPlayerName, new DataCallback<Map<String, Integer>>() {
|
||||
@Override
|
||||
public void onResultReady(Map<String, Integer> data) {
|
||||
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
chatBlock.setFlexibility(true, false);
|
||||
chatBlock.setAlignment("l", "c");
|
||||
chatBlock.addRow(" " + headColor + plugin.getLang("victim"), plugin.getLang("killcount"));
|
||||
|
||||
if (data.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("nokillsfound"));
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Integer> killsPerPlayer = Helper.sortByValue(data);
|
||||
|
||||
for (Entry<String, Integer> playerKills : killsPerPlayer.entrySet()) {
|
||||
int count = playerKills.getValue();
|
||||
chatBlock.addRow(" " + playerKills.getKey(), ChatColor.AQUA + "" + count);
|
||||
}
|
||||
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + name + subColor + " " + plugin.getLang("kills") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
if (more) {
|
||||
plugin.getStorageManager().addChatBlock(player, chatBlock);
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + MessageFormat.format(plugin.getLang("view.next.page"), plugin.getSettingsManager().getCommandMore()));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,92 +1,137 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class ListCommand {
|
||||
public ListCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
NumberFormat formatter = new DecimalFormat("#.#");
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.anyone.list")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (arg.length != 0) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.list"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
List<Clan> clans = plugin.getClanManager().getClans();
|
||||
plugin.getClanManager().sortClansByKDR(clans);
|
||||
|
||||
if (clans.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.clans.have.been.created"));
|
||||
return;
|
||||
}
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getServerName() + subColor + " " + plugin.getLang("clans.lower") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("total.clans") + " " + subColor + clans.size());
|
||||
ChatBlock.sendBlank(player);
|
||||
chatBlock.setAlignment("c", "l", "c", "c");
|
||||
chatBlock.setFlexibility(false, true, false, false);
|
||||
chatBlock.addRow(" " + headColor + plugin.getLang("rank"), plugin.getLang("name"), plugin.getLang("kdr"), plugin.getLang("members"));
|
||||
|
||||
int rank = 1;
|
||||
|
||||
for (Clan clan : clans) {
|
||||
if (!plugin.getSettingsManager().isShowUnverifiedOnList() && !clan.isVerified()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String tag = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + clan.getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight();
|
||||
String name = (clan.isVerified() ? plugin.getSettingsManager().getPageClanNameColor() : ChatColor.GRAY) + clan.getName();
|
||||
String fullname = tag + " " + name;
|
||||
String size = ChatColor.WHITE + "" + clan.getSize();
|
||||
String kdr = clan.isVerified() ? ChatColor.YELLOW + "" + formatter.format(clan.getTotalKDR()) : "";
|
||||
|
||||
chatBlock.addRow(" " + rank, fullname, kdr, size);
|
||||
rank++;
|
||||
}
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
if (more) {
|
||||
plugin.getStorageManager().addChatBlock(player, chatBlock);
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + MessageFormat.format(plugin.getLang("view.next.page"), plugin.getSettingsManager().getCommandMore()));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class ListCommand {
|
||||
public ListCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param args
|
||||
*/
|
||||
public void execute(Player player, String[] args) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
NumberFormat formatter = new DecimalFormat("#.#");
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.anyone.list")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (args.length > 2) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.list"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
List<Clan> clans = plugin.getClanManager().getClans();
|
||||
|
||||
sort(plugin, clans, args);
|
||||
|
||||
if (clans.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.clans.have.been.created"));
|
||||
return;
|
||||
}
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getServerName() + subColor + " " + plugin.getLang("clans.lower") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("total.clans") + " " + subColor + clans.size());
|
||||
ChatBlock.sendBlank(player);
|
||||
chatBlock.setAlignment("c", "l", "c", "c");
|
||||
chatBlock.setFlexibility(false, true, false, false);
|
||||
chatBlock.addRow(" " + headColor + plugin.getLang("rank"), plugin.getLang("name"), plugin.getLang("kdr"), plugin.getLang("members"));
|
||||
|
||||
int rank = 1;
|
||||
|
||||
for (Clan clan : clans) {
|
||||
if (!plugin.getSettingsManager().isShowUnverifiedOnList() && !clan.isVerified()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String tag = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + clan.getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight();
|
||||
String name = (clan.isVerified() ? plugin.getSettingsManager().getPageClanNameColor() : ChatColor.GRAY) + clan.getName();
|
||||
String fullname = tag + " " + name;
|
||||
String size = ChatColor.WHITE + "" + clan.getSize();
|
||||
String kdr = clan.isVerified() ? ChatColor.YELLOW + "" + formatter.format(clan.getTotalKDR()) : "";
|
||||
|
||||
chatBlock.addRow(" " + rank, fullname, kdr, size);
|
||||
rank++;
|
||||
}
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
if (more) {
|
||||
plugin.getStorageManager().addChatBlock(player, chatBlock);
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + MessageFormat.format(plugin.getLang("view.next.page"), plugin.getSettingsManager().getCommandMore()));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
|
||||
private void sort(SimpleClans plugin, List<Clan> clans, String[] args) {
|
||||
SettingsManager sm = plugin.getSettingsManager();
|
||||
String type = sm.getListDefault();
|
||||
String order = null;
|
||||
if (args.length > 0) {
|
||||
type = args[0];
|
||||
}
|
||||
String asc = sm.getListAsc();
|
||||
String desc = sm.getListDesc();
|
||||
if (args.length == 2) {
|
||||
order = args[1];
|
||||
if (!order.equalsIgnoreCase(asc) && !order.equalsIgnoreCase(desc)) {
|
||||
order = null;
|
||||
}
|
||||
}
|
||||
ClanManager cm = plugin.getClanManager();
|
||||
//in case the default type is invalid
|
||||
cm.sortClansByKDR(clans);
|
||||
|
||||
if (type.equalsIgnoreCase(sm.getListActive())) {
|
||||
cm.sortClansByActive(clans, asc.equalsIgnoreCase(order));
|
||||
}
|
||||
if (type.equalsIgnoreCase(sm.getListFounded())) {
|
||||
if (order == null) {
|
||||
order = asc;
|
||||
}
|
||||
cm.sortClansByFounded(clans, asc.equalsIgnoreCase(order));
|
||||
}
|
||||
if (type.equalsIgnoreCase(sm.getListKdr())) {
|
||||
cm.sortClansByKDR(clans, asc.equalsIgnoreCase(order));
|
||||
}
|
||||
if (type.equalsIgnoreCase(sm.getListName())) {
|
||||
if (order == null) {
|
||||
order = asc;
|
||||
}
|
||||
cm.sortClansByName(clans, asc.equalsIgnoreCase(order));
|
||||
}
|
||||
if (type.equalsIgnoreCase(sm.getListSize())) {
|
||||
cm.sortClansBySize(clans, asc.equalsIgnoreCase(order));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,111 +1,119 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class LookupCommand {
|
||||
public LookupCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
NumberFormat formatter = new DecimalFormat("#.#");
|
||||
|
||||
String playerName = null;
|
||||
|
||||
if (arg.length == 0) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.lookup")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
playerName = player.getName();
|
||||
} else if (arg.length == 1) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.anyone.lookup")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
playerName = arg[0];
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.lookup.tag"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer targetCp = plugin.getClanManager().getAnyClanPlayer(playerName);
|
||||
ClanPlayer myCp = plugin.getClanManager().getClanPlayer(player.getName());
|
||||
Clan myClan = myCp == null ? null : myCp.getClan();
|
||||
|
||||
if (targetCp != null) {
|
||||
Clan targetClan = targetCp.getClan();
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, MessageFormat.format(plugin.getLang("s.player.info"), plugin.getSettingsManager().getPageClanNameColor() + targetCp.getName() + subColor) + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
String clanName = ChatColor.WHITE + plugin.getLang("none");
|
||||
|
||||
if (targetClan != null) {
|
||||
clanName = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + targetClan.getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight() + " " + plugin.getSettingsManager().getPageClanNameColor() + targetClan.getName();
|
||||
}
|
||||
|
||||
String status = targetClan == null ? ChatColor.WHITE + plugin.getLang("free.agent") : (targetCp.isLeader() ? plugin.getSettingsManager().getPageLeaderColor() + plugin.getLang("leader") : (targetCp.isTrusted() ? plugin.getSettingsManager().getPageTrustedColor() + plugin.getLang("trusted") : plugin.getSettingsManager().getPageUnTrustedColor() + plugin.getLang("untrusted")));
|
||||
String rank = ChatColor.WHITE + "" + Helper.parseColors(targetCp.getRank());
|
||||
String joinDate = ChatColor.WHITE + "" + targetCp.getJoinDateString();
|
||||
String lastSeen = ChatColor.WHITE + "" + targetCp.getLastSeenString();
|
||||
String inactive = ChatColor.WHITE + "" + targetCp.getInactiveDays() + subColor + "/" + ChatColor.WHITE + plugin.getSettingsManager().getPurgePlayers() + " days";
|
||||
String rival = ChatColor.WHITE + "" + targetCp.getRivalKills();
|
||||
String neutral = ChatColor.WHITE + "" + targetCp.getNeutralKills();
|
||||
String civilian = ChatColor.WHITE + "" + targetCp.getCivilianKills();
|
||||
String deaths = ChatColor.WHITE + "" + targetCp.getDeaths();
|
||||
String kdr = ChatColor.YELLOW + "" + formatter.format(targetCp.getKDR());
|
||||
String pastClans = ChatColor.WHITE + "" + targetCp.getPastClansString(headColor + ", ");
|
||||
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("clan.0"), clanName));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("rank.0"), rank));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("status.0"), status));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("kdr.0"), kdr));
|
||||
ChatBlock.sendMessage(player, " " + subColor + plugin.getLang("kill.totals") + " " + headColor + "[" + plugin.getLang("rival") + ":" + rival + " " + headColor + "" + plugin.getLang("neutral") + ":" + neutral + " " + headColor + "" + plugin.getLang("civilian") + ":" + civilian + headColor + "]");
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("deaths.0"), deaths));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("join.date.0"), joinDate));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("last.seen.0"), lastSeen));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("past.clans.0"), pastClans));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("inactive.0"), inactive));
|
||||
|
||||
if (arg.length == 1 && !targetCp.equals(myCp)) {
|
||||
String killType = ChatColor.GRAY + plugin.getLang("neutral");
|
||||
|
||||
if (targetClan == null) {
|
||||
killType = ChatColor.DARK_GRAY + plugin.getLang("civilian");
|
||||
} else if (myClan != null && myClan.isRival(targetClan.getTag())) {
|
||||
killType = ChatColor.WHITE + plugin.getLang("rival");
|
||||
}
|
||||
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("kill.type.0"), killType));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.data.found"));
|
||||
|
||||
if (arg.length == 1 && myClan != null) {
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, MessageFormat.format(plugin.getLang("kill.type.civilian"), ChatColor.DARK_GRAY));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class LookupCommand {
|
||||
public LookupCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
NumberFormat formatter = new DecimalFormat("#.#");
|
||||
|
||||
String playerName = null;
|
||||
|
||||
if (arg.length == 0) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.lookup")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
playerName = player.getName();
|
||||
} else if (arg.length == 1) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.anyone.lookup")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
playerName = arg[0];
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.lookup.tag"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
UUID targetUuid = UUIDMigration.getForcedPlayerUUID(playerName);
|
||||
if (targetUuid == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
ClanPlayer targetCp = plugin.getClanManager().getAnyClanPlayer(targetUuid);
|
||||
ClanPlayer myCp = plugin.getClanManager().getClanPlayer(player.getUniqueId());
|
||||
Clan myClan = myCp == null ? null : myCp.getClan();
|
||||
|
||||
if (targetCp != null) {
|
||||
Clan targetClan = targetCp.getClan();
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, MessageFormat.format(plugin.getLang("s.player.info"), plugin.getSettingsManager().getPageClanNameColor() + targetCp.getName() + subColor) + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
String clanName = ChatColor.WHITE + plugin.getLang("none");
|
||||
|
||||
if (targetClan != null) {
|
||||
clanName = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + targetClan.getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight() + " " + plugin.getSettingsManager().getPageClanNameColor() + targetClan.getName();
|
||||
}
|
||||
|
||||
String status = targetClan == null ? ChatColor.WHITE + plugin.getLang("free.agent") : (targetCp.isLeader() ? plugin.getSettingsManager().getPageLeaderColor() + plugin.getLang("leader") : (targetCp.isTrusted() ? plugin.getSettingsManager().getPageTrustedColor() + plugin.getLang("trusted") : plugin.getSettingsManager().getPageUnTrustedColor() + plugin.getLang("untrusted")));
|
||||
String rank = ChatColor.WHITE + "" + Helper.parseColors(targetCp.getRankDisplayName());
|
||||
String joinDate = ChatColor.WHITE + "" + targetCp.getJoinDateString();
|
||||
String lastSeen = ChatColor.WHITE + "" + targetCp.getLastSeenString();
|
||||
String inactive = ChatColor.WHITE + "" + targetCp.getInactiveDays() + subColor + "/" + ChatColor.WHITE + plugin.getSettingsManager().getPurgePlayers() + " days";
|
||||
String rival = ChatColor.WHITE + "" + targetCp.getRivalKills();
|
||||
String neutral = ChatColor.WHITE + "" + targetCp.getNeutralKills();
|
||||
String civilian = ChatColor.WHITE + "" + targetCp.getCivilianKills();
|
||||
String deaths = ChatColor.WHITE + "" + targetCp.getDeaths();
|
||||
String kdr = ChatColor.YELLOW + "" + formatter.format(targetCp.getKDR());
|
||||
String pastClans = ChatColor.WHITE + "" + targetCp.getPastClansString(headColor + ", ");
|
||||
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("clan.0"), clanName));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("rank.0"), rank));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("status.0"), status));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("kdr.0"), kdr));
|
||||
ChatBlock.sendMessage(player, " " + subColor + plugin.getLang("kill.totals") + " " + headColor + "[" + plugin.getLang("rival") + ":" + rival + " " + headColor + "" + plugin.getLang("neutral") + ":" + neutral + " " + headColor + "" + plugin.getLang("civilian") + ":" + civilian + headColor + "]");
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("deaths.0"), deaths));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("join.date.0"), joinDate));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("last.seen.0"), lastSeen));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("past.clans.0"), pastClans));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("inactive.0"), inactive));
|
||||
|
||||
if (arg.length == 1 && !targetCp.equals(myCp)) {
|
||||
String killType = ChatColor.GRAY + plugin.getLang("neutral");
|
||||
|
||||
if (targetClan == null) {
|
||||
killType = ChatColor.DARK_GRAY + plugin.getLang("civilian");
|
||||
} else if (myClan != null && myClan.isRival(targetClan.getTag())) {
|
||||
killType = ChatColor.WHITE + plugin.getLang("rival");
|
||||
}
|
||||
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("kill.type.0"), killType));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.data.found"));
|
||||
|
||||
if (arg.length == 1 && myClan != null) {
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, MessageFormat.format(plugin.getLang("kill.type.civilian"), ChatColor.DARK_GRAY));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,13 +33,14 @@ public class MenuCommand {
|
||||
Clan clan = cp == null ? null : cp.getClan();
|
||||
|
||||
boolean isLeader = cp != null && cp.isLeader();
|
||||
boolean isTrusted = cp != null && cp.isTrusted();
|
||||
boolean isVerified = clan != null && clan.isVerified();
|
||||
boolean isNonVerified = clan != null && !clan.isVerified();
|
||||
|
||||
String clanCommand = plugin.getSettingsManager().getCommandClan();
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
chatBlock.setCropRight(false);
|
||||
chatBlock.setPadRight(false);
|
||||
|
||||
if (clan == null && plugin.getPermissionsManager().has(player, "simpleclans.leader.create")) {
|
||||
if (plugin.getSettingsManager().isePurchaseCreation()) {
|
||||
@@ -48,6 +49,10 @@ public class MenuCommand {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.create.tag.name.1.create.a.new.clan"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
}
|
||||
if (clan != null && plugin.getPermissionsManager().has(player, "simpleclans.member.chat")) {
|
||||
String chatCommand = plugin.getSettingsManager().isTagBasedClanChat() ? clan.getTag() : plugin.getSettingsManager().getCommandClanChat();
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.message.1.send.a.message.to.clan.chat"), chatCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isNonVerified && plugin.getSettingsManager().isRequireVerification() && plugin.getSettingsManager().isePurchaseVerification()) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.verify.1.purchase.verification.of.your.clan"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
@@ -81,40 +86,49 @@ public class MenuCommand {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.anyone.roster")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.roster.tag.1.view.a.clan.s.member.list"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.vitals")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.VITALS, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.vitals.1.view.your.clan.member.s.vitals"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.coords")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.COORDS, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.coords.1.view.your.clan.member.s.coordinates"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.stats")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.STATS, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.stats.1.view.your.clan.member.s.stats"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.kills")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.KILLS, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.kills"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.kills")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.KILLS, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.killsplayer"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.ally")) {
|
||||
if (plugin.getSettingsManager().isMemberFee() && isVerified && plugin.getPermissionsManager().has(player, "simpleclans.member.fee-check")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.fee.check"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (plugin.getSettingsManager().isMemberFee() && isVerified && plugin.getPermissionsManager().has(player, RankPermission.FEE_SET, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.fee.set"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && (plugin.getPermissionsManager().has(player, RankPermission.ALLY_ADD, PermissionLevel.LEADER, false)
|
||||
|| plugin.getPermissionsManager().has(player, RankPermission.ALLY_REMOVE, PermissionLevel.LEADER, false))) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.ally.add.remove.tag.1.add.remove.an.ally.clan"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rival")) {
|
||||
if (isVerified && (plugin.getPermissionsManager().has(player, RankPermission.RIVAL_ADD, PermissionLevel.LEADER, false)
|
||||
|| plugin.getPermissionsManager().has(player, RankPermission.RIVAL_REMOVE, PermissionLevel.LEADER, false))) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rival.add.remove.tag.1.add.remove.a.rival.clan"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, "simpleclans.member.home")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.HOME_TP, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("home-menu"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.home-set")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.HOME_SET, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("home-set-menu"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.home-set")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.HOME_SET, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("home-clear-menu"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.home-regroup")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.HOME_REGROUP, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("home-regroup-menu"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.war")) {
|
||||
if (isVerified && (plugin.getPermissionsManager().has(player, RankPermission.WAR_END, PermissionLevel.LEADER, false)
|
||||
|| plugin.getPermissionsManager().has(player, RankPermission.WAR_START, PermissionLevel.LEADER, false))) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.war"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.member.resetkdr")) {
|
||||
@@ -123,42 +137,76 @@ public class MenuCommand {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, "simpleclans.member.bb")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.bb.1.display.bulletin.board"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.bb-add")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.BB_ADD, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.bb.msg.1.add.a.message.to.the.bulletin.board"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.modtag")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.MODTAG, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.modtag.tag.1.modify.the.clan.s.tag"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.DESCRIPTION, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.description.description.1.modify.the.clan.s.description"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
|
||||
String toggles = "";
|
||||
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.bb-toggle")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, "simpleclans.member.bb-toggle")) {
|
||||
toggles += "bb/";
|
||||
}
|
||||
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.member.tag-toggle")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, "simpleclans.member.tag-toggle")) {
|
||||
toggles += "tag/";
|
||||
}
|
||||
|
||||
if (plugin.getSettingsManager().isMemberFee() && isVerified && plugin.getPermissionsManager().has(player, RankPermission.FEE_ENABLE, PermissionLevel.LEADER, false)) {
|
||||
toggles += "fee/";
|
||||
}
|
||||
|
||||
if (!toggles.isEmpty()) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.toggle.command"), clanCommand, ChatColor.WHITE, Helper.stripTrailing(toggles, "/")));
|
||||
}
|
||||
|
||||
if (isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.invite")) {
|
||||
if (plugin.getPermissionsManager().has(player, RankPermission.INVITE, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.invite.player.1.invite.a.player"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.kick")) {
|
||||
if (plugin.getPermissionsManager().has(player, RankPermission.KICK, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.kick.player.1.kick.a.player.from.the.clan"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.setrank")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.trust.setrank"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.settrust")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.trust.untrust.player.1.set.trust.level1"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.settrust")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.trust.untrust.player.1.set.trust.level2"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.create")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.create.rank.1.create.rank"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.assign")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.assign.rank.player.1.assign.rank.to.player"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.unassign")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.unassign.player.1.unassign.player.from.rank"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.delete")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.delete.rank.1.delete.rank"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.RANK_LIST, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.list.1.list.ranks"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.RANK_DISPLAYNAME, PermissionLevel.LEADER, false)) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.setdisplayname.rank.displayname.1.set.rank.displayname"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.available")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.permissions.1.list.available.permissions"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.list")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.permissions.rank.1.list.rank.permissions"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.add")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.permissions.rank.add.permission.1.add.a.permission.to.rank"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.remove")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.rank.permissions.rank.remove.permission.1.remove.a.permission.from.rank"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isLeader && plugin.getPermissionsManager().has(player, "simpleclans.leader.promote")) {
|
||||
chatBlock.addRow(ChatColor.AQUA + " " + MessageFormat.format(plugin.getLang("0.promote.member.1.promote.a.member.to.leader"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
@@ -188,7 +236,7 @@ public class MenuCommand {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.mod.place")) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.place"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (isVerified && isTrusted && plugin.getPermissionsManager().has(player, "simpleclans.mod.mostkilled")) {
|
||||
if (isVerified && plugin.getPermissionsManager().has(player, RankPermission.MOSTKILLED, PermissionLevel.TRUSTED, false)) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.mostkilled"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.mod.disband")) {
|
||||
@@ -203,6 +251,12 @@ public class MenuCommand {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.mod.globalff")) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.globalff.allow.auto.1.set.global.friendly.fire"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.admin.demote")) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.demote.leader.1.demote.a.leader.to.member"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.admin.purge")) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.purge.player.1.purge.a.player"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.admin.resetkdr")) {
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.resetkdr.1.resets.kdr"), clanCommand, ChatColor.WHITE));
|
||||
}
|
||||
@@ -244,6 +298,7 @@ public class MenuCommand {
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.purge.player.1.purge.a.player"), clanCommand, ChatColor.WHITE));
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.verify.tag.1.verify.an.unverified.clan"), clanCommand, ChatColor.WHITE));
|
||||
chatBlock.addRow(ChatColor.DARK_RED + " " + MessageFormat.format(plugin.getLang("0.reload.1.reload.configuration"), clanCommand, ChatColor.WHITE));
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -44,10 +46,10 @@ public class ModtagCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.MODTAG, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.modtag.tag"), plugin.getSettingsManager().getCommandClan()));
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("example.clan.modtag.4kfo.4l"));
|
||||
|
||||
+105
-93
@@ -1,93 +1,105 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class MostKilledCommand {
|
||||
public MostKilledCommand() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.mod.mostkilled")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.stats"));
|
||||
return;
|
||||
}
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
chatBlock.setFlexibility(true, false, false);
|
||||
chatBlock.setAlignment("l", "c", "l");
|
||||
chatBlock.addRow(" " + headColor + plugin.getLang("victim"), headColor + plugin.getLang("killcount"), headColor + plugin.getLang("attacker"));
|
||||
|
||||
Map<String, Integer> killsPerPlayerUnordered = plugin.getStorageManager().getMostKilled();
|
||||
|
||||
if (killsPerPlayerUnordered.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("nokillsfound"));
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Integer> killsPerPlayer = Helper.sortByValue(killsPerPlayerUnordered);
|
||||
|
||||
for (Entry<String, Integer> attackerVictim : killsPerPlayer.entrySet()) {
|
||||
String[] split = attackerVictim.getKey().split(" ");
|
||||
|
||||
if (split.length < 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = attackerVictim.getValue();
|
||||
String attacker = split[0];
|
||||
String victim = split[1];
|
||||
|
||||
chatBlock.addRow(" " + ChatColor.WHITE + victim, ChatColor.AQUA + "" + count, ChatColor.YELLOW + attacker);
|
||||
}
|
||||
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getServerName() + subColor + " " + plugin.getLang("mostkilled") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
if (more) {
|
||||
plugin.getStorageManager().addChatBlock(player, chatBlock);
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + MessageFormat.format(plugin.getLang("view.next.page"), plugin.getSettingsManager().getCommandMore()));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.StorageManager.DataCallback;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class MostKilledCommand {
|
||||
public MostKilledCommand() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.mod.mostkilled")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.MOSTKILLED, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.getStorageManager().getMostKilled(new DataCallback<Map<String, Integer>>() {
|
||||
|
||||
@Override
|
||||
public void onResultReady(Map<String, Integer> data) {
|
||||
new BukkitRunnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
chatBlock.setFlexibility(true, false, false);
|
||||
chatBlock.setAlignment("l", "c", "l");
|
||||
chatBlock.addRow(" " + headColor + plugin.getLang("victim"), headColor + plugin.getLang("killcount"), headColor + plugin.getLang("attacker"));
|
||||
|
||||
if (data.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("nokillsfound"));
|
||||
return;
|
||||
}
|
||||
Map<String, Integer> killsPerPlayer = Helper.sortByValue(data);
|
||||
|
||||
for (Entry<String, Integer> attackerVictim : killsPerPlayer.entrySet()) {
|
||||
String[] split = attackerVictim.getKey().split(" ");
|
||||
|
||||
if (split.length < 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = attackerVictim.getValue();
|
||||
String attacker = split[0];
|
||||
String victim = split[1];
|
||||
|
||||
chatBlock.addRow(" " + ChatColor.WHITE + victim, ChatColor.AQUA + "" + count, ChatColor.YELLOW + attacker);
|
||||
}
|
||||
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getServerName() + subColor + " " + plugin.getLang("mostkilled") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
if (more) {
|
||||
plugin.getStorageManager().addChatBlock(player, chatBlock);
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + MessageFormat.format(plugin.getLang("view.next.page"), plugin.getSettingsManager().getCommandMore()));
|
||||
}
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -58,13 +58,8 @@ public class PlaceCommand {
|
||||
oldClan.clanAnnounce(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("clan.has.been.disbanded"), oldClan.getName()));
|
||||
oldClan.disband();
|
||||
} else {
|
||||
oldClan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("0.has.resigned"), Helper.capitalize(player.getName())));
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
oldClan.removePlayerFromClan(player.getUniqueId());
|
||||
} else {
|
||||
oldClan.removePlayerFromClan(player.getName());
|
||||
}
|
||||
oldClan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("0.has.resigned"), player.getName()));
|
||||
oldClan.removePlayerFromClan(player.getUniqueId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+106
-101
@@ -1,101 +1,106 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class ProfileCommand {
|
||||
public ProfileCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
NumberFormat formatter = new DecimalFormat("#.#");
|
||||
|
||||
Clan clan = null;
|
||||
|
||||
if (arg.length == 0) {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.member.profile")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
} else {
|
||||
if (cp.getClan().isVerified()) {
|
||||
clan = cp.getClan();
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
} else if (arg.length == 1) {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.anyone.profile")) {
|
||||
clan = plugin.getClanManager().getClan(arg[0]);
|
||||
|
||||
if (clan == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.clan.matched"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.profile.tag"), plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
|
||||
if (clan != null) {
|
||||
if (clan.isVerified()) {
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + Helper.capitalize(clan.getName()) + subColor + " " + plugin.getLang("profile") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
String name = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + clan.getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight() + " " + plugin.getSettingsManager().getPageClanNameColor() + clan.getName();
|
||||
String leaders = clan.getLeadersString(plugin.getSettingsManager().getPageLeaderColor(), subColor + ", ");
|
||||
String onlineCount = ChatColor.WHITE + "" + Helper.stripOffLinePlayers(clan.getMembers()).size();
|
||||
String membersOnline = onlineCount + subColor + "/" + ChatColor.WHITE + clan.getSize();
|
||||
String inactive = ChatColor.WHITE + "" + clan.getInactiveDays() + subColor + "/" + ChatColor.WHITE + (clan.isVerified() ? plugin.getSettingsManager().getPurgeClan() : plugin.getSettingsManager().getPurgeUnverified()) + " " + plugin.getLang("days");
|
||||
String founded = ChatColor.WHITE + "" + clan.getFoundedString();
|
||||
String allies = ChatColor.WHITE + "" + clan.getAllyString(subColor + ", ");
|
||||
String rivals = ChatColor.WHITE + "" + clan.getRivalString(subColor + ", ");
|
||||
String kdr = ChatColor.YELLOW + "" + formatter.format(clan.getTotalKDR());
|
||||
String deaths = ChatColor.WHITE + "" + clan.getTotalDeaths();
|
||||
String rival = ChatColor.WHITE + "" + clan.getTotalRival();
|
||||
String neutral = ChatColor.WHITE + "" + clan.getTotalNeutral();
|
||||
String civ = ChatColor.WHITE + "" + clan.getTotalCivilian();
|
||||
String status = ChatColor.WHITE + "" + (clan.isVerified() ? plugin.getSettingsManager().getPageTrustedColor() + plugin.getLang("verified") : plugin.getSettingsManager().getPageUnTrustedColor() + plugin.getLang("unverified"));
|
||||
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("name.0"), name));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("status.0"), status));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("leaders.0"), leaders));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("members.online.0"), membersOnline));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("kdr.0"), kdr));
|
||||
ChatBlock.sendMessage(player, " " + subColor + plugin.getLang("kill.totals") + " " + headColor + "[" + plugin.getLang("rival") + ":" + rival + " " + headColor + "" + plugin.getLang("neutral") + ":" + neutral + " " + headColor + "" + plugin.getLang("civilian") + ":" + civ + headColor + "]");
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("deaths.0"), deaths));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("allies.0"), allies));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("rivals.0"), rivals));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("founded.0"), founded));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("inactive.0"), inactive));
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class ProfileCommand {
|
||||
public ProfileCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
String headColor = plugin.getSettingsManager().getPageHeadingsColor();
|
||||
String subColor = plugin.getSettingsManager().getPageSubTitleColor();
|
||||
NumberFormat formatter = new DecimalFormat("#.#");
|
||||
|
||||
Clan clan = null;
|
||||
|
||||
if (arg.length == 0) {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.member.profile")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
} else {
|
||||
if (cp.getClan().isVerified()) {
|
||||
clan = cp.getClan();
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
} else if (arg.length == 1) {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.anyone.profile")) {
|
||||
clan = plugin.getClanManager().getClan(arg[0]);
|
||||
|
||||
if (clan == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.clan.matched"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.profile.tag"), plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
|
||||
if (clan != null) {
|
||||
if (clan.isVerified()) {
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + clan.getName() + subColor + " " + plugin.getLang("profile") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
|
||||
String name = plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketLeft() + plugin.getSettingsManager().getTagDefaultColor() + clan.getColorTag() + plugin.getSettingsManager().getClanChatBracketColor() + plugin.getSettingsManager().getClanChatTagBracketRight() + " " + plugin.getSettingsManager().getPageClanNameColor() + clan.getName();
|
||||
String description = ChatColor.WHITE + (clan.getDescription() != null && !clan.getDescription().isEmpty() ? clan.getDescription() : plugin.getLang("no.description"));
|
||||
String leaders = clan.getLeadersString(plugin.getSettingsManager().getPageLeaderColor(), subColor + ", ");
|
||||
String onlineCount = ChatColor.WHITE + "" + Helper.stripOffLinePlayers(clan.getMembers()).size();
|
||||
String membersOnline = onlineCount + subColor + "/" + ChatColor.WHITE + clan.getSize();
|
||||
String inactive = ChatColor.WHITE + "" + clan.getInactiveDays() + subColor + "/" + ChatColor.WHITE + (clan.isVerified() ? plugin.getSettingsManager().getPurgeClan() : plugin.getSettingsManager().getPurgeUnverified()) + " " + plugin.getLang("days");
|
||||
String founded = ChatColor.WHITE + "" + clan.getFoundedString();
|
||||
String allies = ChatColor.WHITE + "" + clan.getAllyString(subColor + ", ");
|
||||
String rivals = ChatColor.WHITE + "" + clan.getRivalString(subColor + ", ");
|
||||
String kdr = ChatColor.YELLOW + "" + formatter.format(clan.getTotalKDR());
|
||||
String deaths = ChatColor.WHITE + "" + clan.getTotalDeaths();
|
||||
String rival = ChatColor.WHITE + "" + clan.getTotalRival();
|
||||
String neutral = ChatColor.WHITE + "" + clan.getTotalNeutral();
|
||||
String civ = ChatColor.WHITE + "" + clan.getTotalCivilian();
|
||||
String status = ChatColor.WHITE + "" + (clan.isVerified() ? plugin.getSettingsManager().getPageTrustedColor() + plugin.getLang("verified") : plugin.getSettingsManager().getPageUnTrustedColor() + plugin.getLang("unverified"));
|
||||
String feeEnabled = ChatColor.WHITE + (clan.isMemberFeeEnabled() ? plugin.getLang("fee.enabled") : plugin.getLang("fee.disabled"));
|
||||
String feeValue = ChatColor.WHITE + "" + clan.getMemberFee();
|
||||
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("name.0"), name));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("description.0"), description));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("status.0"), status));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("leaders.0"), leaders));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("members.online.0"), membersOnline));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("kdr.0"), kdr));
|
||||
ChatBlock.sendMessage(player, " " + subColor + plugin.getLang("kill.totals") + " " + headColor + "[" + plugin.getLang("rival") + ":" + rival + " " + headColor + "" + plugin.getLang("neutral") + ":" + neutral + " " + headColor + "" + plugin.getLang("civilian") + ":" + civ + headColor + "]");
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("deaths.0"), deaths));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("fee.0.value.1"), feeEnabled, feeValue));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("allies.0"), allies));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("rivals.0"), rivals));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("founded.0"), founded));
|
||||
ChatBlock.sendMessage(player, " " + subColor + MessageFormat.format(plugin.getLang("inactive.0"), inactive));
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -64,17 +63,20 @@ public class PromoteCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("the.player.is.not.a.member.of.your.clan"));
|
||||
return;
|
||||
}
|
||||
if (clan.isLeader(promoted) && plugin.getSettingsManager().isConfirmationForPromote()) {
|
||||
if (clan.isLeader(promoted)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("the.player.is.already.a.leader"));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("promoted.to.leader"), Helper.capitalize(promoted.getName())));
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
clan.promote(promoted.getUniqueId());
|
||||
} else {
|
||||
clan.promote(promoted.getName());
|
||||
|
||||
if (plugin.getSettingsManager().isConfirmationForPromote() && clan.getLeaders().size() > 1) {
|
||||
plugin.getRequestManager().addPromoteRequest(cp, promoted.getName(), clan);
|
||||
ChatBlock.sendMessage(player,
|
||||
ChatColor.AQUA + plugin.getLang("promotion.vote.has.been.requested.from.all.leaders"));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("promoted.to.leader"), promoted.getName()));
|
||||
clan.promote(promoted.getUniqueId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class PurgeCommand {
|
||||
|
||||
/**
|
||||
* Executes the command
|
||||
*
|
||||
* @param sender
|
||||
* @param args
|
||||
*/
|
||||
public void execute(CommandSender sender, String args[]) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
if (sender instanceof Player) {
|
||||
if (!plugin.getPermissionsManager().has((Player) sender, "simpleclans.admin.purge")) {
|
||||
ChatBlock.sendMessage(sender, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (args.length == 1) {
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(args[0]);
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(uuid);
|
||||
if (uuid == null || cp == null) {
|
||||
ChatBlock.sendMessage(sender, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.getClanManager().deleteClanPlayer(cp);
|
||||
ChatBlock.sendMessage(sender, ChatColor.AQUA + plugin.getLang("player.purged"));
|
||||
return;
|
||||
}
|
||||
|
||||
ChatBlock.sendMessage(sender, ChatColor.RED
|
||||
+ MessageFormat.format(plugin.getLang("usage.purge"), plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Rank;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RoinujNosde
|
||||
*/
|
||||
public class RankCommand {
|
||||
private SimpleClans plugin;
|
||||
private Player player;
|
||||
private ClanPlayer clanPlayer;
|
||||
private Clan clan;
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] args) {
|
||||
this.player = player;
|
||||
plugin = SimpleClans.getInstance();
|
||||
ClanManager clanManager = plugin.getClanManager();
|
||||
|
||||
clanPlayer = clanManager.getClanPlayer(player);
|
||||
if (clanPlayer == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
clan = clanPlayer.getClan();
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!clanPlayer.isLeader()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.length > 0) {
|
||||
String subCommand = args[0].toLowerCase();
|
||||
args = Helper.removeFirst(args);
|
||||
|
||||
switch (subCommand) {
|
||||
case "assign":
|
||||
assignRank(args);
|
||||
return;
|
||||
case "unassign":
|
||||
unassign(args);
|
||||
return;
|
||||
case "create":
|
||||
createRank(args);
|
||||
return;
|
||||
case "list":
|
||||
listRanks();
|
||||
return;
|
||||
case "delete":
|
||||
deleteRank(args);
|
||||
return;
|
||||
case "permissions":
|
||||
permissions(args);
|
||||
return;
|
||||
case "setdisplayname":
|
||||
setDisplayName(args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
private void assignRank(String[] args) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.assign")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (args.length != 2) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.assign"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(args[0]);
|
||||
if (uuid == null || (!clan.isMember(uuid) && !clan.isLeader(uuid))) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
String rank = args[1].toLowerCase();
|
||||
if (!clan.hasRank(rank)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("rank.0.does.not.exist"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cpTarget = plugin.getClanManager().getClanPlayer(uuid);
|
||||
cpTarget.setRank(rank);
|
||||
plugin.getStorageManager().updateClanPlayer(cpTarget);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.rank.changed"));
|
||||
}
|
||||
|
||||
private void unassign(String[] args) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.unassign")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (args.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.unassign"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(args[0]);
|
||||
if (uuid == null || (!clan.isMember(uuid) && !clan.isLeader(uuid))) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cpTarget = plugin.getClanManager().getClanPlayer(uuid);
|
||||
cpTarget.setRank(null);
|
||||
plugin.getStorageManager().updateClanPlayer(cpTarget);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.unassigned.from.rank"));
|
||||
}
|
||||
|
||||
private void createRank(String[] args) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.create")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (args.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.create"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
String rank = args[0].toLowerCase();
|
||||
if (clan.hasRank(rank)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("rank.already.exists"));
|
||||
return;
|
||||
}
|
||||
|
||||
clan.createRank(rank);
|
||||
plugin.getStorageManager().updateClan(clan, true);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("rank.created"));
|
||||
}
|
||||
|
||||
private void listRanks() {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.list")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
List<Rank> ranks = clan.getRanks();
|
||||
|
||||
if (ranks.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.ranks"));
|
||||
return;
|
||||
}
|
||||
|
||||
ranks.sort(Comparator.reverseOrder());
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("clans.ranks"));
|
||||
int count = 1;
|
||||
for (Rank rank : ranks) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("ranks.list.item"), count, Helper.parseColors(rank.getDisplayName()) + ChatColor.AQUA, rank.getName()));
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteRank(String[] args) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.delete")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (args.length != 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.delete"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
String rank = args[0].toLowerCase();
|
||||
if (!clan.hasRank(rank)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("rank.0.does.not.exist"));
|
||||
return;
|
||||
}
|
||||
clan.deleteRank(rank);
|
||||
plugin.getStorageManager().updateClan(clan, true);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("rank.0.deleted"), rank));
|
||||
}
|
||||
|
||||
private void setDisplayName(String[] args) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.setdisplayname")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (args.length < 2) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.setdisplayname"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
String rankName = args[0].toLowerCase();
|
||||
if (!clan.hasRank(rankName)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("rank.0.does.not.exist"), rankName));
|
||||
return;
|
||||
}
|
||||
Rank rank = clan.getRank(rankName);
|
||||
String dn = Helper.toMessage(Helper.removeFirst(args));
|
||||
if (dn.contains("&") && !plugin.getPermissionsManager().has(player, "simpleclans.leader.coloredrank")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.cannot.set.colored.ranks"));
|
||||
return;
|
||||
}
|
||||
rank.setDisplayName(dn);
|
||||
plugin.getStorageManager().updateClan(clan, true);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("rank.displayname.updated"));
|
||||
}
|
||||
|
||||
private void permissions(String[] args) {
|
||||
String validPermissionsToMessage = Helper.toMessage(Helper.fromPermissionArray(), ",");
|
||||
if (args.length == 0) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.available")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("available.rank.permissions"));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + validPermissionsToMessage);
|
||||
return;
|
||||
}
|
||||
if (args.length > 0) {
|
||||
String rank = args[0].toLowerCase();
|
||||
if (!clan.hasRank(rank)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("rank.0.does.not.exist"), rank));
|
||||
return;
|
||||
}
|
||||
Set<String> permissions = clan.getRank(rank).getPermissions();
|
||||
|
||||
if (args.length == 1) {
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.list")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (permissions.isEmpty()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("rank.no.permissions"));
|
||||
return;
|
||||
}
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("rank.0.permissions"), rank));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + Helper.toMessage(permissions.toArray(new String[0]), ","));
|
||||
return;
|
||||
}
|
||||
if (args.length == 3) {
|
||||
String subCommand = args[1].toLowerCase();
|
||||
String permission = args[2].toLowerCase();
|
||||
|
||||
boolean changed = false;
|
||||
|
||||
switch (subCommand) {
|
||||
case "add":
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.add")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
if (!RankPermission.isValid(permission)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("invalid.permission"), permission, validPermissionsToMessage));
|
||||
return;
|
||||
}
|
||||
permissions.add(permission);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("permission.0.added.to.rank.1"), permission, rank));
|
||||
changed = true;
|
||||
break;
|
||||
case "remove":
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.rank.permissions.remove")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
permissions.remove(permission);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("permission.0.removed.from.rank.1"), permission, rank));
|
||||
changed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
plugin.getStorageManager().updateClan(clan, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.permissions"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.language.LanguageResource;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -31,9 +33,11 @@ public class ReloadCommand
|
||||
ChatBlock.sendMessage(sender, ChatColor.RED + "Does not match a clan command");
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.getStorageManager().saveModified();
|
||||
plugin.reloadConfig();
|
||||
LanguageResource.clearCache();
|
||||
plugin.getSettingsManager().load();
|
||||
plugin.getLanguageManager().load();
|
||||
plugin.getStorageManager().importFromDatabase();
|
||||
SimpleClans.getInstance().getPermissionsManager().loadPermissions();
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
@@ -52,18 +54,18 @@ public class ResetKDRCommand {
|
||||
}
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.have.reseted.kdr.of.all.players"));
|
||||
} else {
|
||||
OfflinePlayer toReset = Bukkit.getOfflinePlayer(arg[0]);
|
||||
if (toReset == null) {
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(arg[0]);
|
||||
if (uuid == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
ClanPlayer trcp = plugin.getClanManager().getClanPlayer(toReset);
|
||||
ClanPlayer trcp = plugin.getClanManager().getClanPlayer(uuid);
|
||||
if (trcp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.data.found"));
|
||||
return;
|
||||
}
|
||||
plugin.getClanManager().resetKdr(trcp);
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("you.have.reseted.0.kdr"), toReset.getName()));
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("you.have.reseted.0.kdr"), trcp.getName()));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
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 org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.conversation.ResignPrompt;
|
||||
import org.bukkit.conversations.ConversationFactory;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -36,20 +35,11 @@ public class ResignCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isLeader(player) || clan.getLeaders().size() > 1) {
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("0.has.resigned"), Helper.capitalize(player.getName())));
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
clan.removePlayerFromClan(player.getUniqueId());
|
||||
} else {
|
||||
clan.removePlayerFromClan(player.getName());
|
||||
}
|
||||
} else if (clan.isLeader(player) && clan.getLeaders().size() == 1) {
|
||||
plugin.getClanManager().serverAnnounce(ChatColor.AQUA + MessageFormat.format(plugin.getLang("clan.has.been.disbanded"), clan.getName()));
|
||||
clan.disband();
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan"));
|
||||
}
|
||||
|
||||
new ConversationFactory(plugin)
|
||||
.withFirstPrompt(new ResignPrompt())
|
||||
.withLocalEcho(true)
|
||||
.withTimeout(10)
|
||||
.buildConversation(player).begin();
|
||||
}
|
||||
}
|
||||
@@ -44,10 +44,6 @@ public class RivalCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clan.cannot.create.rivals"));
|
||||
return;
|
||||
}
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
if (arg.length != 2) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.rival"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
@@ -81,11 +77,14 @@ public class RivalCommand {
|
||||
}
|
||||
|
||||
if (action.equals(plugin.getLang("add"))) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.RIVAL_ADD, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (!clan.reachedRivalLimit()) {
|
||||
if (!clan.isRival(rival.getTag())) {
|
||||
clan.addRival(rival);
|
||||
rival.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.initiated.a.rivalry"), Helper.capitalize(clan.getName()), rival.getName()), false);
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.initiated.a.rivalry"), Helper.capitalize(player.getName()), Helper.capitalize(rival.getName())));
|
||||
rival.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.initiated.a.rivalry"), clan.getName(), rival.getName()), false);
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.initiated.a.rivalry"), player.getName(), rival.getName()));
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clans.are.already.rivals"));
|
||||
}
|
||||
@@ -96,9 +95,12 @@ public class RivalCommand {
|
||||
}
|
||||
|
||||
if (action.equals(plugin.getLang("remove"))) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.RIVAL_REMOVE, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (clan.isRival(rival.getTag())) {
|
||||
plugin.getRequestManager().addRivalryBreakRequest(cp, rival, clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.asked.to.end.rivalry"), Helper.capitalize(rival.getName())));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.asked.to.end.rivalry"), rival.getName()));
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clans.are.not.rivals"));
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class RosterCommand {
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + Helper.capitalize(clan.getName()) + subColor + " " + plugin.getLang("roster") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + clan.getName() + subColor + " " + plugin.getLang("roster") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("legend") + " " + plugin.getSettingsManager().getPageLeaderColor() + plugin.getLang("leader") + headColor + ", " + plugin.getSettingsManager().getPageTrustedColor() + plugin.getLang("trusted") + headColor + ", " + plugin.getSettingsManager().getPageUnTrustedColor() + plugin.getLang("untrusted"));
|
||||
ChatBlock.sendBlank(player);
|
||||
@@ -80,7 +80,7 @@ public class RosterCommand {
|
||||
String name = plugin.getSettingsManager().getPageLeaderColor() + cp.getName();
|
||||
String lastSeen = p != null && p.isOnline() && !Helper.isVanished(p) ? ChatColor.GREEN + plugin.getLang("online") : ChatColor.WHITE + cp.getLastSeenDaysString();
|
||||
|
||||
chatBlock.addRow(" " + name, ChatColor.YELLOW + Helper.parseColors(cp.getRank()), lastSeen);
|
||||
chatBlock.addRow(" " + name, ChatColor.YELLOW + Helper.parseColors(cp.getRankDisplayName()) + ChatColor.RESET, lastSeen);
|
||||
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class RosterCommand {
|
||||
String name = (cp.isTrusted() ? plugin.getSettingsManager().getPageTrustedColor() : plugin.getSettingsManager().getPageUnTrustedColor()) + cp.getName();
|
||||
String lastSeen = p != null && p.isOnline() && !Helper.isVanished(p) ? ChatColor.GREEN + plugin.getLang("online") : ChatColor.WHITE + cp.getLastSeenDaysString();
|
||||
|
||||
chatBlock.addRow(" " + name, ChatColor.YELLOW + Helper.parseColors(cp.getRank()), lastSeen);
|
||||
chatBlock.addRow(" " + name, ChatColor.YELLOW + Helper.parseColors(cp.getRankDisplayName()) + ChatColor.RESET, lastSeen);
|
||||
}
|
||||
|
||||
boolean more = chatBlock.sendBlock(player, plugin.getSettingsManager().getPageSize());
|
||||
|
||||
@@ -1,68 +1,35 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
public class SetRankCommand {
|
||||
public SetRankCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.leader.setrank")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
return;
|
||||
}
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (!clan.isVerified()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
if (arg.length < 1) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.setrank"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
|
||||
String playerName = arg[0];
|
||||
String rank = Helper.toMessage(Helper.removeFirst(arg));
|
||||
|
||||
if (!clan.isMember(playerName) && !clan.isLeader(playerName)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cpm = plugin.getClanManager().getClanPlayer(playerName);
|
||||
cpm.setRank(rank);
|
||||
plugin.getStorageManager().updateClanPlayer(cpm);
|
||||
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.rank.changed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
public class SetRankCommand {
|
||||
public SetRankCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.create"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.assign"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.rank.setdisplayname"),
|
||||
plugin.getSettingsManager().getCommandClan()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,9 +46,8 @@ public class StatsCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.stats"));
|
||||
return;
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.STATS, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length != 0) {
|
||||
@@ -57,7 +56,7 @@ public class StatsCommand {
|
||||
}
|
||||
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + Helper.capitalize(clan.getName()) + subColor + " " + plugin.getLang("stats") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + clan.getName() + subColor + " " + plugin.getLang("stats") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("kdr") + " = " + subColor + plugin.getLang("kill.death.ratio"));
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("weights") + " = " + plugin.getLang("rival") + ": " + subColor + plugin.getSettingsManager().getKwRival() + headColor + " " + plugin.getLang("neutral") + ": " + subColor + plugin.getSettingsManager().getKwNeutral() + headColor + " " + plugin.getLang("civilian") + ": " + subColor + plugin.getSettingsManager().getKwCivilian());
|
||||
|
||||
@@ -1,138 +1,157 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class ToggleCommand {
|
||||
|
||||
public ToggleCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
if (arg.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
String cmd = arg[0];
|
||||
|
||||
if (cmd.equalsIgnoreCase("cape")) {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.member.cape-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan.isVerified()) {
|
||||
if (cp.isCapeEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("capeoff"));
|
||||
cp.setCapeEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("capeon"));
|
||||
cp.setCapeEnabled(true);
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("bb") && plugin.getPermissionsManager().has(player, "simpleclans.member.bb-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan.isVerified()) {
|
||||
if (cp.isBbEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("bboff"));
|
||||
cp.setBbEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("bbon"));
|
||||
cp.setBbEnabled(true);
|
||||
}
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("tag") && plugin.getPermissionsManager().has(player, "simpleclans.member.tag-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan.isVerified()) {
|
||||
if (cp.isTagEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("tagoff"));
|
||||
cp.setTagEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("tagon"));
|
||||
cp.setTagEnabled(true);
|
||||
}
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("deposit") && plugin.getPermissionsManager().has(player, "simpleclans.leader.deposit-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
if (clan.isLeader(player)) {
|
||||
if (clan.isVerified()) {
|
||||
if (clan.isAllowDeposit()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("depositoff"));
|
||||
clan.setAllowDeposit(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("depositon"));
|
||||
clan.setAllowDeposit(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("withdraw") && plugin.getPermissionsManager().has(player, "simpleclans.leader.withdraw-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
if (clan.isVerified()) {
|
||||
if (clan.isLeader(player)) {
|
||||
if (clan.isAllowWithdraw()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("withdrawoff"));
|
||||
clan.setAllowWithdraw(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("withdrawon"));
|
||||
clan.setAllowWithdraw(true);
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public class ToggleCommand {
|
||||
|
||||
public ToggleCommand() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the command
|
||||
*
|
||||
* @param player
|
||||
* @param arg
|
||||
*/
|
||||
public void execute(Player player, String[] arg) {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
if (arg.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
String cmd = arg[0];
|
||||
|
||||
if (cmd.equalsIgnoreCase("cape")) {
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.member.cape-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan.isVerified()) {
|
||||
if (cp.isCapeEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("capeoff"));
|
||||
cp.setCapeEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("capeon"));
|
||||
cp.setCapeEnabled(true);
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("not.a.member.of.any.clan"));
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("bb") && plugin.getPermissionsManager().has(player, "simpleclans.member.bb-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan.isVerified()) {
|
||||
if (cp.isBbEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("bboff"));
|
||||
cp.setBbEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("bbon"));
|
||||
cp.setBbEnabled(true);
|
||||
}
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("tag") && plugin.getPermissionsManager().has(player, "simpleclans.member.tag-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan.isVerified()) {
|
||||
if (cp.isTagEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("tagoff"));
|
||||
cp.setTagEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("tagon"));
|
||||
cp.setTagEnabled(true);
|
||||
}
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("deposit") && plugin.getPermissionsManager().has(player, "simpleclans.leader.deposit-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
if (clan.isLeader(player)) {
|
||||
if (clan.isVerified()) {
|
||||
if (clan.isAllowDeposit()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("depositoff"));
|
||||
clan.setAllowDeposit(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("depositon"));
|
||||
clan.setAllowDeposit(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("fee") && plugin.getPermissionsManager().has(player, RankPermission.FEE_ENABLE, PermissionLevel.LEADER, true)) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
if (clan.isVerified()) {
|
||||
if (clan.isMemberFeeEnabled()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("feeoff"));
|
||||
clan.setMemberFeeEnabled(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("feeon"));
|
||||
clan.setMemberFeeEnabled(true);
|
||||
}
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.equalsIgnoreCase("withdraw") && plugin.getPermissionsManager().has(player, "simpleclans.leader.withdraw-toggle")) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
if (cp != null) {
|
||||
Clan clan = cp.getClan();
|
||||
if (clan.isVerified()) {
|
||||
if (clan.isLeader(player)) {
|
||||
if (clan.isAllowWithdraw()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("withdrawoff"));
|
||||
clan.setAllowWithdraw(false);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("withdrawon"));
|
||||
clan.setAllowWithdraw(true);
|
||||
}
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,13 @@ 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.uuid.UUIDMigration;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -49,13 +52,12 @@ public class TrustCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
String trusted = arg[0];
|
||||
|
||||
UUID trusted = UUIDMigration.getForcedPlayerUUID(arg[0]);
|
||||
if (trusted == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
if (trusted.equals(player.getName())) {
|
||||
if (trusted.equals(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.cannot.trust.yourself"));
|
||||
return;
|
||||
}
|
||||
@@ -80,7 +82,7 @@ public class TrustCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.given.trusted.status.by"), Helper.capitalize(trusted), player.getName()));
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.given.trusted.status.by"), arg[0], player.getName()));
|
||||
tcp.setTrusted(true);
|
||||
plugin.getStorageManager().updateClanPlayer(tcp);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -34,20 +36,23 @@ public class UnbanCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
String banned = arg[0];
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(arg[0]);
|
||||
if (uuid == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.getSettingsManager().isBanned(banned)) {
|
||||
if (!plugin.getSettingsManager().isBanned(uuid)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("this.player.is.not.banned"));
|
||||
return;
|
||||
}
|
||||
|
||||
Player pl = Helper.getPlayer(banned);
|
||||
|
||||
Player pl = Bukkit.getPlayer(uuid);
|
||||
if (pl != null) {
|
||||
ChatBlock.sendMessage(pl, ChatColor.AQUA + plugin.getLang("you.have.been.unbanned.from.clan.commands"));
|
||||
}
|
||||
|
||||
plugin.getSettingsManager().removeBanned(banned);
|
||||
plugin.getSettingsManager().removeBanned(uuid);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("player.removed.from.the.banned.list"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,13 @@ 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.uuid.UUIDMigration;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -49,26 +52,25 @@ public class UntrustCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
String trusted = arg[0];
|
||||
|
||||
if (trusted == null) {
|
||||
UUID trustedId = UUIDMigration.getForcedPlayerUUID(arg[0]);
|
||||
if (trustedId == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
return;
|
||||
}
|
||||
if (trusted.equals(player.getName())) {
|
||||
if (trustedId.equals(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.cannot.untrust.yourself"));
|
||||
return;
|
||||
}
|
||||
if (!clan.isMember(trusted)) {
|
||||
if (!clan.isMember(trustedId)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("the.player.is.not.a.member.of.your.clan"));
|
||||
return;
|
||||
}
|
||||
if (clan.isLeader(trusted)) {
|
||||
if (clan.isLeader(trustedId)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("leaders.cannot.be.untrusted"));
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer tcp = plugin.getClanManager().getClanPlayer(trusted);
|
||||
ClanPlayer tcp = plugin.getClanManager().getClanPlayer(trustedId);
|
||||
|
||||
if (tcp == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.player.matched"));
|
||||
@@ -79,7 +81,7 @@ public class UntrustCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.given.untrusted.status.by"), Helper.capitalize(trusted), player.getName()));
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.given.untrusted.status.by"), arg[0], player.getName()));
|
||||
tcp.setTrusted(false);
|
||||
plugin.getStorageManager().updateClanPlayer(tcp);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.bukkit.entity.Player;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -43,17 +42,18 @@ public class VitalsCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!cp.isTrusted()) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("only.trusted.players.can.access.clan.vitals"));
|
||||
return;
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.VITALS, PermissionLevel.TRUSTED, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.length != 0) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.0.vitals"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
}
|
||||
ChatBlock chatBlock = new ChatBlock();
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + Helper.capitalize(clan.getName()) + subColor + " " + plugin.getLang("vitals") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.saySingle(player, plugin.getSettingsManager().getPageClanNameColor() + clan.getName() + subColor + " " + plugin.getLang("vitals") + " " + headColor + Helper.generatePageSeparator(plugin.getSettingsManager().getPageSep()));
|
||||
ChatBlock.sendBlank(player);
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("weapons") + ": " + MessageFormat.format(plugin.getLang("0.s.sword.1.2.b.bow.3.4.a.arrow"), ChatColor.WHITE, ChatColor.DARK_GRAY, ChatColor.WHITE, ChatColor.DARK_GRAY, ChatColor.WHITE));
|
||||
ChatBlock.sendMessage(player, headColor + plugin.getLang("materials") + ": " + ChatColor.AQUA + plugin.getLang("diamond") + ChatColor.DARK_GRAY + ", " + ChatColor.YELLOW + plugin.getLang("gold") + ChatColor.DARK_GRAY + ", " + ChatColor.GRAY + plugin.getLang("stone") + ChatColor.DARK_GRAY + ", " + ChatColor.WHITE + plugin.getLang("iron") + ChatColor.DARK_GRAY + ", " + ChatColor.GOLD + plugin.getLang("wood"));
|
||||
|
||||
@@ -41,10 +41,6 @@ public class WarCommand {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.is.not.verified"));
|
||||
return;
|
||||
}
|
||||
if (!clan.isLeader(player)) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("no.leader.permissions"));
|
||||
return;
|
||||
}
|
||||
if (arg.length != 2) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.war"), plugin.getSettingsManager().getCommandClan()));
|
||||
return;
|
||||
@@ -63,12 +59,15 @@ public class WarCommand {
|
||||
}
|
||||
|
||||
if (action.equals(plugin.getLang("start"))) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.WAR_START, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (!clan.isWarring(war.getTag())) {
|
||||
List<ClanPlayer> onlineLeaders = Helper.stripOffLinePlayers(clan.getLeaders());
|
||||
|
||||
if (!onlineLeaders.isEmpty()) {
|
||||
plugin.getRequestManager().addWarStartRequest(cp, war, clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.have.been.asked.to.accept.the.war.request"), Helper.capitalize(war.getName())));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.have.been.asked.to.accept.the.war.request"), war.getName()));
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("at.least.one.leader.accept.the.alliance"));
|
||||
}
|
||||
@@ -79,9 +78,12 @@ public class WarCommand {
|
||||
}
|
||||
|
||||
if (action.equals(plugin.getLang("end"))) {
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.WAR_END, PermissionLevel.LEADER, true)) {
|
||||
return;
|
||||
}
|
||||
if (clan.isWarring(war.getTag())) {
|
||||
plugin.getRequestManager().addWarEndRequest(cp, war, clan);
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.asked.to.end.rivalry"), Helper.capitalize(war.getName())));
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("leaders.asked.to.end.rivalry"), war.getName()));
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clans.not.at.war"));
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.conversation;
|
||||
|
||||
import org.bukkit.conversations.ConversationContext;
|
||||
import org.bukkit.conversations.Prompt;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class MessagePromptImpl extends org.bukkit.conversations.MessagePrompt {
|
||||
|
||||
private final String message;
|
||||
|
||||
public MessagePromptImpl(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Prompt getNextPrompt(ConversationContext cc) {
|
||||
return END_OF_CONVERSATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext cc) {
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.conversation;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Arrays;
|
||||
|
||||
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.managers.ClanManager;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.conversations.ConversationContext;
|
||||
import org.bukkit.conversations.Prompt;
|
||||
import org.bukkit.conversations.StringPrompt;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class ResignPrompt extends StringPrompt {
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||
final SimpleClans plugin = (SimpleClans) cc.getPlugin();
|
||||
|
||||
String yes = plugin.getLang("resign.yes");
|
||||
Player player = (Player) cc.getForWhom();
|
||||
ClanManager cm = plugin.getClanManager();
|
||||
ClanPlayer cp = cm.getClanPlayer(player);
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (yes.equalsIgnoreCase(input)) {
|
||||
if (!clan.isLeader(player) || clan.getLeaders().size() > 1) {
|
||||
clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("0.has.resigned"), player.getName()));
|
||||
cp.addResignTime(clan.getTag());
|
||||
clan.removePlayerFromClan(player.getUniqueId());
|
||||
|
||||
return new MessagePromptImpl(ChatColor.AQUA + plugin.getLang("resign.success"));
|
||||
} else if (clan.isLeader(player) && clan.getLeaders().size() == 1) {
|
||||
clan.disband();
|
||||
String clanDisbanded = ChatColor.AQUA + MessageFormat.format(plugin.getLang("clan.has.been.disbanded"), clan.getName());
|
||||
//message for the server
|
||||
plugin.getClanManager().serverAnnounce(clanDisbanded);
|
||||
//message for the player
|
||||
return new MessagePromptImpl(clanDisbanded);
|
||||
} else {
|
||||
return new MessagePromptImpl(ChatColor.RED + plugin.getLang("last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan"));
|
||||
}
|
||||
} else {
|
||||
return new MessagePromptImpl(ChatColor.RED + plugin.getLang("resign.request.cancelled"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext cc) {
|
||||
final SimpleClans plugin = (SimpleClans) cc.getPlugin();
|
||||
|
||||
return ChatColor.RED + MessageFormat.format(
|
||||
plugin.getLang("resign.confirmation"), Arrays.asList(
|
||||
plugin.getLang("resign.yes"), plugin.getLang("resign.no")));
|
||||
}
|
||||
|
||||
}
|
||||
+6
-9
@@ -20,7 +20,7 @@ public class AcceptCommandExecutor implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
|
||||
Player player = (Player) commandSender;
|
||||
|
||||
if (plugin.getSettingsManager().isBanned(player.getName())) {
|
||||
if (plugin.getSettingsManager().isBanned(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("banned"));
|
||||
return false;
|
||||
}
|
||||
@@ -42,19 +42,16 @@ public class AcceptCommandExecutor implements CommandExecutor {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("you.have.already.voted"));
|
||||
return false;
|
||||
}
|
||||
plugin.getRequestManager().accept(cp);
|
||||
clan.leaderAnnounce(ChatColor.GREEN + MessageFormat.format(plugin.getLang("voted.to.accept"), Helper.capitalize(player.getName())));
|
||||
|
||||
clan.leaderAnnounce(ChatColor.GREEN + MessageFormat.format(plugin.getLang("voted.to.accept"), player.getName()));
|
||||
plugin.getRequestManager().accept(cp);
|
||||
} else {
|
||||
if (!plugin.getRequestManager().hasRequest(player.getName().toLowerCase())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("nothing.to.accept"));
|
||||
return false;
|
||||
}
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId());
|
||||
cp.setName(player.getName());
|
||||
} else {
|
||||
cp = plugin.getClanManager().getCreateClanPlayer(player.getName());
|
||||
}
|
||||
cp = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId());
|
||||
cp.setName(player.getName());
|
||||
plugin.getRequestManager().accept(cp);
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -1,9 +1,9 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.executors;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -25,8 +25,7 @@ public class AllyCommandExecutor implements CommandExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!plugin.getPermissionsManager().has(player, "simpleclans.member.ally")) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
if (!plugin.getPermissionsManager().has(player, RankPermission.ALLY_CHAT, PermissionLevel.TRUSTED, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+68
-46
@@ -2,57 +2,66 @@ package net.sacredlabyrinth.phaed.simpleclans.executors;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.commands.*;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.*;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
*/
|
||||
public final class ClanCommandExecutor implements CommandExecutor {
|
||||
private SimpleClans plugin;
|
||||
private CreateCommand createCommand;
|
||||
private ListCommand listCommand;
|
||||
private ProfileCommand profileCommand;
|
||||
private RosterCommand rosterCommand;
|
||||
private LookupCommand lookupCommand;
|
||||
private LeaderboardCommand leaderboardCommand;
|
||||
private AlliancesCommand alliancesCommand;
|
||||
private RivalriesCommand rivalriesCommand;
|
||||
private VitalsCommand vitalsCommand;
|
||||
private CoordsCommand coordsCommand;
|
||||
private StatsCommand statsCommand;
|
||||
private AllyCommand allyCommand;
|
||||
private RivalCommand rivalCommand;
|
||||
private BbCommand bbCommand;
|
||||
private ModtagCommand modtagCommand;
|
||||
private ToggleCommand toggleCommand;
|
||||
private InviteCommand inviteCommand;
|
||||
private KickCommand kickCommand;
|
||||
private TrustCommand trustCommand;
|
||||
private UntrustCommand untrustCommand;
|
||||
private PromoteCommand promoteCommand;
|
||||
private DemoteCommand demoteCommand;
|
||||
private ClanffCommand clanffCommand;
|
||||
private FfCommand ffCommand;
|
||||
private ResignCommand resignCommand;
|
||||
private DisbandCommand disbandCommand;
|
||||
private VerifyCommand verifyCommand;
|
||||
private BanCommand banCommand;
|
||||
private UnbanCommand unbanCommand;
|
||||
private ReloadCommand reloadCommand;
|
||||
private GlobalffCommand globalffCommand;
|
||||
private MenuCommand menuCommand;
|
||||
private WarCommand warCommand;
|
||||
private HomeCommand homeCommand;
|
||||
private KillsCommand killsCommand;
|
||||
private MostKilledCommand mostKilledCommand;
|
||||
private SetRankCommand setRankCommand;
|
||||
private BankCommand bankCommand;
|
||||
private PlaceCommand placeCommand;
|
||||
private ResetKDRCommand resetKDRCommand;
|
||||
private final SimpleClans plugin;
|
||||
private final CreateCommand createCommand;
|
||||
private final ListCommand listCommand;
|
||||
private final ProfileCommand profileCommand;
|
||||
private final RosterCommand rosterCommand;
|
||||
private final LookupCommand lookupCommand;
|
||||
private final LeaderboardCommand leaderboardCommand;
|
||||
private final AlliancesCommand alliancesCommand;
|
||||
private final RivalriesCommand rivalriesCommand;
|
||||
private final VitalsCommand vitalsCommand;
|
||||
private final CoordsCommand coordsCommand;
|
||||
private final StatsCommand statsCommand;
|
||||
private final AllyCommand allyCommand;
|
||||
private final RivalCommand rivalCommand;
|
||||
private final BbCommand bbCommand;
|
||||
private final ModtagCommand modtagCommand;
|
||||
private final ToggleCommand toggleCommand;
|
||||
private final InviteCommand inviteCommand;
|
||||
private final KickCommand kickCommand;
|
||||
private final TrustCommand trustCommand;
|
||||
private final UntrustCommand untrustCommand;
|
||||
private final PromoteCommand promoteCommand;
|
||||
private final DemoteCommand demoteCommand;
|
||||
private final ClanffCommand clanffCommand;
|
||||
private final FfCommand ffCommand;
|
||||
private final ResignCommand resignCommand;
|
||||
private final DisbandCommand disbandCommand;
|
||||
private final VerifyCommand verifyCommand;
|
||||
private final BanCommand banCommand;
|
||||
private final FeeCommand feeCommand;
|
||||
private final UnbanCommand unbanCommand;
|
||||
private final ReloadCommand reloadCommand;
|
||||
private final GlobalffCommand globalffCommand;
|
||||
private final MenuCommand menuCommand;
|
||||
private final WarCommand warCommand;
|
||||
private final HomeCommand homeCommand;
|
||||
private final KillsCommand killsCommand;
|
||||
private final MostKilledCommand mostKilledCommand;
|
||||
private final SetRankCommand setRankCommand;
|
||||
private final BankCommand bankCommand;
|
||||
private final PlaceCommand placeCommand;
|
||||
private final ResetKDRCommand resetKDRCommand;
|
||||
private final PurgeCommand purgeCommand;
|
||||
private final DescriptionCommand descriptionCommand;
|
||||
private final RankCommand rankCommand;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -99,6 +108,10 @@ public final class ClanCommandExecutor implements CommandExecutor {
|
||||
bankCommand = new BankCommand();
|
||||
placeCommand = new PlaceCommand();
|
||||
resetKDRCommand = new ResetKDRCommand();
|
||||
feeCommand = new FeeCommand();
|
||||
purgeCommand = new PurgeCommand();
|
||||
descriptionCommand = new DescriptionCommand();
|
||||
rankCommand = new RankCommand();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,7 +124,7 @@ public final class ClanCommandExecutor implements CommandExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (plugin.getSettingsManager().isBanned(player.getName())) {
|
||||
if (plugin.getSettingsManager().isBanned(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("banned"));
|
||||
return false;
|
||||
}
|
||||
@@ -122,7 +135,7 @@ public final class ClanCommandExecutor implements CommandExecutor {
|
||||
String subcommand = args[0];
|
||||
String[] subargs = Helper.removeFirst(args);
|
||||
|
||||
if (subcommand.equalsIgnoreCase(plugin.getLang("create.command"))) {
|
||||
if (subcommand.equalsIgnoreCase(plugin.getLang("create.command")) || subcommand.equalsIgnoreCase("create")) {
|
||||
createCommand.execute(player, subargs);
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("list.command")) || subcommand.equalsIgnoreCase("list")) {
|
||||
listCommand.execute(player, subargs);
|
||||
@@ -200,7 +213,15 @@ public final class ClanCommandExecutor implements CommandExecutor {
|
||||
placeCommand.execute(player, subargs);
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("resetkdr.command")) || subcommand.equalsIgnoreCase("resetkdr")) {
|
||||
resetKDRCommand.execute(player, subargs);
|
||||
} else {
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("fee.command")) || subcommand.equalsIgnoreCase("fee")) {
|
||||
feeCommand.execute(player, subargs);
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("purge.command")) || subcommand.equalsIgnoreCase("purge")){
|
||||
purgeCommand.execute(player, subargs);
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("description.command")) || subcommand.equalsIgnoreCase("description")) {
|
||||
descriptionCommand.execute(player, subargs);
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("rank.command")) || subcommand.equalsIgnoreCase("rank")) {
|
||||
rankCommand.execute(player, subargs);
|
||||
} else {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("does.not.match"));
|
||||
}
|
||||
}
|
||||
@@ -219,8 +240,9 @@ public final class ClanCommandExecutor implements CommandExecutor {
|
||||
placeCommand.execute(sender, subargs);
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("globalff.command")) || subcommand.equalsIgnoreCase("globalff")) {
|
||||
globalffCommand.execute(sender, subargs);
|
||||
}
|
||||
else {
|
||||
} else if (subcommand.equalsIgnoreCase(plugin.getLang("purge.command")) || subcommand.equalsIgnoreCase("purge")) {
|
||||
purgeCommand.execute(sender, subargs);
|
||||
} else {
|
||||
ChatBlock.sendMessage(sender, ChatColor.RED + plugin.getLang("does.not.match"));
|
||||
}
|
||||
}
|
||||
|
||||
+5
-8
@@ -20,7 +20,7 @@ public class DenyCommandExecutor implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
|
||||
Player player = (Player) commandSender;
|
||||
|
||||
if (plugin.getSettingsManager().isBanned(player.getName())) {
|
||||
if (plugin.getSettingsManager().isBanned(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("banned"));
|
||||
return false;
|
||||
}
|
||||
@@ -43,18 +43,15 @@ public class DenyCommandExecutor implements CommandExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
plugin.getRequestManager().deny(cp);
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("has.voted.to.deny"), Helper.capitalize(player.getName())));
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("has.voted.to.deny"), player.getName()));
|
||||
plugin.getRequestManager().deny(cp);
|
||||
} else {
|
||||
if (!plugin.getRequestManager().hasRequest(player.getName().toLowerCase())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("nothing.to.deny"));
|
||||
return false;
|
||||
}
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId());
|
||||
} else {
|
||||
cp = plugin.getClanManager().getCreateClanPlayer(player.getName());
|
||||
}
|
||||
cp = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId());
|
||||
|
||||
plugin.getRequestManager().deny(cp);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ public class MoreCommandExecutor implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
|
||||
Player player = (Player) commandSender;
|
||||
|
||||
if (plugin.getSettingsManager().isBanned(player.getName())) {
|
||||
if (plugin.getSettingsManager().isBanned(player.getUniqueId())) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("banned"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.language;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
/**
|
||||
* Utility class that migrates old language files (yaml) to the new format (properties)
|
||||
*
|
||||
* @author RoinujNosde
|
||||
*
|
||||
*/
|
||||
public class LanguageMigration {
|
||||
|
||||
private SimpleClans plugin;
|
||||
|
||||
public LanguageMigration(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrates all language files in the plugin's data folder
|
||||
*/
|
||||
public void migrate() {
|
||||
File dataFolder = plugin.getDataFolder();
|
||||
if (!dataFolder.exists()) {
|
||||
return;
|
||||
}
|
||||
File[] languageFiles = dataFolder.listFiles(f -> {
|
||||
return f.getName().startsWith("language") && f.getName().endsWith(".yml");
|
||||
});
|
||||
|
||||
for (File file : languageFiles) {
|
||||
convert(file);
|
||||
backup(file);
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the file to the backup folder
|
||||
*
|
||||
* @param file the file to backup
|
||||
*/
|
||||
private void backup(File file) {
|
||||
File backupFolder = new File(plugin.getDataFolder(), "language_backup");
|
||||
if (!backupFolder.exists()) {
|
||||
backupFolder.mkdir();
|
||||
}
|
||||
|
||||
file.renameTo(new File(backupFolder, file.getName()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the yaml file to properties
|
||||
*
|
||||
* @param file
|
||||
*/
|
||||
private void convert(File file) {
|
||||
List<String> lines = null;
|
||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))) {
|
||||
lines = reader.lines().collect(Collectors.toList());
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().severe("Error converting language file " + file.getName());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (lines == null || lines.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> convertedLines = new ArrayList<>();
|
||||
for (String line : lines) {
|
||||
line = line.replaceFirst(":", "=")
|
||||
.replaceAll("''''", "''")
|
||||
.replaceAll("^'", "")
|
||||
.replaceAll("= \'", "=")
|
||||
.replaceAll("'$", "")
|
||||
.replaceAll("^\"", "")
|
||||
.replaceAll("\"$", "")
|
||||
.replaceAll("= \"", "=");
|
||||
convertedLines.add(line);
|
||||
}
|
||||
|
||||
File converted = new File(file.getParentFile(), file.getName().replace("language", "messages").replace("yml", "properties").replace("-", "_"));
|
||||
try (Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(converted), StandardCharsets.UTF_8))) {
|
||||
for (String line : convertedLines) {
|
||||
writer.append(line);
|
||||
writer.append(System.lineSeparator());
|
||||
}
|
||||
|
||||
writer.flush();
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().severe("Error converting language file " + file.getName());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.language;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.PropertyResourceBundle;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RoinujNosde
|
||||
*
|
||||
*/
|
||||
public class LanguageResource {
|
||||
|
||||
private static ResourceLoader loader = new ResourceLoader(SimpleClans.getInstance().getDataFolder());
|
||||
private Locale defaultLocale;
|
||||
|
||||
public LanguageResource() {
|
||||
this.defaultLocale = SimpleClans.getInstance().getSettingsManager().getLanguage();
|
||||
}
|
||||
|
||||
public String getLang(String key, Locale locale) {
|
||||
try {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("messages", locale, loader,
|
||||
new ResourceControl(defaultLocale));
|
||||
return bundle.getString(key);
|
||||
} catch (MissingResourceException ignored) {}
|
||||
|
||||
try {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("messages", locale,
|
||||
SimpleClans.getInstance().getClass().getClassLoader(), new ResourceControl(defaultLocale));
|
||||
|
||||
return bundle.getString(key);
|
||||
} catch (MissingResourceException ignored) {}
|
||||
|
||||
return "Missing language key: " + key;
|
||||
}
|
||||
|
||||
public static void clearCache() {
|
||||
ResourceBundle.clearCache(loader);
|
||||
}
|
||||
|
||||
static class ResourceLoader extends ClassLoader {
|
||||
|
||||
private final File dataFolder;
|
||||
|
||||
public ResourceLoader(File dataFolder) {
|
||||
this.dataFolder = dataFolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL getResource(String name) {
|
||||
File file = new File(dataFolder, name);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
return file.toURI().toURL();
|
||||
} catch (MalformedURLException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static class ResourceControl extends ResourceBundle.Control {
|
||||
|
||||
private Locale defaultLocale;
|
||||
|
||||
public ResourceControl(Locale defaultLocale) {
|
||||
this.defaultLocale = defaultLocale;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getFormats(String baseName) {
|
||||
if (baseName == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
return Arrays.asList("java.properties");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader,
|
||||
boolean reload) throws IllegalAccessException, InstantiationException, IOException {
|
||||
String bundleName = toBundleName(baseName, locale);
|
||||
|
||||
ResourceBundle bundle = null;
|
||||
if (format.equals("java.properties")) {
|
||||
|
||||
String resourceName = toResourceName(bundleName, "properties");
|
||||
|
||||
if (resourceName == null) {
|
||||
return bundle;
|
||||
}
|
||||
URL url = loader.getResource(resourceName);
|
||||
if (url == null) {
|
||||
return bundle;
|
||||
}
|
||||
|
||||
URLConnection connection = url.openConnection();
|
||||
if (reload) {
|
||||
|
||||
connection.setUseCaches(false);
|
||||
}
|
||||
|
||||
InputStreamReader reader = new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8);
|
||||
bundle = new PropertyResourceBundle(reader);
|
||||
reader.close();
|
||||
} else {
|
||||
throw new IllegalArgumentException("unknown format: " + format);
|
||||
}
|
||||
|
||||
return bundle;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Locale getFallbackLocale(String baseName, Locale locale) {
|
||||
if (!locale.equals(defaultLocale) && !locale.equals(Locale.ROOT)) {
|
||||
return defaultLocale;
|
||||
}
|
||||
if (locale.equals(defaultLocale) && !defaultLocale.equals(Locale.ROOT)) {
|
||||
return Locale.ROOT;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+76
-27
@@ -2,7 +2,12 @@ package net.sacredlabyrinth.phaed.simpleclans.listeners;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Kill;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.StorageManager.DataCallback;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Kill.Type;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -15,6 +20,9 @@ import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -78,64 +86,105 @@ public class SCEntityListener implements Listener
|
||||
|
||||
if (attacker != null && victim != null)
|
||||
{
|
||||
ClanPlayer acp;
|
||||
ClanPlayer vcp;
|
||||
if (SimpleClans.getInstance().hasUUID())
|
||||
{
|
||||
acp = plugin.getClanManager().getCreateClanPlayer(attacker.getUniqueId());
|
||||
vcp = plugin.getClanManager().getCreateClanPlayer(victim.getUniqueId());
|
||||
} else
|
||||
{
|
||||
acp = plugin.getClanManager().getCreateClanPlayer(attacker.getName());
|
||||
vcp = plugin.getClanManager().getCreateClanPlayer(victim.getName());
|
||||
}
|
||||
if (SimpleClans.getInstance().getSettingsManager().isDenySameIPKills())
|
||||
{
|
||||
if (attacker.getAddress().getHostString().equals(victim.getAddress().getHostString()))
|
||||
{
|
||||
plugin.getLogger().log(Level.INFO, "Blocked same IP kill calculating: {0} killed {1}. IP: {2}", new Object[]{
|
||||
attacker.getDisplayName(), victim.getDisplayName(), attacker.getAddress().getHostString()
|
||||
});
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
String kdrExempt = "simpleclans.other.kdr-exempt";
|
||||
PermissionsManager pm = plugin.getPermissionsManager();
|
||||
if (pm.has(attacker, kdrExempt) || pm.has(victim, kdrExempt)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer attackerCp = plugin.getClanManager().getCreateClanPlayer(attacker.getUniqueId());
|
||||
ClanPlayer victimCp = plugin.getClanManager().getCreateClanPlayer(victim.getUniqueId());
|
||||
|
||||
double reward = 0;
|
||||
double multipier = plugin.getSettingsManager().getKDRMultipliesPerKill();
|
||||
float kdr = acp.getKDR();
|
||||
float kdr = attackerCp.getKDR();
|
||||
|
||||
if (vcp.getClan() == null || acp.getClan() == null || !vcp.getClan().isVerified() || !acp.getClan().isVerified())
|
||||
if (victimCp.getClan() == null || attackerCp.getClan() == null || !victimCp.getClan().isVerified() || !attackerCp.getClan().isVerified())
|
||||
{
|
||||
acp.addCivilianKill();
|
||||
plugin.getStorageManager().insertKill(attacker, acp.getTag(), victim, "", "c");
|
||||
} else if (acp.getClan().isRival(vcp.getTag()))
|
||||
addKill(Type.CIVILIAN, attackerCp, victimCp);
|
||||
} else if (attackerCp.getClan().isRival(victimCp.getTag()))
|
||||
{
|
||||
if (acp.getClan().isWarring(vcp.getClan()))
|
||||
if (attackerCp.getClan().isWarring(victimCp.getClan()))
|
||||
{
|
||||
reward = (double) kdr * multipier * 4;
|
||||
} else
|
||||
{
|
||||
reward = (double) kdr * multipier * 2;
|
||||
}
|
||||
acp.addRivalKill();
|
||||
plugin.getStorageManager().insertKill(attacker, acp.getTag(), victim, vcp.getTag(), "r");
|
||||
} else if (acp.getClan().isAlly(vcp.getTag()))
|
||||
addKill(Type.RIVAL, attackerCp, victimCp);
|
||||
} else if (attackerCp.getClan().isAlly(victimCp.getTag()))
|
||||
{
|
||||
reward = (double) kdr * multipier * -1;
|
||||
} else
|
||||
{
|
||||
reward = (double) kdr * multipier;
|
||||
acp.addNeutralKill();
|
||||
plugin.getStorageManager().insertKill(attacker, acp.getTag(), victim, vcp.getTag(), "n");
|
||||
addKill(Type.NEUTRAL, attackerCp, victimCp);
|
||||
}
|
||||
|
||||
if (reward != 0 && plugin.getSettingsManager().isMoneyPerKill())
|
||||
{
|
||||
for (ClanPlayer cp : acp.getClan().getOnlineMembers())
|
||||
for (ClanPlayer cp : attackerCp.getClan().getOnlineMembers())
|
||||
{
|
||||
double money = Math.round((reward / acp.getClan().getOnlineMembers().size()) * 100D) / 100D;
|
||||
double money = Math.round((reward / attackerCp.getClan().getOnlineMembers().size()) * 100D) / 100D;
|
||||
cp.toPlayer().sendMessage(ChatColor.AQUA + MessageFormat.format(plugin.getLang("player.got.money"), money, victim.getName(), kdr));
|
||||
plugin.getPermissionsManager().playerGrantMoney(cp.getName(), money);
|
||||
plugin.getPermissionsManager().playerGrantMoney(cp.toPlayer(), money);
|
||||
}
|
||||
}
|
||||
|
||||
// record death for victim
|
||||
vcp.addDeath();
|
||||
plugin.getStorageManager().updateClanPlayerAsync(vcp);
|
||||
victimCp.addDeath();
|
||||
plugin.getStorageManager().updateClanPlayer(victimCp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addKill(Kill.Type type, ClanPlayer attacker, ClanPlayer victim) {
|
||||
if (type == null || attacker == null || victim == null) {
|
||||
return;
|
||||
}
|
||||
final Kill kill = new Kill(attacker, victim, LocalDateTime.now());
|
||||
if (plugin.getSettingsManager().isDelayBetweenKills() && plugin.getClanManager().isKillBeforeDelay(kill)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getSettingsManager().isMaxKillsPerVictim()) {
|
||||
plugin.getStorageManager().getKillsPerPlayer(attacker.getName(), new DataCallback<Map<String,Integer>>() {
|
||||
|
||||
@Override
|
||||
public void onResultReady(Map<String, Integer> data) {
|
||||
final int max = plugin.getSettingsManager().getMaxKillsPerVictim();
|
||||
Integer kills = data.get(kill.getVictim().getName());
|
||||
if (kills != null) {
|
||||
if (kills.intValue() < max) {
|
||||
saveKill(kill, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
saveKill(kill, type);
|
||||
}
|
||||
|
||||
private void saveKill(Kill kill, Kill.Type type) {
|
||||
plugin.getClanManager().addKill(kill);
|
||||
ClanPlayer killer = kill.getKiller();
|
||||
ClanPlayer victim = kill.getVictim();
|
||||
killer.addKill(type);
|
||||
plugin.getStorageManager().insertKill(killer.toPlayer(), killer.getTag(), victim.toPlayer(), victim.getTag(), type.getShortname());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param event
|
||||
*/
|
||||
|
||||
@@ -156,10 +156,9 @@ public class SCPlayerListener implements Listener {
|
||||
String message = event.getMessage();
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(event.getPlayer());
|
||||
|
||||
if (cp != null) {
|
||||
if (cp != null && !event.isCancelled()) {
|
||||
if (cp.getChannel().equals(ClanPlayer.Channel.CLAN)) {
|
||||
event.setCancelled(true);
|
||||
//TODO: Document this permission
|
||||
if (!plugin.getPermissionsManager().has(cp.toPlayer(), "simpleclans.member.chat")) {
|
||||
ChatBlock.sendMessage(cp.toPlayer(), ChatColor.RED + plugin.getLang("insufficient.permissions"));
|
||||
return;
|
||||
@@ -181,8 +180,8 @@ public class SCPlayerListener implements Listener {
|
||||
boolean isClanChat = event.getMessage().contains("" + ChatColor.RED + ChatColor.WHITE + ChatColor.RED + ChatColor.BLACK);
|
||||
boolean isAllyChat = event.getMessage().contains("" + ChatColor.AQUA + ChatColor.WHITE + ChatColor.AQUA + ChatColor.BLACK);
|
||||
|
||||
for (Iterator iter = event.getRecipients().iterator(); iter.hasNext();) {
|
||||
Player player = (Player) iter.next();
|
||||
for (Iterator<Player> iter = event.getRecipients().iterator(); iter.hasNext();) {
|
||||
Player player = iter.next();
|
||||
|
||||
ClanPlayer rcp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
@@ -259,7 +258,7 @@ public class SCPlayerListener implements Listener {
|
||||
SimpleClans.getInstance().getPermissionsManager().addPlayerPermissions(cp);
|
||||
|
||||
if (plugin.getSettingsManager().isBbShowOnLogin() && cp.isBbEnabled()) {
|
||||
cp.getClan().displayBb(player);
|
||||
cp.getClan().displayBb(player, plugin.getSettingsManager().getBbLoginSize());
|
||||
}
|
||||
|
||||
SimpleClans.getInstance().getPermissionsManager().addClanPermissions(cp);
|
||||
|
||||
@@ -10,10 +10,13 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.ChatEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -23,6 +26,7 @@ public final class ClanManager {
|
||||
private SimpleClans plugin;
|
||||
private HashMap<String, Clan> clans = new HashMap<>();
|
||||
private HashMap<String, ClanPlayer> clanPlayers = new HashMap<>();
|
||||
private HashMap<ClanPlayer, List<Kill>> kills = new HashMap<>();
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -37,8 +41,76 @@ public final class ClanManager {
|
||||
public void cleanData() {
|
||||
clans.clear();
|
||||
clanPlayers.clear();
|
||||
kills.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a kill to the memory
|
||||
*
|
||||
* @param kill
|
||||
*/
|
||||
public void addKill(Kill kill) {
|
||||
if (kill == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<Kill> list = kills.get(kill.getKiller());
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
kills.put(kill.getKiller(), list);
|
||||
}
|
||||
|
||||
Iterator<Kill> iterator = list.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Kill oldKill = iterator.next();
|
||||
if (oldKill.getVictim().equals(kill.getKiller())) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
//cleaning
|
||||
final int delay = plugin.getSettingsManager().getDelayBetweenKills();
|
||||
long timePassed = oldKill.getTime().until(LocalDateTime.now(), ChronoUnit.MINUTES);
|
||||
if (timePassed >= delay) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
list.add(kill);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this kill respects the delay
|
||||
*
|
||||
* @param kill
|
||||
* @return
|
||||
*/
|
||||
public boolean isKillBeforeDelay(Kill kill) {
|
||||
if (kill == null) {
|
||||
return false;
|
||||
}
|
||||
List<Kill> list = kills.get(kill.getKiller());
|
||||
if (list == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Iterator<Kill> iterator = list.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
|
||||
Kill oldKill = iterator.next();
|
||||
if (oldKill.getVictim().equals(kill.getVictim())) {
|
||||
|
||||
final int delay = plugin.getSettingsManager().getDelayBetweenKills();
|
||||
long timePassed = oldKill.getTime().until(kill.getTime(), ChronoUnit.MINUTES);
|
||||
if (timePassed < delay) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Import a clan into the in-memory store
|
||||
*
|
||||
@@ -54,13 +126,9 @@ public final class ClanManager {
|
||||
* @param cp
|
||||
*/
|
||||
public void importClanPlayer(ClanPlayer cp) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
if (cp.getUniqueId() != null) {
|
||||
this.clanPlayers.put(cp.getUniqueId().toString(), cp);
|
||||
}
|
||||
} else {
|
||||
this.clanPlayers.put(cp.getCleanName(), cp);
|
||||
}
|
||||
if (cp.getUniqueId() != null) {
|
||||
this.clanPlayers.put(cp.getUniqueId().toString(), cp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,12 +139,7 @@ public final class ClanManager {
|
||||
* @param name
|
||||
*/
|
||||
public void createClan(Player player, String colorTag, String name) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = getCreateClanPlayer(player.getUniqueId());
|
||||
} else {
|
||||
cp = getCreateClanPlayer(player.getName());
|
||||
}
|
||||
ClanPlayer cp = getCreateClanPlayer(player.getUniqueId());
|
||||
|
||||
boolean verified = !plugin.getSettingsManager().isRequireVerification() || plugin.getPermissionsManager().has(player, "simpleclans.mod.verify");
|
||||
|
||||
@@ -91,17 +154,18 @@ public final class ClanManager {
|
||||
SimpleClans.getInstance().getPermissionsManager().updateClanPermissions(clan);
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new CreateClanEvent(clan));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reset a player's kdr
|
||||
* @param cp
|
||||
* Reset a player's KDR
|
||||
*
|
||||
* @param cp
|
||||
*/
|
||||
public void resetKdr(ClanPlayer cp) {
|
||||
cp.setCivilianKills(0);
|
||||
cp.setNeutralKills(0);
|
||||
cp.setRivalKills(0);
|
||||
cp.setDeaths(0);
|
||||
plugin.getStorageManager().updateClanPlayerAsync(cp);
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +174,11 @@ public final class ClanManager {
|
||||
* @param cp
|
||||
*/
|
||||
public void deleteClanPlayer(ClanPlayer cp) {
|
||||
clanPlayers.remove(cp.getCleanName());
|
||||
Clan clan = cp.getClan();
|
||||
if (clan != null) {
|
||||
clan.removePlayerFromClan(cp.getUniqueId());
|
||||
}
|
||||
clanPlayers.remove(cp.getUniqueId().toString());
|
||||
plugin.getStorageManager().deleteClanPlayer(cp);
|
||||
}
|
||||
|
||||
@@ -153,23 +221,6 @@ public final class ClanManager {
|
||||
return clans.get(Helper.cleanTag(tag));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a player's clan
|
||||
*
|
||||
* @param playerName
|
||||
* @return null if not in a clan
|
||||
*/
|
||||
@Deprecated
|
||||
public Clan getClanByPlayerName(String playerName) {
|
||||
ClanPlayer cp = getClanPlayer(playerName);
|
||||
|
||||
if (cp != null) {
|
||||
return cp.getClan();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a player's clan
|
||||
*
|
||||
@@ -211,11 +262,7 @@ public final class ClanManager {
|
||||
*/
|
||||
public ClanPlayer getClanPlayerJoinEvent(Player player) {
|
||||
SimpleClans.getInstance().getStorageManager().importFromDatabaseOnePlayer(player);
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return getClanPlayer(player.getUniqueId());
|
||||
} else {
|
||||
return getClanPlayer(player.getName());
|
||||
}
|
||||
return getClanPlayer(player.getUniqueId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,14 +273,9 @@ public final class ClanManager {
|
||||
* @return
|
||||
*/
|
||||
public ClanPlayer getClanPlayer(OfflinePlayer player) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return getClanPlayer(player.getUniqueId());
|
||||
} else {
|
||||
return getClanPlayer(player.getName());
|
||||
}
|
||||
return getClanPlayer(player.getUniqueId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer data object if a player is currently in a clan, null
|
||||
* if he's not in a clan
|
||||
@@ -245,33 +287,6 @@ public final class ClanManager {
|
||||
return getClanPlayer((OfflinePlayer) player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer data object if a player is currently in a clan, null
|
||||
* if he's not in a clan
|
||||
*
|
||||
* @param playerName
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ClanPlayer getClanPlayer(String playerName) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = getClanPlayerName(playerName);
|
||||
} else {
|
||||
cp = clanPlayers.get(playerName.toLowerCase());
|
||||
}
|
||||
|
||||
if (cp == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (cp.getClan() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return cp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer data object if a player is currently in a clan, null
|
||||
* if he's not in a clan
|
||||
@@ -320,24 +335,6 @@ public final class ClanManager {
|
||||
return cp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer data object for the player, will retrieve disabled
|
||||
* clan players as well, these are players who used to be in a clan but are
|
||||
* not currently in one, their data file persists and can be accessed. their
|
||||
* clan will be null though.
|
||||
*
|
||||
* @param playerName
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ClanPlayer getAnyClanPlayer(String playerName) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return getClanPlayerName(playerName);
|
||||
} else {
|
||||
return clanPlayers.get(playerName.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer data object for the player, will retrieve disabled
|
||||
* clan players as well, these are players who used to be in a clan but are
|
||||
@@ -351,26 +348,6 @@ public final class ClanManager {
|
||||
return clanPlayers.get(playerUniqueId.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer object for the player, creates one if not found
|
||||
*
|
||||
* @param playerName
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ClanPlayer getCreateClanPlayer(String playerName) {
|
||||
if (clanPlayers.containsKey(playerName.toLowerCase())) {
|
||||
return clanPlayers.get(playerName.toLowerCase());
|
||||
}
|
||||
|
||||
ClanPlayer cp = new ClanPlayer(playerName);
|
||||
|
||||
plugin.getStorageManager().insertClanPlayer(cp);
|
||||
importClanPlayer(cp);
|
||||
|
||||
return cp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ClanPlayer object for the player, creates one if not found
|
||||
*
|
||||
@@ -378,16 +355,12 @@ public final class ClanManager {
|
||||
* @return
|
||||
*/
|
||||
public ClanPlayer getCreateClanPlayerUUID(String playerDisplayName) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID playerUniqueId = UUIDMigration.getForcedPlayerUUID(playerDisplayName);
|
||||
if (playerUniqueId != null) {
|
||||
return getCreateClanPlayer(playerUniqueId);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return getCreateClanPlayer(playerDisplayName);
|
||||
}
|
||||
UUID playerUniqueId = UUIDMigration.getForcedPlayerUUID(playerDisplayName);
|
||||
if (playerUniqueId != null) {
|
||||
return getCreateClanPlayer(playerUniqueId);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -442,11 +415,11 @@ public final class ClanManager {
|
||||
|
||||
if (plugin.getSettingsManager().isChatTags()) {
|
||||
String prefix = plugin.getPermissionsManager().getPrefix(player);
|
||||
String suffix = plugin.getPermissionsManager().getSuffix(player);
|
||||
//String suffix = plugin.getPermissionsManager().getSuffix(player);
|
||||
String lastColor = plugin.getSettingsManager().isUseColorCodeFromPrefix() ? Helper.getLastColorCode(prefix) : ChatColor.WHITE + "";
|
||||
String fullName = player.getName();
|
||||
|
||||
ClanPlayer cp = plugin.getClanManager().getAnyClanPlayer(player.getName());
|
||||
ClanPlayer cp = plugin.getClanManager().getAnyClanPlayer(player.getUniqueId());
|
||||
|
||||
if (cp == null) {
|
||||
return;
|
||||
@@ -472,27 +445,32 @@ public final class ClanManager {
|
||||
* @param player
|
||||
*/
|
||||
public void updateLastSeen(Player player) {
|
||||
ClanPlayer cp = getAnyClanPlayer(player.getName());
|
||||
ClanPlayer cp = getAnyClanPlayer(player.getUniqueId());
|
||||
|
||||
if (cp != null) {
|
||||
cp.updateLastSeen();
|
||||
plugin.getStorageManager().updateClanPlayerAsync(cp);
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
|
||||
Clan clan = cp.getClan();
|
||||
|
||||
if (clan != null) {
|
||||
clan.updateLastUsed();
|
||||
plugin.getStorageManager().updateClanAsync(clan);
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param playerName
|
||||
* Bans a player from clan commands
|
||||
*
|
||||
* @param uuid the player's uuid
|
||||
*/
|
||||
public void ban(String playerName) {
|
||||
ClanPlayer cp = getClanPlayer(playerName);
|
||||
Clan clan = cp.getClan();
|
||||
public void ban(UUID uuid) {
|
||||
ClanPlayer cp = getClanPlayer(uuid);
|
||||
Clan clan = null;
|
||||
if (cp != null) {
|
||||
clan = cp.getClan();
|
||||
}
|
||||
|
||||
if (clan != null) {
|
||||
if (clan.getSize() == 1) {
|
||||
@@ -502,14 +480,14 @@ public final class ClanManager {
|
||||
cp.addPastClan(clan.getColorTag() + (cp.isLeader() ? ChatColor.DARK_RED + "*" : ""));
|
||||
cp.setLeader(false);
|
||||
cp.setJoinDate(0);
|
||||
clan.removeMember(playerName);
|
||||
clan.removeMember(uuid);
|
||||
|
||||
plugin.getStorageManager().updateClanPlayer(cp);
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
}
|
||||
}
|
||||
|
||||
plugin.getSettingsManager().addBanned(playerName);
|
||||
plugin.getSettingsManager().addBanned(uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -545,7 +523,7 @@ public final class ClanManager {
|
||||
out += ChatColor.WHITE + plugin.getLang("armor.h");
|
||||
} else if (h.getType().equals(Material.DIAMOND_HELMET)) {
|
||||
out += ChatColor.AQUA + plugin.getLang("armor.h");
|
||||
} else if (h.getType().equals(Material.GOLD_HELMET)) {
|
||||
} else if (h.getType().equals(Material.GOLDEN_HELMET)) {
|
||||
out += ChatColor.YELLOW + plugin.getLang("armor.h");
|
||||
} else if (h.getType().equals(Material.IRON_HELMET)) {
|
||||
out += ChatColor.GRAY + plugin.getLang("armor.h");
|
||||
@@ -564,7 +542,7 @@ public final class ClanManager {
|
||||
out += ChatColor.WHITE + plugin.getLang("armor.c");
|
||||
} else if (c.getType().equals(Material.DIAMOND_CHESTPLATE)) {
|
||||
out += ChatColor.AQUA + plugin.getLang("armor.c");
|
||||
} else if (c.getType().equals(Material.GOLD_CHESTPLATE)) {
|
||||
} else if (c.getType().equals(Material.GOLDEN_CHESTPLATE)) {
|
||||
out += ChatColor.YELLOW + plugin.getLang("armor.c");
|
||||
} else if (c.getType().equals(Material.IRON_CHESTPLATE)) {
|
||||
out += ChatColor.GRAY + plugin.getLang("armor.c");
|
||||
@@ -583,7 +561,7 @@ public final class ClanManager {
|
||||
out += ChatColor.WHITE + plugin.getLang("armor.l");
|
||||
} else if (l.getType().equals(Material.DIAMOND_LEGGINGS)) {
|
||||
out += plugin.getLang("armor.l");
|
||||
} else if (l.getType().equals(Material.GOLD_LEGGINGS)) {
|
||||
} else if (l.getType().equals(Material.GOLDEN_LEGGINGS)) {
|
||||
out += plugin.getLang("armor.l");
|
||||
} else if (l.getType().equals(Material.IRON_LEGGINGS)) {
|
||||
out += plugin.getLang("armor.l");
|
||||
@@ -602,7 +580,7 @@ public final class ClanManager {
|
||||
out += ChatColor.WHITE + plugin.getLang("armor.B");
|
||||
} else if (b.getType().equals(Material.DIAMOND_BOOTS)) {
|
||||
out += ChatColor.AQUA + plugin.getLang("armor.B");
|
||||
} else if (b.getType().equals(Material.GOLD_BOOTS)) {
|
||||
} else if (b.getType().equals(Material.GOLDEN_BOOTS)) {
|
||||
out += ChatColor.YELLOW + plugin.getLang("armor.B");
|
||||
} else if (b.getType().equals(Material.IRON_BOOTS)) {
|
||||
out += ChatColor.WHITE + plugin.getLang("armor.B");
|
||||
@@ -640,7 +618,7 @@ public final class ClanManager {
|
||||
out += ChatColor.AQUA + plugin.getLang("weapon.S") + headColor + countString;
|
||||
}
|
||||
|
||||
count = getItemCount(inv.all(Material.GOLD_SWORD));
|
||||
count = getItemCount(inv.all(Material.GOLDEN_SWORD));
|
||||
|
||||
if (count > 0) {
|
||||
String countString = count > 1 ? count + "" : "";
|
||||
@@ -661,7 +639,7 @@ public final class ClanManager {
|
||||
out += ChatColor.GRAY + plugin.getLang("weapon.S") + headColor + countString;
|
||||
}
|
||||
|
||||
count = getItemCount(inv.all(Material.WOOD_SWORD));
|
||||
count = getItemCount(inv.all(Material.WOODEN_SWORD));
|
||||
|
||||
if (count > 0) {
|
||||
String countString = count > 1 ? count + "" : "";
|
||||
@@ -680,7 +658,7 @@ public final class ClanManager {
|
||||
count += getItemCount(inv.all(Material.TIPPED_ARROW));
|
||||
|
||||
if (count > 0) {
|
||||
out += ChatColor.WHITE + headColor + count;
|
||||
out += ChatColor.WHITE + plugin.getLang("weapon.A") + headColor + count;
|
||||
}
|
||||
|
||||
if (out.length() == 0) {
|
||||
@@ -724,30 +702,30 @@ public final class ClanManager {
|
||||
count += getFoodPoints(inv, Material.CAKE, 14, 2.8);
|
||||
count += getFoodPoints(inv, Material.CARROT, 3, 3.6);
|
||||
count += getFoodPoints(inv, Material.CHORUS_FRUIT, 4, 2.4);
|
||||
count += getFoodPoints(inv, Material.RAW_FISH, 2, 5, .2); //clownfish
|
||||
count += getFoodPoints(inv, Material.COOKED_CHICKEN, 6, 7.2);
|
||||
count += getFoodPoints(inv, Material.COOKED_FISH, 5, 6);
|
||||
count += getFoodPoints(inv, Material.COOKED_MUTTON, 6, 9.6);
|
||||
count += getFoodPoints(inv, Material.GRILLED_PORK, 8, 12.8);
|
||||
count += getFoodPoints(inv, Material.COOKED_PORKCHOP, 8, 12.8);
|
||||
count += getFoodPoints(inv, Material.COOKED_RABBIT, 5, 6);
|
||||
count += getFoodPoints(inv, Material.COOKED_FISH, 1, 6, 9.6); //salmon
|
||||
count += getFoodPoints(inv, Material.COOKED_SALMON, 1, 6, 9.6);
|
||||
count += getFoodPoints(inv, Material.COOKIE, 2, .4);
|
||||
count += getFoodPoints(inv, Material.GOLDEN_APPLE, 4, 9.6);
|
||||
count += getFoodPoints(inv, Material.GOLDEN_CARROT, 6, 14.4);
|
||||
count += getFoodPoints(inv, Material.MELON, 2, 1.2);
|
||||
count += getFoodPoints(inv, Material.MUSHROOM_SOUP, 6, 7.2);
|
||||
count += getFoodPoints(inv, Material.MUSHROOM_STEW, 6, 7.2);
|
||||
count += getFoodPoints(inv, Material.POISONOUS_POTATO, 2, 1.2);
|
||||
count += getFoodPoints(inv, Material.POTATO, 1, 0.6);
|
||||
count += getFoodPoints(inv, Material.RAW_FISH, 3, 1, 0.2); //pufferfish
|
||||
count += getFoodPoints(inv, Material.PUFFERFISH, 3, 1, 0.2);
|
||||
count += getFoodPoints(inv, Material.PUMPKIN_PIE, 8, 4.8);
|
||||
count += getFoodPoints(inv, Material.RABBIT_STEW, 10, 12);
|
||||
count += getFoodPoints(inv, Material.RAW_BEEF, 3, 1.8);
|
||||
count += getFoodPoints(inv, Material.RAW_CHICKEN, 2, 1.2);
|
||||
count += getFoodPoints(inv, Material.RAW_FISH, 0, 4, .4); //fish
|
||||
count += getFoodPoints(inv, Material.BEEF, 3, 1.8);
|
||||
count += getFoodPoints(inv, Material.CHICKEN, 2, 1.2);
|
||||
count += getFoodPoints(inv, Material.MUTTON, 2, 1.2);
|
||||
count += getFoodPoints(inv, Material.PORK, 3, 1.8);
|
||||
count += getFoodPoints(inv, Material.PORKCHOP, 3, 1.8);
|
||||
count += getFoodPoints(inv, Material.RABBIT, 3, 1.8);
|
||||
count += getFoodPoints(inv, Material.RAW_FISH, 1, .4); //raw salmon
|
||||
count += getFoodPoints(inv, Material.SALMON, 1, .4);
|
||||
count += getFoodPoints(inv, Material.COD, 2, .4);
|
||||
count += getFoodPoints(inv, Material.COOKED_COD, 5, 6);
|
||||
count += getFoodPoints(inv, Material.TROPICAL_FISH, 1, .2);
|
||||
count += getFoodPoints(inv, Material.ROTTEN_FLESH, 4, .8);
|
||||
count += getFoodPoints(inv, Material.SPIDER_EYE, 2, 3.2);
|
||||
count += getFoodPoints(inv, Material.COOKED_BEEF, 8, 12.8);
|
||||
@@ -806,6 +784,90 @@ public final class ClanManager {
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort clans by active
|
||||
*
|
||||
* @param clans
|
||||
* @param asc
|
||||
*/
|
||||
public void sortClansByActive(List<Clan> clans, boolean asc) {
|
||||
clans.sort((c1, c2) -> {
|
||||
int o = 1;
|
||||
if (!asc) {
|
||||
o = -1;
|
||||
}
|
||||
|
||||
return ((Long) c1.getLastUsed()).compareTo(c2.getLastUsed()) * o;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort clans by founded date
|
||||
*
|
||||
* @param clans
|
||||
* @param asc
|
||||
*/
|
||||
public void sortClansByFounded(List<Clan> clans, boolean asc) {
|
||||
clans.sort((c1, c2) -> {
|
||||
int o = 1;
|
||||
if (!asc) {
|
||||
o = -1;
|
||||
}
|
||||
|
||||
return ((Long) c1.getFounded()).compareTo(c2.getFounded()) * o;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort clans by kdr
|
||||
*
|
||||
* @param clans
|
||||
* @param asc
|
||||
*/
|
||||
public void sortClansByKDR(List<Clan> clans, boolean asc) {
|
||||
clans.sort((c1, c2) -> {
|
||||
int o = 1;
|
||||
if (!asc) {
|
||||
o = -1;
|
||||
}
|
||||
|
||||
return ((Float) c1.getTotalKDR()).compareTo(c2.getTotalKDR()) * o;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort clans by size
|
||||
*
|
||||
* @param clans
|
||||
* @param asc
|
||||
*/
|
||||
public void sortClansBySize(List<Clan> clans, boolean asc) {
|
||||
clans.sort((c1, c2) -> {
|
||||
int o = 1;
|
||||
if (!asc) {
|
||||
o = -1;
|
||||
}
|
||||
|
||||
return ((Integer) c1.getSize()).compareTo(c2.getSize()) * o;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort clans by name
|
||||
*
|
||||
* @param clans
|
||||
*/
|
||||
public void sortClansByName(List<Clan> clans, boolean asc) {
|
||||
clans.sort((c1, c2) -> {
|
||||
int o = 1;
|
||||
if (!asc) {
|
||||
o = -1;
|
||||
}
|
||||
|
||||
return c1.getName().compareTo(c2.getName()) * o;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort clans by KDR
|
||||
@@ -880,6 +942,32 @@ public final class ClanManager {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Purchase member fee set
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
public boolean purchaseMemberFeeSet(Player player) {
|
||||
if (!plugin.getSettingsManager().isePurchaseMemberFeeSet()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
double price = plugin.getSettingsManager().geteMemberFeeSetPrice();
|
||||
|
||||
if (plugin.getPermissionsManager().hasEconomy()) {
|
||||
if (plugin.getPermissionsManager().playerHasMoney(player, price)) {
|
||||
plugin.getPermissionsManager().playerChargeMoney(player, price);
|
||||
player.sendMessage(ChatColor.RED + MessageFormat.format(plugin.getLang("account.has.been.debited"), price));
|
||||
} else {
|
||||
player.sendMessage(ChatColor.RED + plugin.getLang("not.sufficient.money"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Purchase clan creation
|
||||
@@ -984,10 +1072,10 @@ public final class ClanManager {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Purchase Reset Kdr
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
@@ -995,9 +1083,9 @@ public final class ClanManager {
|
||||
if (!plugin.getSettingsManager().isePurchaseResetKdr()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
double price = plugin.getSettingsManager().geteResetKdr();
|
||||
|
||||
|
||||
if (plugin.getPermissionsManager().hasEconomy()) {
|
||||
if (plugin.getPermissionsManager().playerHasMoney(player, price)) {
|
||||
plugin.getPermissionsManager().playerChargeMoney(player, price);
|
||||
@@ -1101,8 +1189,8 @@ public final class ClanManager {
|
||||
* @param player
|
||||
* @param msg
|
||||
*/
|
||||
public void processClanChat(Player player, String msg) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
public void processClanChat(Player player, final String msg) {
|
||||
final ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
return;
|
||||
@@ -1141,29 +1229,34 @@ public final class ClanManager {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + "You have unmuted clan chat");
|
||||
}
|
||||
} else {
|
||||
List<ClanPlayer> receivers = new LinkedList<>();
|
||||
final List<ClanPlayer> receivers = new LinkedList<>();
|
||||
for (ClanPlayer p : cp.getClan().getOnlineMembers()) {
|
||||
if (!p.isMuted()) {
|
||||
receivers.add(p);
|
||||
}
|
||||
}
|
||||
|
||||
ChatEvent ce = new ChatEvent(msg, cp, receivers, ChatEvent.Type.CLAN);
|
||||
Bukkit.getServer().getPluginManager().callEvent(ce);
|
||||
|
||||
if (ce.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String message = Helper.formatClanChat(cp, ce.getMessage(), ce.getPlaceholders());
|
||||
String eyeMessage = Helper.formatSpyClanChat(cp, message);
|
||||
plugin.getServer().getConsoleSender().sendMessage(eyeMessage);
|
||||
|
||||
for (ClanPlayer p : ce.getReceivers()) {
|
||||
ChatBlock.sendMessage(p.toPlayer(), message);
|
||||
}
|
||||
|
||||
sendToAllSeeing(eyeMessage, ce.getReceivers());
|
||||
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ChatEvent ce = new ChatEvent(msg, cp, receivers, ChatEvent.Type.CLAN);
|
||||
Bukkit.getServer().getPluginManager().callEvent(ce);
|
||||
|
||||
if (ce.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String message = Helper.formatClanChat(cp, ce.getMessage(), ce.getPlaceholders());
|
||||
String eyeMessage = Helper.formatSpyClanChat(cp, message);
|
||||
plugin.getServer().getConsoleSender().sendMessage(eyeMessage);
|
||||
|
||||
for (ClanPlayer p : ce.getReceivers()) {
|
||||
ChatBlock.sendMessage(p.toPlayer(), message);
|
||||
}
|
||||
|
||||
sendToAllSeeing(eyeMessage, ce.getReceivers());
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1199,8 +1292,8 @@ public final class ClanManager {
|
||||
* @param player
|
||||
* @param msg
|
||||
*/
|
||||
public void processAllyChat(Player player, String msg) {
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
public void processAllyChat(Player player, final String msg) {
|
||||
final ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);
|
||||
|
||||
if (cp == null) {
|
||||
return;
|
||||
@@ -1239,41 +1332,40 @@ public final class ClanManager {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + "You have unmuted ally chat");
|
||||
}
|
||||
} else {
|
||||
List<ClanPlayer> receivers = new LinkedList<>();
|
||||
final List<ClanPlayer> receivers = new LinkedList<>();
|
||||
Set<ClanPlayer> allies = cp.getClan().getAllAllyMembers();
|
||||
allies.addAll(cp.getClan().getMembers());
|
||||
for (ClanPlayer ally : allies) {
|
||||
if (ally.isMutedAlly()) {
|
||||
continue;
|
||||
}
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
if (player.getUniqueId().equals(ally.getUniqueId())) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (player.getName().equalsIgnoreCase(ally.getName())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (player.getUniqueId().equals(ally.getUniqueId())) {
|
||||
continue;
|
||||
}
|
||||
receivers.add(ally);
|
||||
}
|
||||
|
||||
ChatEvent ce = new ChatEvent(msg, cp, receivers, ChatEvent.Type.ALLY);
|
||||
Bukkit.getServer().getPluginManager().callEvent(ce);
|
||||
|
||||
if (ce.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String message = Helper.formatAllyChat(cp, ce.getMessage(), ce.getPlaceholders());
|
||||
SimpleClans.log(message);
|
||||
|
||||
Player self = cp.toPlayer();
|
||||
ChatBlock.sendMessage(self, message);
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ChatEvent ce = new ChatEvent(msg, cp, receivers, ChatEvent.Type.ALLY);
|
||||
Bukkit.getServer().getPluginManager().callEvent(ce);
|
||||
|
||||
for (ClanPlayer p : ce.getReceivers()) {
|
||||
ChatBlock.sendMessage(p.toPlayer(), message);
|
||||
}
|
||||
if (ce.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String message = Helper.formatAllyChat(cp, ce.getMessage(), ce.getPlaceholders());
|
||||
plugin.getLogger().info(message);
|
||||
|
||||
Player self = cp.toPlayer();
|
||||
ChatBlock.sendMessage(self, message);
|
||||
|
||||
for (ClanPlayer p : ce.getReceivers()) {
|
||||
ChatBlock.sendMessage(p.toPlayer(), message);
|
||||
}
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1285,12 +1377,7 @@ public final class ClanManager {
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean processGlobalChat(Player player, String msg) {
|
||||
ClanPlayer cp;
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
cp = plugin.getClanManager().getClanPlayer(player.getUniqueId());
|
||||
} else {
|
||||
cp = plugin.getClanManager().getClanPlayer(player.getName());
|
||||
}
|
||||
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player.getUniqueId());
|
||||
|
||||
if (cp == null) {
|
||||
return false;
|
||||
|
||||
@@ -7,16 +7,16 @@ import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Deprecated
|
||||
public class LanguageManager {
|
||||
private File file;
|
||||
private HashMap<String, String> language;
|
||||
private String[] comments = new String[]{};
|
||||
|
||||
public LanguageManager() {
|
||||
load();
|
||||
//load();
|
||||
}
|
||||
|
||||
public void load() {
|
||||
@@ -85,6 +85,6 @@ public class LanguageManager {
|
||||
return o.toString();
|
||||
}
|
||||
|
||||
return null;
|
||||
return "Missing language for "+key;
|
||||
}
|
||||
}
|
||||
+105
-5
@@ -3,17 +3,23 @@ package net.sacredlabyrinth.phaed.simpleclans.managers;
|
||||
import net.milkbowl.vault.chat.Chat;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import net.milkbowl.vault.permission.Permission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.PermissionLevel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.RankPermission;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionAttachment;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
|
||||
/**
|
||||
@@ -46,12 +52,12 @@ public final class PermissionsManager {
|
||||
setupEconomy();
|
||||
setupPermissions();
|
||||
} catch (ClassNotFoundException e) {
|
||||
SimpleClans.log("[SimpleClans] Vault not found. No economy or extended Permissions support.");
|
||||
SimpleClans.getInstance().getLogger().info("Vault not found. No economy or extended Permissions support.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether exonomy plugin exists and is enabled
|
||||
* Whether economy plugin exists and is enabled
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -71,7 +77,7 @@ public final class PermissionsManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the permissions for earch clan from the config
|
||||
* Saves the permissions for each clan from the config
|
||||
*/
|
||||
public void savePermissions() {
|
||||
for (Clan clan : plugin.getClanManager().getClans()) {
|
||||
@@ -79,11 +85,12 @@ public final class PermissionsManager {
|
||||
SimpleClans.getInstance().getSettingsManager().getConfig().set("permissions." + clan.getTag(), getPermissions(clan));
|
||||
}
|
||||
}
|
||||
SimpleClans.getInstance().getSettingsManager().load();
|
||||
SimpleClans.getInstance().getSettingsManager().save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds all pemrissions for a clan
|
||||
* Adds all permissions for a clan
|
||||
*
|
||||
* @param clan
|
||||
*/
|
||||
@@ -157,6 +164,29 @@ public final class PermissionsManager {
|
||||
public Map<Player, PermissionAttachment> getPermAttaches() {
|
||||
return permAttaches;
|
||||
}
|
||||
|
||||
/**
|
||||
* Charge a player some money
|
||||
*
|
||||
* @param player
|
||||
* @param money
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean playerChargeMoney(String player, double money) {
|
||||
return economy.withdrawPlayer(player, money).transactionSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* Charge a player some money
|
||||
*
|
||||
* @param player
|
||||
* @param money
|
||||
* @return
|
||||
*/
|
||||
public boolean playerChargeMoney(OfflinePlayer player, double money) {
|
||||
return economy.withdrawPlayer(player, money).transactionSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* Charge a player some money
|
||||
@@ -166,7 +196,7 @@ public final class PermissionsManager {
|
||||
* @return
|
||||
*/
|
||||
public boolean playerChargeMoney(Player player, double money) {
|
||||
return economy.withdrawPlayer(player, money).transactionSuccess();
|
||||
return playerChargeMoney((OfflinePlayer) player, money);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,6 +254,22 @@ public final class PermissionsManager {
|
||||
return economy.getBalance(player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player has permissions
|
||||
*
|
||||
* @param world the world
|
||||
* @param player the player
|
||||
* @param perm the permission
|
||||
* @return whether he has the permission
|
||||
*/
|
||||
public boolean has(String world, OfflinePlayer player, String perm) {
|
||||
if (player != null && permission != null) {
|
||||
return permission.playerHas(world, player, perm);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player has permissions
|
||||
*
|
||||
@@ -242,6 +288,60 @@ public final class PermissionsManager {
|
||||
return player.hasPermission(perm);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the player has the rank permission or the permission level, and the equivalent Bukkit permission
|
||||
*
|
||||
* @param player the player
|
||||
* @param permission the rank permission
|
||||
* @param notify notify the player if they don't have permission
|
||||
* @return
|
||||
*/
|
||||
public boolean has(Player player, RankPermission permission, PermissionLevel level, boolean notify) {
|
||||
if (player == null || permission == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ClanPlayer clanPlayer = plugin.getClanManager().getClanPlayer(player);
|
||||
if (clanPlayer == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean hasBukkitPermission = has(player, permission.getBukkitPermission());
|
||||
if (!hasBukkitPermission) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean hasLevel = false;
|
||||
if (level != null) {
|
||||
switch (level) {
|
||||
case LEADER:
|
||||
hasLevel = clanPlayer.isLeader();
|
||||
break;
|
||||
case TRUSTED:
|
||||
hasLevel = clanPlayer.isTrusted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
boolean hasRankPermission = false;
|
||||
String rankName = clanPlayer.getRankId();
|
||||
Clan clan = clanPlayer.getClan();
|
||||
if (clan.hasRank(rankName)) {
|
||||
hasRankPermission = clan.getRank(rankName).getPermissions().contains(permission.toString());
|
||||
} else {
|
||||
if (rankName != null && !rankName.isEmpty()) {
|
||||
clanPlayer.setRank(null);
|
||||
}
|
||||
}
|
||||
|
||||
if (notify && !hasLevel && !hasRankPermission) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("you.must.be.0.or.have.the.permission.1.to.use.this"),
|
||||
level == PermissionLevel.LEADER ? plugin.getLang("leader") : plugin.getLang("trusted"), permission.toString()));
|
||||
}
|
||||
|
||||
return hasLevel || hasRankPermission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the player permissions linked to a clan
|
||||
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.managers;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.clip.placeholderapi.PlaceholderHook;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
import static me.clip.placeholderapi.PlaceholderAPIPlugin.booleanFalse;
|
||||
import static me.clip.placeholderapi.PlaceholderAPIPlugin.booleanTrue;
|
||||
|
||||
/**
|
||||
* {@link Class} to manage and hook {@link SimpleClans} into {@link PlaceholderAPI}
|
||||
*
|
||||
* @since 2.10.1
|
||||
*
|
||||
* @author Peng1104
|
||||
*/
|
||||
|
||||
public final class PlaceholdersManager {
|
||||
|
||||
/**
|
||||
* The {@link SimpleClans} {@link Plugin} instance
|
||||
*
|
||||
* @since 2.10.1
|
||||
*/
|
||||
|
||||
private SimpleClans plugin;
|
||||
|
||||
/**
|
||||
* The {@link PlaceholdersManager} constructor
|
||||
*
|
||||
* @since 2.10.1
|
||||
*/
|
||||
|
||||
public PlaceholdersManager(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
setupPlaceholderAPI();
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the {@link PlaceholderAPI} hook
|
||||
*
|
||||
* @since 2.10.1
|
||||
*/
|
||||
|
||||
private void setupPlaceholderAPI() {
|
||||
PlaceholderAPI.registerPlaceholderHook(plugin.getName(), new PlaceholderHook() {
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player player, String identifier) {
|
||||
return onRequest(player, identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onRequest(OfflinePlayer player, String identifier) {
|
||||
if (player == null) return "";
|
||||
|
||||
return getPlaceholderValue(SimpleClans.getInstance().getClanManager().getAnyClanPlayer(player.getUniqueId()), identifier);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value for the requested {@link ClanPlayer} and identifier
|
||||
*
|
||||
* @param player The {@link ClanPlayer} to request the placeholders value for
|
||||
* @param identifier String that determine what value to return
|
||||
*
|
||||
* @return value for the requested {@link ClanPlayer} and params
|
||||
*
|
||||
* @since 2.10.1
|
||||
*/
|
||||
|
||||
public String getPlaceholderValue(ClanPlayer player, String identifier) {
|
||||
if (player == null) return "";
|
||||
|
||||
Clan clan = player.getClan();
|
||||
|
||||
switch (identifier) {
|
||||
case "neutral_kills": {
|
||||
return String.valueOf(player.getNeutralKills());
|
||||
}
|
||||
case "rival_kills": {
|
||||
return String.valueOf(player.getRivalKills());
|
||||
}
|
||||
case "civilian_kills": {
|
||||
return String.valueOf(player.getCivilianKills());
|
||||
}
|
||||
case "total_kills": {
|
||||
return String.valueOf(player.getNeutralKills() + player.getRivalKills() + player.getCivilianKills());
|
||||
}
|
||||
case "weighted_kills": {
|
||||
return String.valueOf(player.getWeightedKills());
|
||||
}
|
||||
case "deaths": {
|
||||
return String.valueOf(player.getDeaths());
|
||||
}
|
||||
case "kdr": {
|
||||
return String.valueOf(player.getKDR());
|
||||
}
|
||||
case "in_clan": {
|
||||
return (clan != null) ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_leader": {
|
||||
return player.isLeader() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_trusted": {
|
||||
return (!player.isLeader() && player.isTrusted()) ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_member": {
|
||||
return (!player.isTrusted() && !player.isLeader() && clan != null) ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_bb_enabled": {
|
||||
return player.isBbEnabled() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_usechatshortcut": {
|
||||
return player.isUseChatShortcut() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_allychat": {
|
||||
return player.isAllyChat() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_clanchat": {
|
||||
return player.isClanChat() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_globalchat": {
|
||||
return player.isGlobalChat() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_cape_enabled": {
|
||||
return player.isCapeEnabled() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_tag_enabled": {
|
||||
return player.isTagEnabled() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_friendlyfire_on": {
|
||||
return player.isFriendlyFire() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_muted": {
|
||||
return player.isMuted() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "is_mutedally": {
|
||||
return player.isMutedAlly() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "join_date": {
|
||||
return player.getJoinDateString();
|
||||
}
|
||||
case "inactive_days": {
|
||||
return String.valueOf(player.getInactiveDays());
|
||||
}
|
||||
case "lastseen": {
|
||||
return player.getLastSeenString();
|
||||
}
|
||||
case "lastseendays": {
|
||||
return player.getLastSeenDaysString();
|
||||
}
|
||||
case "tag": {
|
||||
return player.getTag();
|
||||
}
|
||||
case "tag_label": {
|
||||
return player.getTagLabel();
|
||||
}
|
||||
case "rank": {
|
||||
return player.getRankId();
|
||||
}
|
||||
case "rank_displayname": {
|
||||
return player.getRankDisplayName();
|
||||
}
|
||||
case "clanchat_player_color": {
|
||||
if (player.isLeader()) return plugin.getSettingsManager().getClanChatLeaderColor();
|
||||
if (player.isTrusted()) return plugin.getSettingsManager().getClanChatTrustedColor();
|
||||
if (clan != null) return plugin.getSettingsManager().getClanChatMemberColor();
|
||||
return "";
|
||||
}
|
||||
case "allychat_player_color": {
|
||||
if (player.isLeader()) return plugin.getSettingsManager().getAllyChatLeaderColor();
|
||||
if (player.isTrusted()) return plugin.getSettingsManager().getAllyChatTrustedColor();
|
||||
if (clan != null) return plugin.getSettingsManager().getAllyChatMemberColor();
|
||||
return "";
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (clan == null) return "";
|
||||
|
||||
switch (identifier) {
|
||||
case "clan_total_neutral": {
|
||||
return String.valueOf(clan.getTotalNeutral());
|
||||
}
|
||||
case "clan_total_civilian": {
|
||||
return String.valueOf(clan.getTotalCivilian());
|
||||
}
|
||||
case "clan_total_rival": {
|
||||
return String.valueOf(clan.getTotalRival());
|
||||
}
|
||||
case "clan_total_kills": {
|
||||
return String.valueOf(clan.getTotalRival() + clan.getTotalNeutral() + clan.getTotalCivilian());
|
||||
}
|
||||
case "clan_total_deaths": {
|
||||
return String.valueOf(clan.getTotalDeaths());
|
||||
}
|
||||
case "clan_total_kdr": {
|
||||
return String.valueOf(clan.getTotalKDR());
|
||||
}
|
||||
case "clan_average_wk": {
|
||||
return String.valueOf(clan.getAverageWK());
|
||||
}
|
||||
case "clan_leader_size": {
|
||||
return String.valueOf(clan.getLeaders().size());
|
||||
}
|
||||
case "clan_balance": {
|
||||
return String.valueOf(clan.getBalance());
|
||||
}
|
||||
case "clan_allow_withdraw": {
|
||||
return clan.isAllowWithdraw() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "clan_allow_deposit": {
|
||||
return clan.isAllowDeposit() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "clan_size": {
|
||||
return String.valueOf(clan.getSize());
|
||||
}
|
||||
case "clan_name": {
|
||||
return clan.getName();
|
||||
}
|
||||
case "clan_color_tag": {
|
||||
return clan.getColorTag();
|
||||
}
|
||||
case "clan_tag": {
|
||||
return clan.getTag();
|
||||
}
|
||||
case "clan_founded": {
|
||||
return clan.getFoundedString();
|
||||
}
|
||||
case "clan_friendly_fire": {
|
||||
return clan.isFriendlyFire() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "clan_is_unrivable": {
|
||||
return clan.isUnrivable() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "clan_is_anyonline": {
|
||||
return clan.isAnyOnline() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "clan_is_verified": {
|
||||
return clan.isVerified() ? booleanTrue() : booleanFalse();
|
||||
}
|
||||
case "clan_capeurl": {
|
||||
return clan.getCapeUrl();
|
||||
}
|
||||
case "clan_inactivedays": {
|
||||
return String.valueOf(clan.getInactiveDays());
|
||||
}
|
||||
case "clan_onlinemembers_count": {
|
||||
return String.valueOf(clan.getOnlineMembers().size());
|
||||
}
|
||||
case "clan_allies_count": {
|
||||
return String.valueOf(clan.getAllies().size());
|
||||
}
|
||||
case "clan_rivals_count": {
|
||||
return String.valueOf(clan.getRivals().size());
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
+209
-167
@@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
* @author phaed
|
||||
@@ -43,15 +44,19 @@ public final class RequestManager {
|
||||
* @param clan
|
||||
*/
|
||||
public void addDemoteRequest(ClanPlayer requester, String demotedName, Clan clan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("asking.for.the.demotion"), Helper.capitalize(requester.getName()), demotedName);
|
||||
if (requests.containsKey(clan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("asking.for.the.demotion"), requester.getName(), demotedName);
|
||||
|
||||
ClanPlayer demotedTp = plugin.getClanManager().getClanPlayer(demotedName.toLowerCase());
|
||||
ClanPlayer demotedTp = plugin.getClanManager().getClanPlayer(UUIDMigration.getForcedPlayerUUID(demotedName));
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(clan.getLeaders());
|
||||
acceptors.remove(demotedTp);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.DEMOTE, acceptors, requester, demotedName, clan, msg);
|
||||
requests.put(clan.getTag(), req);
|
||||
req.vote(requester.getName(), VoteResult.ACCEPT);
|
||||
requests.put(req.getClan().getTag(), req);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -63,13 +68,16 @@ public final class RequestManager {
|
||||
* @param clan
|
||||
*/
|
||||
public void addPromoteRequest(ClanPlayer requester, String promotedName, Clan clan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("asking.for.the.promotion"), Helper.capitalize(requester.getName()), promotedName);
|
||||
if (requests.containsKey(clan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("asking.for.the.promotion"), requester.getName(), promotedName);
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(clan.getLeaders());
|
||||
acceptors.remove(requester);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.PROMOTE, acceptors, requester, promotedName, clan, msg);
|
||||
requests.put(clan.getTag(), req);
|
||||
requests.put(req.getClan().getTag(), req);
|
||||
req.vote(requester.getName(), VoteResult.ACCEPT);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -80,13 +88,16 @@ public final class RequestManager {
|
||||
* @param clan
|
||||
*/
|
||||
public void addDisbandRequest(ClanPlayer requester, Clan clan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("asking.for.the.deletion"), Helper.capitalize(requester.getName()));
|
||||
if (requests.containsKey(clan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("asking.for.the.deletion"), requester.getName());
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(clan.getLeaders());
|
||||
acceptors.remove(requester);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.DISBAND, acceptors, requester, clan.getTag(), clan, msg);
|
||||
requests.put(clan.getTag(), req);
|
||||
requests.put(req.getTarget(), req);
|
||||
req.vote(requester.getName(), VoteResult.ACCEPT);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -98,7 +109,10 @@ public final class RequestManager {
|
||||
* @param clan
|
||||
*/
|
||||
public void addInviteRequest(ClanPlayer requester, String invitedName, Clan clan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("inviting.you.to.join"), Helper.capitalize(requester.getName()), clan.getName());
|
||||
if (requests.containsKey(invitedName.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("inviting.you.to.join"), requester.getName(), clan.getName());
|
||||
Request req = new Request(plugin, ClanRequest.INVITE, null, requester, invitedName, clan, msg);
|
||||
requests.put(invitedName.toLowerCase(), req);
|
||||
ask(req);
|
||||
@@ -112,13 +126,16 @@ public final class RequestManager {
|
||||
* @param requestingClan
|
||||
*/
|
||||
public void addWarStartRequest(ClanPlayer requester, Clan warClan, Clan requestingClan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.war"), Helper.capitalize(requestingClan.getName()), Helper.stripColors(warClan.getColorTag()));
|
||||
if (requests.containsKey(warClan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.war"), requestingClan.getName(), Helper.stripColors(warClan.getColorTag()));
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(warClan.getLeaders());
|
||||
acceptors.remove(requester);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.START_WAR, acceptors, requester, warClan.getTag(), requestingClan, msg);
|
||||
requests.put(warClan.getTag(), req);
|
||||
requests.put(req.getTarget(), req);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -130,13 +147,16 @@ public final class RequestManager {
|
||||
* @param requestingClan
|
||||
*/
|
||||
public void addWarEndRequest(ClanPlayer requester, Clan warClan, Clan requestingClan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.to.end.the.war"), Helper.capitalize(requestingClan.getName()), Helper.stripColors(warClan.getColorTag()));
|
||||
if (requests.containsKey(warClan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.to.end.the.war"), requestingClan.getName(), Helper.stripColors(warClan.getColorTag()));
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(warClan.getLeaders());
|
||||
acceptors.remove(requester);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.END_WAR, acceptors, requester, warClan.getTag(), requestingClan, msg);
|
||||
requests.put(warClan.getTag(), req);
|
||||
requests.put(req.getTarget(), req);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -148,13 +168,16 @@ public final class RequestManager {
|
||||
* @param requestingClan
|
||||
*/
|
||||
public void addAllyRequest(ClanPlayer requester, Clan allyClan, Clan requestingClan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.an.alliance"), Helper.capitalize(requestingClan.getName()), Helper.stripColors(allyClan.getColorTag()));
|
||||
if (requests.containsKey(allyClan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.an.alliance"), requestingClan.getName(), Helper.stripColors(allyClan.getColorTag()));
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(allyClan.getLeaders());
|
||||
acceptors.remove(requester);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.CREATE_ALLY, acceptors, requester, allyClan.getTag(), requestingClan, msg);
|
||||
requests.put(allyClan.getTag(), req);
|
||||
requests.put(req.getTarget(), req);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -166,13 +189,16 @@ public final class RequestManager {
|
||||
* @param requestingClan
|
||||
*/
|
||||
public void addRivalryBreakRequest(ClanPlayer requester, Clan rivalClan, Clan requestingClan) {
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.to.end.the.rivalry"), Helper.capitalize(requestingClan.getName()), Helper.stripColors(rivalClan.getColorTag()));
|
||||
if (requests.containsKey(rivalClan.getTag())) {
|
||||
return;
|
||||
}
|
||||
String msg = MessageFormat.format(plugin.getLang("proposing.to.end.the.rivalry"), requestingClan.getName(), Helper.stripColors(rivalClan.getColorTag()));
|
||||
|
||||
List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(rivalClan.getLeaders());
|
||||
acceptors.remove(requester);
|
||||
|
||||
Request req = new Request(plugin, ClanRequest.BREAK_RIVALRY, acceptors, requester, rivalClan.getTag(), requestingClan, msg);
|
||||
requests.put(rivalClan.getTag(), req);
|
||||
requests.put(req.getTarget(), req);
|
||||
ask(req);
|
||||
}
|
||||
|
||||
@@ -232,160 +258,171 @@ public final class RequestManager {
|
||||
return;
|
||||
}
|
||||
|
||||
clan.addBb(ChatColor.AQUA + MessageFormat.format(plugin.getLang("joined.the.clan"), Helper.capitalize(invited)));
|
||||
plugin.getClanManager().serverAnnounce(MessageFormat.format(plugin.getLang("has.joined"), Helper.capitalize(invited), clan.getName()));
|
||||
clan.addBb(ChatColor.AQUA + MessageFormat.format(plugin.getLang("joined.the.clan"), invited));
|
||||
plugin.getClanManager().serverAnnounce(MessageFormat.format(plugin.getLang("has.joined"), invited, clan.getName()));
|
||||
clan.addPlayerToClan(cp);
|
||||
} else {
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("membership.invitation"), Helper.capitalize(invited)));
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("membership.invitation"), invited));
|
||||
}
|
||||
|
||||
requests.remove(req.getTarget().toLowerCase());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check to see if votes are complete and process the result
|
||||
*
|
||||
* @param req
|
||||
*/
|
||||
public void processResults(Request req) {
|
||||
if (req.getType().equals(ClanRequest.START_WAR)) {
|
||||
Clan clan = req.getClan();
|
||||
Clan war = plugin.getClanManager().getClan(req.getTarget());
|
||||
ClanPlayer cp = req.getRequester();
|
||||
|
||||
if (war != null && clan != null) {
|
||||
List<String> accepts = req.getAccepts();
|
||||
List<String> denies = req.getDenies();
|
||||
|
||||
if (!accepts.isEmpty()) {
|
||||
clan.addWarringClan(war);
|
||||
war.addWarringClan(clan);
|
||||
|
||||
war.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.at.war"), Helper.capitalize(war.getName()), clan.getColorTag()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.at.war"), Helper.capitalize(clan.getName()), war.getColorTag()));
|
||||
} else {
|
||||
war.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.war.req"), Helper.capitalize(denies.get(0)), clan.getName()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("end.war.denied"), Helper.capitalize(war.getName())));
|
||||
}
|
||||
}
|
||||
} else if (req.getType().equals(ClanRequest.END_WAR)) {
|
||||
Clan clan = req.getClan();
|
||||
Clan war = plugin.getClanManager().getClan(req.getTarget());
|
||||
ClanPlayer cp = req.getRequester();
|
||||
|
||||
if (war != null && clan != null) {
|
||||
List<String> accepts = req.getAccepts();
|
||||
List<String> denies = req.getDenies();
|
||||
|
||||
if (!accepts.isEmpty()) {
|
||||
clan.removeWarringClan(war);
|
||||
war.removeWarringClan(clan);
|
||||
|
||||
war.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.no.longer.at.war"), Helper.capitalize(accepts.get(0)), clan.getColorTag()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.no.longer.at.war"), Helper.capitalize(clan.getName()), Helper.capitalize(war.getColorTag())));
|
||||
} else {
|
||||
war.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.war.end"), Helper.capitalize(denies.get(0)), clan.getName()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("end.war.denied"), Helper.capitalize(war.getName())));
|
||||
}
|
||||
}
|
||||
} else if (req.getType().equals(ClanRequest.CREATE_ALLY)) {
|
||||
Clan clan = req.getClan();
|
||||
Clan ally = plugin.getClanManager().getClan(req.getTarget());
|
||||
ClanPlayer cp = req.getRequester();
|
||||
|
||||
if (ally != null && clan != null) {
|
||||
List<String> accepts = req.getAccepts();
|
||||
List<String> denies = req.getDenies();
|
||||
|
||||
if (!accepts.isEmpty()) {
|
||||
clan.addAlly(ally);
|
||||
|
||||
ally.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("accepted.an.alliance"), Helper.capitalize(accepts.get(0)), clan.getName()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("created.an.alliance"), Helper.capitalize(cp.getName()), Helper.capitalize(ally.getName())));
|
||||
} else {
|
||||
ally.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.an.alliance"), Helper.capitalize(denies.get(0)), clan.getName()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("the.alliance.was.denied"), Helper.capitalize(ally.getName())));
|
||||
}
|
||||
}
|
||||
} else if (req.getType().equals(ClanRequest.BREAK_RIVALRY)) {
|
||||
Clan clan = req.getClan();
|
||||
Clan rival = plugin.getClanManager().getClan(req.getTarget());
|
||||
ClanPlayer cp = req.getRequester();
|
||||
|
||||
if (rival != null && clan != null) {
|
||||
List<String> accepts = req.getAccepts();
|
||||
List<String> denies = req.getDenies();
|
||||
|
||||
if (!accepts.isEmpty()) {
|
||||
clan.removeRival(rival);
|
||||
rival.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("broken.the.rivalry"), Helper.capitalize(accepts.get(0)), clan.getName()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("broken.the.rivalry.with"), Helper.capitalize(cp.getName()), Helper.capitalize(rival.getName())));
|
||||
} else {
|
||||
rival.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.to.make.peace"), Helper.capitalize(denies.get(0)), clan.getName()));
|
||||
clan.addBb(cp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("peace.agreement.denied"), Helper.capitalize(rival.getName())));
|
||||
}
|
||||
}
|
||||
} else if (req.votingFinished()) {
|
||||
List<String> denies = req.getDenies();
|
||||
|
||||
if (req.getType().equals(ClanRequest.DEMOTE)) {
|
||||
Clan clan = req.getClan();
|
||||
String demoted = req.getTarget();
|
||||
UUID demotedUniqueId = UUIDMigration.getForcedPlayerUUID(demoted);
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID() && demotedUniqueId != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (denies.isEmpty()) {
|
||||
clan.addBb(plugin.getLang("leaders"), ChatColor.AQUA + MessageFormat.format(plugin.getLang("demoted.back.to.member"), Helper.capitalize(demoted)));
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
clan.demote(demotedUniqueId);
|
||||
} else {
|
||||
clan.demote(demoted);
|
||||
}
|
||||
} else {
|
||||
String deniers = Helper.capitalize(Helper.toMessage(Helper.toArray(denies), ", "));
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("denied.demotion"), deniers, demoted));
|
||||
}
|
||||
} else if (req.getType().equals(ClanRequest.PROMOTE)) {
|
||||
Clan clan = req.getClan();
|
||||
String promoted = req.getTarget();
|
||||
UUID promotedUniqueId = UUIDMigration.getForcedPlayerUUID(promoted);
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID() && promotedUniqueId == null) {
|
||||
return;
|
||||
}
|
||||
if (denies.isEmpty()) {
|
||||
clan.addBb(plugin.getLang("leaders"), ChatColor.AQUA + MessageFormat.format(plugin.getLang("promoted.to.leader"), Helper.capitalize(promoted)));
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
clan.promote(promotedUniqueId);
|
||||
} else {
|
||||
clan.promote(promoted);
|
||||
}
|
||||
} else {
|
||||
String deniers = Helper.capitalize(Helper.toMessage(Helper.toArray(denies), ", "));
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("denied.the.promotion"), deniers, promoted));
|
||||
}
|
||||
} else if (req.getType().equals(ClanRequest.DISBAND)) {
|
||||
Clan clan = req.getClan();
|
||||
|
||||
if (denies.isEmpty()) {
|
||||
clan.addBb(plugin.getLang("leaders"), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.disbanded"), clan.getName()));
|
||||
clan.disband();
|
||||
} else {
|
||||
String deniers = Helper.capitalize(Helper.toMessage(Helper.toArray(denies), ", "));
|
||||
clan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("clan.deletion"), deniers));
|
||||
}
|
||||
}
|
||||
|
||||
req.cleanVotes();
|
||||
}
|
||||
|
||||
requests.remove(req.getTarget());
|
||||
Clan requesterClan = req.getClan();
|
||||
ClanPlayer requesterCp = req.getRequester();
|
||||
|
||||
String target = req.getTarget();
|
||||
//may be null
|
||||
Clan targetClan = plugin.getClanManager().getClan(target);
|
||||
//may be null
|
||||
UUID targetPlayer = UUIDMigration.getForcedPlayerUUID(target);
|
||||
|
||||
List<String> accepts = req.getAccepts();
|
||||
List<String> denies = req.getDenies();
|
||||
|
||||
switch (req.getType()) {
|
||||
case START_WAR:
|
||||
processStartWar(requesterClan, requesterCp, targetClan, accepts, denies);
|
||||
break;
|
||||
case END_WAR:
|
||||
processEndWar(requesterClan, requesterCp, targetClan, accepts, denies);
|
||||
break;
|
||||
case CREATE_ALLY:
|
||||
processCreateAlly(requesterClan, requesterCp, targetClan, accepts, denies);
|
||||
break;
|
||||
case BREAK_RIVALRY:
|
||||
processBreakRivalry(requesterClan, requesterCp, targetClan, accepts, denies);
|
||||
break;
|
||||
case DEMOTE: case PROMOTE:
|
||||
if (!req.votingFinished() || targetPlayer == null) {
|
||||
return;
|
||||
}
|
||||
target = requesterClan.getTag();
|
||||
|
||||
if (req.getType() == ClanRequest.DEMOTE) {
|
||||
processDemote(req, requesterClan, targetPlayer, denies);
|
||||
}
|
||||
if (req.getType() == ClanRequest.PROMOTE) {
|
||||
processPromote(req, requesterClan, targetPlayer, denies);
|
||||
}
|
||||
break;
|
||||
case DISBAND:
|
||||
if (!req.votingFinished()) {
|
||||
return;
|
||||
}
|
||||
processDisband(requesterClan, denies);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
requests.remove(target);
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new RequestFinishedEvent(req));
|
||||
req.cleanVotes();
|
||||
}
|
||||
|
||||
private void processDisband(Clan requesterClan, List<String> denies) {
|
||||
if (denies.isEmpty()) {
|
||||
requesterClan.addBb(plugin.getLang("leaders"), ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.disbanded"), requesterClan.getName()));
|
||||
requesterClan.disband();
|
||||
} else {
|
||||
String deniers = Helper.toMessage(Helper.toArray(denies), ", ");
|
||||
requesterClan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("clan.deletion"), deniers));
|
||||
}
|
||||
}
|
||||
|
||||
private void processPromote(Request req, Clan requesterClan, UUID targetPlayer, List<String> denies) {
|
||||
String promotedName = req.getTarget();
|
||||
if (denies.isEmpty()) {
|
||||
requesterClan.addBb(plugin.getLang("leaders"), ChatColor.AQUA + MessageFormat.format(plugin.getLang("promoted.to.leader"), promotedName));
|
||||
requesterClan.promote(targetPlayer);
|
||||
} else {
|
||||
String deniers = Helper.toMessage(Helper.toArray(denies), ", ");
|
||||
requesterClan.leaderAnnounce(ChatColor.RED + MessageFormat.format(plugin.getLang("denied.the.promotion"), deniers, promotedName));
|
||||
}
|
||||
}
|
||||
|
||||
private void processDemote(Request req, Clan requesterClan, UUID targetPlayer, List<String> denies) {
|
||||
String demotedName = req.getTarget();
|
||||
|
||||
if (denies.isEmpty()) {
|
||||
requesterClan.addBb(plugin.getLang("leaders"), ChatColor.AQUA
|
||||
+ MessageFormat.format(plugin.getLang("demoted.back.to.member"), demotedName));
|
||||
requesterClan.demote(targetPlayer);
|
||||
} else {
|
||||
String deniers = Helper.toMessage(Helper.toArray(denies), ", ");
|
||||
requesterClan.leaderAnnounce(
|
||||
ChatColor.RED + MessageFormat.format(plugin.getLang("denied.demotion"), deniers, demotedName));
|
||||
}
|
||||
}
|
||||
|
||||
private void processBreakRivalry(Clan requesterClan, ClanPlayer requesterCp, Clan targetClan, List<String> accepts,
|
||||
List<String> denies) {
|
||||
if (targetClan != null && requesterClan != null) {
|
||||
if (!accepts.isEmpty()) {
|
||||
requesterClan.removeRival(targetClan);
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("broken.the.rivalry"), accepts.get(0), requesterClan.getName()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("broken.the.rivalry.with"), requesterCp.getName(), targetClan.getName()));
|
||||
} else {
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.to.make.peace"), denies.get(0), requesterClan.getName()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("peace.agreement.denied"), targetClan.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processCreateAlly(Clan requesterClan, ClanPlayer requesterCp, Clan targetClan, List<String> accepts,
|
||||
List<String> denies) {
|
||||
if (targetClan != null && requesterClan != null) {
|
||||
if (!accepts.isEmpty()) {
|
||||
requesterClan.addAlly(targetClan);
|
||||
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("accepted.an.alliance"), accepts.get(0), requesterClan.getName()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("created.an.alliance"), requesterCp.getName(), targetClan.getName()));
|
||||
} else {
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.an.alliance"), denies.get(0), requesterClan.getName()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("the.alliance.was.denied"), targetClan.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processEndWar(Clan requesterClan, ClanPlayer requesterCp, Clan targetClan, List<String> accepts,
|
||||
List<String> denies) {
|
||||
if (requesterClan != null && targetClan != null) {
|
||||
if (!accepts.isEmpty()) {
|
||||
requesterClan.removeWarringClan(targetClan);
|
||||
targetClan.removeWarringClan(requesterClan);
|
||||
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.no.longer.at.war"), accepts.get(0), requesterClan.getColorTag()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.no.longer.at.war"), requesterClan.getName(), targetClan.getColorTag()));
|
||||
} else {
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.war.end"), denies.get(0), requesterClan.getName()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("end.war.denied"), targetClan.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processStartWar(Clan requesterClan, ClanPlayer requesterCp, Clan targetClan, List<String> accepts,
|
||||
List<String> denies) {
|
||||
if (requesterClan != null && targetClan != null) {
|
||||
if (!accepts.isEmpty()) {
|
||||
requesterClan.addWarringClan(targetClan);
|
||||
targetClan.addWarringClan(requesterClan);
|
||||
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.at.war"), targetClan.getName(), requesterClan.getColorTag()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("you.are.at.war"), requesterClan.getName(), targetClan.getColorTag()));
|
||||
} else {
|
||||
targetClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("denied.war.req"), denies.get(0), requesterClan.getName()));
|
||||
requesterClan.addBb(requesterCp.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("end.war.denied"), targetClan.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* End a pending request prematurely
|
||||
*
|
||||
@@ -396,7 +433,7 @@ public final class RequestManager {
|
||||
for (Request req : new LinkedList<Request>(requests.values())) {
|
||||
for (ClanPlayer cp : req.getAcceptors()) {
|
||||
if (cp.getName().equalsIgnoreCase(playerName)) {
|
||||
req.getClan().leaderAnnounce(MessageFormat.format(plugin.getLang("signed.off.request.cancelled"), ChatColor.RED + Helper.capitalize(playerName), req.getType()));
|
||||
req.getClan().leaderAnnounce(MessageFormat.format(plugin.getLang("signed.off.request.cancelled"), ChatColor.RED + playerName, req.getType()));
|
||||
requests.remove(req.getClan().getTag());
|
||||
break;
|
||||
}
|
||||
@@ -410,9 +447,10 @@ public final class RequestManager {
|
||||
* Starts the task that asks for the votes of all requests
|
||||
*/
|
||||
public void askerTask() {
|
||||
plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new BukkitRunnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for (Iterator<Map.Entry<String, Request>> iter = requests.entrySet().iterator(); iter.hasNext(); ) {
|
||||
Request req = iter.next().getValue();
|
||||
|
||||
@@ -425,10 +463,9 @@ public final class RequestManager {
|
||||
}
|
||||
|
||||
ask(req);
|
||||
req.incrementAskCount();
|
||||
}
|
||||
}
|
||||
}, 0, plugin.getSettingsManager().getRequestFreqencySecs() * 20L);
|
||||
req.incrementAskCount();
|
||||
}
|
||||
}}.runTaskTimerAsynchronously(plugin, 0, plugin.getSettingsManager().getRequestFreqencySecs() * 20L);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,7 +473,7 @@ public final class RequestManager {
|
||||
*
|
||||
* @param req
|
||||
*/
|
||||
public void ask(Request req) {
|
||||
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();
|
||||
final String options = MessageFormat.format(plugin.getLang("accept.or.deny"), ChatBlock.makeEmpty(Helper.stripColors(tag)) + " " + ChatColor.DARK_GREEN + "/" + plugin.getSettingsManager().getCommandAccept() + plugin.getSettingsManager().getPageHeadingsColor(), ChatColor.DARK_RED + "/" + plugin.getSettingsManager().getCommandDeny());
|
||||
@@ -465,6 +502,11 @@ public final class RequestManager {
|
||||
}
|
||||
}
|
||||
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new RequestEvent(req));
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SimpleClans.getInstance().getServer().getPluginManager().callEvent(new RequestEvent(req));
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
}
|
||||
+1669
-1363
File diff suppressed because it is too large.
Load diff
+351
-119
@@ -12,9 +12,11 @@ import net.sacredlabyrinth.phaed.simpleclans.uuid.UUIDMigration;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
@@ -27,6 +29,8 @@ public final class StorageManager {
|
||||
private SimpleClans plugin;
|
||||
private DBCore core;
|
||||
private HashMap<String, ChatBlock> chatBlocks = new HashMap<>();
|
||||
private Set<Clan> modifiedClans = new HashSet<>();
|
||||
private Set<ClanPlayer> modifiedClanPlayers = new HashSet<>();
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -45,11 +49,7 @@ public final class StorageManager {
|
||||
* @return
|
||||
*/
|
||||
public ChatBlock getChatBlock(Player player) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
return chatBlocks.get(player.getUniqueId().toString());
|
||||
} else {
|
||||
return chatBlocks.get(player.getName());
|
||||
}
|
||||
return chatBlocks.get(player.getUniqueId().toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,17 +59,13 @@ public final class StorageManager {
|
||||
* @param cb
|
||||
*/
|
||||
public void addChatBlock(CommandSender player, ChatBlock cb) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(player.getName());
|
||||
UUID uuid = UUIDMigration.getForcedPlayerUUID(player.getName());
|
||||
|
||||
if (uuid == null) {
|
||||
return;
|
||||
}
|
||||
if (uuid == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
chatBlocks.put(uuid.toString(), cb);
|
||||
} else {
|
||||
chatBlocks.put(player.getName(), cb);
|
||||
}
|
||||
chatBlocks.put(uuid.toString(), cb);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,26 +76,70 @@ public final class StorageManager {
|
||||
core = new MySQLCore(plugin.getSettingsManager().getHost(), plugin.getSettingsManager().getDatabase(), plugin.getSettingsManager().getPort(), plugin.getSettingsManager().getUsername(), plugin.getSettingsManager().getPassword());
|
||||
|
||||
if (core.checkConnection()) {
|
||||
SimpleClans.log("[SimpleClans] " + plugin.getLang("mysql.connection.successful"));
|
||||
plugin.getLogger().info(plugin.getLang("mysql.connection.successful"));
|
||||
|
||||
if (!core.existsTable("sc_clans")) {
|
||||
SimpleClans.log("Creating table: sc_clans");
|
||||
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, `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), PRIMARY KEY (`id`), UNIQUE KEY `uq_simpleclans_1` (`tag`));";
|
||||
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,"
|
||||
+ " `balance` double(64,2),"
|
||||
+ " `fee_enabled` tinyint(1) default '0',"
|
||||
+ " `fee_value` double(64,2),"
|
||||
+ " `ranks` text NOT NULL,"
|
||||
+ " PRIMARY KEY (`id`),"
|
||||
+ " UNIQUE KEY `uq_simpleclans_1` (`tag`));";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
if (!core.existsTable("sc_players")) {
|
||||
SimpleClans.log("Creating table: sc_players");
|
||||
plugin.getLogger().info("Creating table: sc_players");
|
||||
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_players` ( `id` bigint(20) NOT NULL auto_increment, `name` varchar(16) NOT NULL, `leader` tinyint(1) default '0', `tag` varchar(25) NOT NULL, `friendly_fire` tinyint(1) default '0', `neutral_kills` int(11) default NULL, `rival_kills` int(11) default NULL, `civilian_kills` int(11) default NULL, `deaths` int(11) default NULL, `last_seen` bigint NOT NULL, `join_date` bigint NOT NULL, `trusted` tinyint(1) default '0', `flags` text NOT NULL, `packed_past_clans` text, PRIMARY KEY (`id`), UNIQUE KEY `uq_sc_players_1` (`name`));";
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_players` ("
|
||||
+ " `id` bigint(20) NOT NULL auto_increment,"
|
||||
+ " `name` varchar(16) NOT NULL,"
|
||||
+ " `leader` tinyint(1) default '0',"
|
||||
+ " `tag` varchar(25) NOT NULL,"
|
||||
+ " `friendly_fire` tinyint(1) default '0',"
|
||||
+ " `neutral_kills` int(11) default NULL,"
|
||||
+ " `rival_kills` int(11) default NULL,"
|
||||
+ " `civilian_kills` int(11) default NULL,"
|
||||
+ " `deaths` int(11) default NULL,"
|
||||
+ " `last_seen` bigint NOT NULL,"
|
||||
+ " `join_date` bigint NOT NULL,"
|
||||
+ " `trusted` tinyint(1) default '0',"
|
||||
+ " `flags` text NOT NULL,"
|
||||
+ " `packed_past_clans` text,"
|
||||
+ " `resign_times` text,"
|
||||
+ " PRIMARY KEY (`id`),"
|
||||
+ " UNIQUE KEY `uq_sc_players_1` (`name`));";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
if (!core.existsTable("sc_kills")) {
|
||||
SimpleClans.log("Creating table: sc_kills");
|
||||
plugin.getLogger().info("Creating table: sc_kills");
|
||||
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_kills` ( `kill_id` bigint(20) NOT NULL auto_increment, `attacker` varchar(16) NOT NULL, `attacker_tag` varchar(16) NOT NULL, `victim` varchar(16) NOT NULL, `victim_tag` varchar(16) NOT NULL, `kill_type` varchar(1) NOT NULL, PRIMARY KEY (`kill_id`));";
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_kills` ("
|
||||
+ " `kill_id` bigint(20) NOT NULL auto_increment,"
|
||||
+ " `attacker` varchar(16) NOT NULL,"
|
||||
+ " `attacker_tag` varchar(16) NOT NULL,"
|
||||
+ " `victim` varchar(16) NOT NULL,"
|
||||
+ " `victim_tag` varchar(16) NOT NULL,"
|
||||
+ " `kill_type` varchar(1) NOT NULL,"
|
||||
+ " PRIMARY KEY (`kill_id`));";
|
||||
core.execute(query);
|
||||
}
|
||||
} else {
|
||||
@@ -109,26 +149,71 @@ public final class StorageManager {
|
||||
core = new SQLiteCore(plugin.getDataFolder().getPath());
|
||||
|
||||
if (core.checkConnection()) {
|
||||
SimpleClans.log("[SimpleClans] " + plugin.getLang("sqlite.connection.successful"));
|
||||
|
||||
plugin.getLogger().info(plugin.getLang("sqlite.connection.successful"));
|
||||
|
||||
if (!core.existsTable("sc_clans")) {
|
||||
SimpleClans.log("Creating table: sc_clans");
|
||||
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, `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, PRIMARY KEY (`id`), UNIQUE (`tag`));";
|
||||
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,"
|
||||
+ " `balance` double(64,2) default 0.0,"
|
||||
+ " `fee_enabled` tinyint(1) default '0',"
|
||||
+ " `fee_value` double(64,2),"
|
||||
+ " `ranks` text NOT NULL,"
|
||||
+ " PRIMARY KEY (`id`),"
|
||||
+ " UNIQUE (`tag`));";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
if (!core.existsTable("sc_players")) {
|
||||
SimpleClans.log("Creating table: sc_players");
|
||||
plugin.getLogger().info("Creating table: sc_players");
|
||||
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_players` ( `id` bigint(20), `name` varchar(16) NOT NULL, `leader` tinyint(1) default '0', `tag` varchar(25) NOT NULL, `friendly_fire` tinyint(1) default '0', `neutral_kills` int(11) default NULL, `rival_kills` int(11) default NULL, `civilian_kills` int(11) default NULL, `deaths` int(11) default NULL, `last_seen` bigint NOT NULL, `join_date` bigint NOT NULL, `trusted` tinyint(1) default '0', `flags` text NOT NULL, `packed_past_clans` text, PRIMARY KEY (`id`), UNIQUE (`name`));";
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_players` ("
|
||||
+ " `id` bigint(20),"
|
||||
+ " `name` varchar(16) NOT NULL,"
|
||||
+ " `leader` tinyint(1) default '0',"
|
||||
+ " `tag` varchar(25) NOT NULL,"
|
||||
+ " `friendly_fire` tinyint(1) default '0',"
|
||||
+ " `neutral_kills` int(11) default NULL,"
|
||||
+ " `rival_kills` int(11) default NULL,"
|
||||
+ " `civilian_kills` int(11) default NULL,"
|
||||
+ " `deaths` int(11) default NULL,"
|
||||
+ " `last_seen` bigint NOT NULL,"
|
||||
+ " `join_date` bigint NOT NULL,"
|
||||
+ " `trusted` tinyint(1) default '0',"
|
||||
+ " `flags` text NOT NULL,"
|
||||
+ " `packed_past_clans` text,"
|
||||
+ " `resign_times` text,"
|
||||
+ " PRIMARY KEY (`id`),"
|
||||
+ " UNIQUE (`name`));";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
if (!core.existsTable("sc_kills")) {
|
||||
SimpleClans.log("Creating table: sc_kills");
|
||||
plugin.getLogger().info("Creating table: sc_kills");
|
||||
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_kills` ( `kill_id` bigint(20), `attacker` varchar(16) NOT NULL, `attacker_tag` varchar(16) NOT NULL, `victim` varchar(16) NOT NULL, `victim_tag` varchar(16) NOT NULL, `kill_type` varchar(1) NOT NULL, PRIMARY KEY (`kill_id`));";
|
||||
String query = "CREATE TABLE IF NOT EXISTS `sc_kills` ("
|
||||
+ " `kill_id` bigint(20),"
|
||||
+ " `attacker` varchar(16) NOT NULL,"
|
||||
+ " `attacker_tag` varchar(16) NOT NULL,"
|
||||
+ " `victim` varchar(16) NOT NULL,"
|
||||
+ " `victim_tag` varchar(16) NOT NULL,"
|
||||
+ " `kill_type` varchar(1) NOT NULL,"
|
||||
+ " PRIMARY KEY (`kill_id`));";
|
||||
core.execute(query);
|
||||
}
|
||||
} else {
|
||||
@@ -162,7 +247,7 @@ public final class StorageManager {
|
||||
}
|
||||
|
||||
if (!clans.isEmpty()) {
|
||||
SimpleClans.log(MessageFormat.format("[SimpleClans] " + plugin.getLang("clans"), clans.size()));
|
||||
plugin.getLogger().info(MessageFormat.format(plugin.getLang("clans"), clans.size()));
|
||||
}
|
||||
|
||||
List<ClanPlayer> cps = retrieveClanPlayers();
|
||||
@@ -178,7 +263,7 @@ public final class StorageManager {
|
||||
}
|
||||
|
||||
if (!cps.isEmpty()) {
|
||||
SimpleClans.log(MessageFormat.format("[SimpleClans] " + plugin.getLang("clan.players"), cps.size()));
|
||||
plugin.getLogger().info(MessageFormat.format(plugin.getLang("clan.players"), cps.size()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,8 +285,8 @@ public final class StorageManager {
|
||||
tm.importMember(cp);
|
||||
}
|
||||
plugin.getClanManager().importClanPlayer(cp);
|
||||
|
||||
SimpleClans.log("[SimpleClans] ClanPlayer Reloaded: " + player.getName() + ", UUID: " + player.getUniqueId().toString());
|
||||
|
||||
plugin.getLogger().info("ClanPlayer Reloaded: " + player.getName() + ", UUID: " + player.getUniqueId().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +306,7 @@ public final class StorageManager {
|
||||
}
|
||||
|
||||
for (Clan clan : purge) {
|
||||
SimpleClans.log("[SimpleClans] " + MessageFormat.format(plugin.getLang("purging.clan"), clan.getName()));
|
||||
plugin.getLogger().info(MessageFormat.format(plugin.getLang("purging.clan"), clan.getName()));
|
||||
deleteClan(clan);
|
||||
clans.remove(clan);
|
||||
}
|
||||
@@ -237,7 +322,7 @@ public final class StorageManager {
|
||||
}
|
||||
|
||||
for (ClanPlayer cp : purge) {
|
||||
SimpleClans.log("[SimpleClans] " + MessageFormat.format(plugin.getLang("purging.player.data"), cp.getName()));
|
||||
plugin.getLogger().info(MessageFormat.format(plugin.getLang("purging.player.data"), cp.getName()));
|
||||
deleteClanPlayer(cp);
|
||||
cps.remove(cp);
|
||||
}
|
||||
@@ -263,14 +348,18 @@ public final class StorageManager {
|
||||
String tag = res.getString("tag");
|
||||
String color_tag = Helper.parseColors(res.getString("color_tag"));
|
||||
String name = res.getString("name");
|
||||
String description = res.getString("description");
|
||||
String packed_allies = res.getString("packed_allies");
|
||||
String packed_rivals = res.getString("packed_rivals");
|
||||
String packed_bb = res.getString("packed_bb");
|
||||
String cape_url = res.getString("cape_url");
|
||||
String flags = res.getString("flags");
|
||||
String ranks = res.getString("ranks");
|
||||
long founded = res.getLong("founded");
|
||||
long last_used = res.getLong("last_used");
|
||||
double balance = res.getDouble("balance");
|
||||
double feeValue = res.getDouble("fee_value");
|
||||
boolean feeEnabled = res.getBoolean("fee_enabled");
|
||||
|
||||
if (founded == 0) {
|
||||
founded = (new Date()).getTime();
|
||||
@@ -287,6 +376,7 @@ public final class StorageManager {
|
||||
clan.setTag(tag);
|
||||
clan.setColorTag(color_tag);
|
||||
clan.setName(name);
|
||||
clan.setDescription(description);
|
||||
clan.setPackedAllies(packed_allies);
|
||||
clan.setPackedRivals(packed_rivals);
|
||||
clan.setPackedBb(packed_bb);
|
||||
@@ -294,6 +384,9 @@ public final class StorageManager {
|
||||
clan.setFounded(founded);
|
||||
clan.setLastUsed(last_used);
|
||||
clan.setBalance(balance);
|
||||
clan.setMemberFee(feeValue);
|
||||
clan.setMemberFeeEnabled(feeEnabled);
|
||||
clan.setRanks(Helper.ranksFromJson(ranks));
|
||||
|
||||
out.add(clan);
|
||||
} catch (Exception ex) {
|
||||
@@ -303,8 +396,8 @@ public final class StorageManager {
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
SimpleClans.getLog().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
SimpleClans.getLog().log(Level.SEVERE, null, ex);
|
||||
plugin.getLogger().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,14 +426,18 @@ public final class StorageManager {
|
||||
String tag = res.getString("tag");
|
||||
String color_tag = Helper.parseColors(res.getString("color_tag"));
|
||||
String name = res.getString("name");
|
||||
String description = res.getString("description");
|
||||
String packed_allies = res.getString("packed_allies");
|
||||
String packed_rivals = res.getString("packed_rivals");
|
||||
String packed_bb = res.getString("packed_bb");
|
||||
String cape_url = res.getString("cape_url");
|
||||
String flags = res.getString("flags");
|
||||
String ranks = res.getString("ranks");
|
||||
long founded = res.getLong("founded");
|
||||
long last_used = res.getLong("last_used");
|
||||
double balance = res.getDouble("balance");
|
||||
double feeValue = res.getDouble("fee_value");
|
||||
boolean feeEnabled = res.getBoolean("fee_enabled");
|
||||
|
||||
if (founded == 0) {
|
||||
founded = (new Date()).getTime();
|
||||
@@ -357,6 +454,7 @@ public final class StorageManager {
|
||||
clan.setTag(tag);
|
||||
clan.setColorTag(color_tag);
|
||||
clan.setName(name);
|
||||
clan.setDescription(description);
|
||||
clan.setPackedAllies(packed_allies);
|
||||
clan.setPackedRivals(packed_rivals);
|
||||
clan.setPackedBb(packed_bb);
|
||||
@@ -364,6 +462,9 @@ public final class StorageManager {
|
||||
clan.setFounded(founded);
|
||||
clan.setLastUsed(last_used);
|
||||
clan.setBalance(balance);
|
||||
clan.setMemberFee(feeValue);
|
||||
clan.setMemberFeeEnabled(feeEnabled);
|
||||
clan.setRanks(Helper.ranksFromJson(ranks));
|
||||
|
||||
out = clan;
|
||||
} catch (Exception ex) {
|
||||
@@ -373,8 +474,8 @@ public final class StorageManager {
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
SimpleClans.getLog().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
SimpleClans.getLog().log(Level.SEVERE, null, ex);
|
||||
plugin.getLogger().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,7 +511,8 @@ public final class StorageManager {
|
||||
long join_date = res.getLong("join_date");
|
||||
String flags = res.getString("flags");
|
||||
String packed_past_clans = Helper.parseColors(res.getString("packed_past_clans"));
|
||||
|
||||
String resign_times = res.getString("resign_times");
|
||||
|
||||
if (last_seen == 0) {
|
||||
last_seen = (new Date()).getTime();
|
||||
}
|
||||
@@ -435,6 +537,7 @@ public final class StorageManager {
|
||||
cp.setJoinDate(join_date);
|
||||
cp.setPackedPastClans(packed_past_clans);
|
||||
cp.setTrusted(leader || trusted);
|
||||
cp.setResignTimes(Helper.resignTimesFromJson(resign_times));
|
||||
|
||||
if (!tag.isEmpty()) {
|
||||
Clan clan = SimpleClans.getInstance().getClanManager().getClan(tag);
|
||||
@@ -452,8 +555,8 @@ public final class StorageManager {
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
SimpleClans.getLog().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
SimpleClans.getLog().log(Level.SEVERE, null, ex);
|
||||
plugin.getLogger().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,7 +594,8 @@ public final class StorageManager {
|
||||
long join_date = res.getLong("join_date");
|
||||
String flags = res.getString("flags");
|
||||
String packed_past_clans = Helper.parseColors(res.getString("packed_past_clans"));
|
||||
|
||||
String resign_times = res.getString("resign_times");
|
||||
|
||||
if (last_seen == 0) {
|
||||
last_seen = (new Date()).getTime();
|
||||
}
|
||||
@@ -516,7 +620,8 @@ public final class StorageManager {
|
||||
cp.setJoinDate(join_date);
|
||||
cp.setPackedPastClans(packed_past_clans);
|
||||
cp.setTrusted(leader || trusted);
|
||||
|
||||
cp.setResignTimes(Helper.resignTimesFromJson(resign_times));
|
||||
|
||||
if (!tag.isEmpty()) {
|
||||
Clan clanDB = retrieveOneClan(tag);
|
||||
Clan clan = SimpleClans.getInstance().getClanManager().getClan(tag);
|
||||
@@ -553,8 +658,8 @@ public final class StorageManager {
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
SimpleClans.getLog().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
SimpleClans.getLog().log(Level.SEVERE, null, ex);
|
||||
plugin.getLogger().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,8 +672,25 @@ public final class StorageManager {
|
||||
* @param clan
|
||||
*/
|
||||
public void insertClan(Clan clan) {
|
||||
String query = "INSERT INTO `sc_clans` ( `verified`, `tag`, `color_tag`, `name`, `friendly_fire`, `founded`, `last_used`, `packed_allies`, `packed_rivals`, `packed_bb`, `cape_url`, `flags`, `balance`) ";
|
||||
String values = "VALUES ( " + (clan.isVerified() ? 1 : 0) + ",'" + Helper.escapeQuotes(clan.getTag()) + "','" + Helper.escapeQuotes(clan.getColorTag()) + "','" + Helper.escapeQuotes(clan.getName()) + "'," + (clan.isFriendlyFire() ? 1 : 0) + ",'" + clan.getFounded() + "','" + clan.getLastUsed() + "','" + Helper.escapeQuotes(clan.getPackedAllies()) + "','" + Helper.escapeQuotes(clan.getPackedRivals()) + "','" + Helper.escapeQuotes(clan.getPackedBb()) + "','" + Helper.escapeQuotes(clan.getCapeUrl()) + "','" + Helper.escapeQuotes(clan.getFlags()) + "','" + Helper.escapeQuotes(String.valueOf(clan.getBalance())) + "');";
|
||||
String query = "INSERT INTO `sc_clans` (`ranks`, `description`, `fee_enabled`, `fee_value`, `verified`, `tag`, `color_tag`, `name`, `friendly_fire`, `founded`, `last_used`, `packed_allies`, `packed_rivals`, `packed_bb`, `cape_url`, `flags`, `balance`) ";
|
||||
String values = "VALUES ( '"
|
||||
+ Helper.escapeQuotes(Helper.ranksToJson(clan.getRanks())) + "','"
|
||||
+ Helper.escapeQuotes(clan.getDescription())+ "',"
|
||||
+ (clan.isMemberFeeEnabled() ? 1 : 0) +","
|
||||
+ Helper.escapeQuotes(String.valueOf(clan.getMemberFee())) + ","
|
||||
+ (clan.isVerified() ? 1 : 0) + ",'"
|
||||
+ Helper.escapeQuotes(clan.getTag()) + "','"
|
||||
+ Helper.escapeQuotes(clan.getColorTag()) + "','"
|
||||
+ Helper.escapeQuotes(clan.getName()) + "',"
|
||||
+ (clan.isFriendlyFire() ? 1 : 0) + ",'"
|
||||
+ clan.getFounded() + "','"
|
||||
+ clan.getLastUsed() + "','"
|
||||
+ Helper.escapeQuotes(clan.getPackedAllies()) + "','"
|
||||
+ Helper.escapeQuotes(clan.getPackedRivals()) + "','"
|
||||
+ Helper.escapeQuotes(clan.getPackedBb()) + "','"
|
||||
+ Helper.escapeQuotes(clan.getCapeUrl()) + "','"
|
||||
+ Helper.escapeQuotes(clan.getFlags()) + "','"
|
||||
+ Helper.escapeQuotes(String.valueOf(clan.getBalance())) + "');";
|
||||
core.insert(query + values);
|
||||
}
|
||||
|
||||
@@ -577,14 +699,14 @@ public final class StorageManager {
|
||||
*
|
||||
* @param clan
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public void updateClanAsync(final Clan clan) {
|
||||
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateClan(clan);
|
||||
}
|
||||
});
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -592,18 +714,17 @@ public final class StorageManager {
|
||||
*
|
||||
* @param p to update
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void updatePlayerNameAsync(final Player p) {
|
||||
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updatePlayerName(p);
|
||||
}
|
||||
});
|
||||
}
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the name of a player in the database asynchronously
|
||||
* Change the name of a player in the database
|
||||
*
|
||||
* @param p to update
|
||||
*/
|
||||
@@ -618,9 +739,7 @@ public final class StorageManager {
|
||||
* @param clan
|
||||
*/
|
||||
public void updateClan(Clan clan) {
|
||||
clan.updateLastUsed();
|
||||
String query = "UPDATE `sc_clans` SET verified = " + (clan.isVerified() ? 1 : 0) + ", tag = '" + Helper.escapeQuotes(clan.getTag()) + "', color_tag = '" + Helper.escapeQuotes(clan.getColorTag()) + "', name = '" + Helper.escapeQuotes(clan.getName()) + "', friendly_fire = " + (clan.isFriendlyFire() ? 1 : 0) + ", founded = '" + clan.getFounded() + "', last_used = '" + clan.getLastUsed() + "', packed_allies = '" + Helper.escapeQuotes(clan.getPackedAllies()) + "', packed_rivals = '" + Helper.escapeQuotes(clan.getPackedRivals()) + "', packed_bb = '" + Helper.escapeQuotes(clan.getPackedBb()) + "', cape_url = '" + Helper.escapeQuotes(clan.getCapeUrl()) + "', cape_url = '" + Helper.escapeQuotes(String.valueOf(clan.getCapeUrl())) + "', balance = '" + clan.getBalance() + "', flags = '" + Helper.escapeQuotes(clan.getFlags()) + "' WHERE tag = '" + Helper.escapeQuotes(clan.getTag()) + "';";
|
||||
core.update(query);
|
||||
updateClan(clan, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -633,9 +752,17 @@ public final class StorageManager {
|
||||
public void updateClan(Clan clan, boolean updateLastUsed) {
|
||||
if (updateLastUsed) {
|
||||
clan.updateLastUsed();
|
||||
}
|
||||
String query = "UPDATE `sc_clans` SET verified = " + (clan.isVerified() ? 1 : 0) + ", tag = '" + Helper.escapeQuotes(clan.getTag()) + "', color_tag = '" + Helper.escapeQuotes(clan.getColorTag()) + "', name = '" + Helper.escapeQuotes(clan.getName()) + "', friendly_fire = " + (clan.isFriendlyFire() ? 1 : 0) + ", founded = '" + clan.getFounded() + "', last_used = '" + clan.getLastUsed() + "', packed_allies = '" + Helper.escapeQuotes(clan.getPackedAllies()) + "', packed_rivals = '" + Helper.escapeQuotes(clan.getPackedRivals()) + "', packed_bb = '" + Helper.escapeQuotes(clan.getPackedBb()) + "', cape_url = '" + Helper.escapeQuotes(clan.getCapeUrl()) + "', cape_url = '" + Helper.escapeQuotes(String.valueOf(clan.getCapeUrl())) + "', balance = '" + clan.getBalance() + "', flags = '" + Helper.escapeQuotes(clan.getFlags()) + "' WHERE tag = '" + Helper.escapeQuotes(clan.getTag()) + "';";
|
||||
core.update(query);
|
||||
}
|
||||
if (plugin.getSettingsManager().isSavePeriodically()) {
|
||||
modifiedClans.add(clan);
|
||||
return;
|
||||
}
|
||||
core.update(getUpdateClanQuery(clan));
|
||||
}
|
||||
|
||||
private String getUpdateClanQuery(Clan clan) {
|
||||
String query = "UPDATE `sc_clans` SET ranks = '"+ Helper.escapeQuotes(Helper.ranksToJson(clan.getRanks())) +"', description = '" + Helper.escapeQuotes(clan.getDescription())+ "', fee_enabled = "+ (clan.isMemberFeeEnabled() ? 1 : 0) +", fee_value = '" + clan.getMemberFee() + "', verified = " + (clan.isVerified() ? 1 : 0) + ", tag = '" + Helper.escapeQuotes(clan.getTag()) + "', color_tag = '" + Helper.escapeQuotes(clan.getColorTag()) + "', name = '" + Helper.escapeQuotes(clan.getName()) + "', friendly_fire = " + (clan.isFriendlyFire() ? 1 : 0) + ", founded = '" + clan.getFounded() + "', last_used = '" + clan.getLastUsed() + "', packed_allies = '" + Helper.escapeQuotes(clan.getPackedAllies()) + "', packed_rivals = '" + Helper.escapeQuotes(clan.getPackedRivals()) + "', packed_bb = '" + Helper.escapeQuotes(clan.getPackedBb()) + "', cape_url = '" + Helper.escapeQuotes(clan.getCapeUrl()) + "', cape_url = '" + Helper.escapeQuotes(String.valueOf(clan.getCapeUrl())) + "', balance = '" + clan.getBalance() + "', flags = '" + Helper.escapeQuotes(clan.getFlags()) + "' WHERE tag = '" + Helper.escapeQuotes(clan.getTag()) + "';";
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -654,15 +781,9 @@ public final class StorageManager {
|
||||
* @param cp
|
||||
*/
|
||||
public void insertClanPlayer(ClanPlayer cp) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
String query = "INSERT INTO `sc_players` ( `uuid`, `name`, `leader`, `tag`, `friendly_fire`, `neutral_kills`, `rival_kills`, `civilian_kills`, `deaths`, `last_seen`, `join_date`, `packed_past_clans`, `flags`) ";
|
||||
String values = "VALUES ( '" + cp.getUniqueId().toString() + "', '" + cp.getName() + "'," + (cp.isLeader() ? 1 : 0) + ",'" + Helper.escapeQuotes(cp.getTag()) + "'," + (cp.isFriendlyFire() ? 1 : 0) + "," + cp.getNeutralKills() + "," + cp.getRivalKills() + "," + cp.getCivilianKills() + "," + cp.getDeaths() + ",'" + cp.getLastSeen() + "',' " + cp.getJoinDate() + "','" + Helper.escapeQuotes(cp.getPackedPastClans()) + "','" + Helper.escapeQuotes(cp.getFlags()) + "');";
|
||||
core.insert(query + values);
|
||||
} else {
|
||||
String query = "INSERT INTO `sc_players` ( `name`, `leader`, `tag`, `friendly_fire`, `neutral_kills`, `rival_kills`, `civilian_kills`, `deaths`, `last_seen`, `join_date`, `packed_past_clans`, `flags`) ";
|
||||
String values = "VALUES ( '" + cp.getName() + "'," + (cp.isLeader() ? 1 : 0) + ",'" + Helper.escapeQuotes(cp.getTag()) + "'," + (cp.isFriendlyFire() ? 1 : 0) + "," + cp.getNeutralKills() + "," + cp.getRivalKills() + "," + cp.getCivilianKills() + "," + cp.getDeaths() + ",'" + cp.getLastSeen() + "',' " + cp.getJoinDate() + "','" + Helper.escapeQuotes(cp.getPackedPastClans()) + "','" + Helper.escapeQuotes(cp.getFlags()) + "');";
|
||||
core.insert(query + values);
|
||||
}
|
||||
String query = "INSERT INTO `sc_players` (`resign_times`, `uuid`, `name`, `leader`, `tag`, `friendly_fire`, `neutral_kills`, `rival_kills`, `civilian_kills`, `deaths`, `last_seen`, `join_date`, `packed_past_clans`, `flags`) ";
|
||||
String values = "VALUES ( '"+ Helper.escapeQuotes(Helper.resignTimesToJson(cp.getResignTimes()))+ "', '" + cp.getUniqueId().toString() + "', '" + cp.getName() + "'," + (cp.isLeader() ? 1 : 0) + ",'" + Helper.escapeQuotes(cp.getTag()) + "'," + (cp.isFriendlyFire() ? 1 : 0) + "," + cp.getNeutralKills() + "," + cp.getRivalKills() + "," + cp.getCivilianKills() + "," + cp.getDeaths() + ",'" + cp.getLastSeen() + "',' " + cp.getJoinDate() + "','" + Helper.escapeQuotes(cp.getPackedPastClans()) + "','" + Helper.escapeQuotes(cp.getFlags()) + "');";
|
||||
core.insert(query + values);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -670,14 +791,14 @@ public final class StorageManager {
|
||||
*
|
||||
* @param cp
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public void updateClanPlayerAsync(final ClanPlayer cp) {
|
||||
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateClanPlayer(cp);
|
||||
}
|
||||
});
|
||||
}
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -687,13 +808,16 @@ public final class StorageManager {
|
||||
*/
|
||||
public void updateClanPlayer(ClanPlayer cp) {
|
||||
cp.updateLastSeen();
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
String query = "UPDATE `sc_players` SET leader = " + (cp.isLeader() ? 1 : 0) + ", tag = '" + Helper.escapeQuotes(cp.getTag()) + "' , friendly_fire = " + (cp.isFriendlyFire() ? 1 : 0) + ", neutral_kills = " + cp.getNeutralKills() + ", rival_kills = " + cp.getRivalKills() + ", civilian_kills = " + cp.getCivilianKills() + ", deaths = " + cp.getDeaths() + ", last_seen = '" + cp.getLastSeen() + "', packed_past_clans = '" + Helper.escapeQuotes(cp.getPackedPastClans()) + "', trusted = " + (cp.isTrusted() ? 1 : 0) + ", flags = '" + Helper.escapeQuotes(cp.getFlags()) + "', name = '" + cp.getName() + "' WHERE `uuid` = '" + cp.getUniqueId().toString() + "';";
|
||||
core.update(query);
|
||||
} else {
|
||||
String query = "UPDATE `sc_players` SET leader = " + (cp.isLeader() ? 1 : 0) + ", tag = '" + Helper.escapeQuotes(cp.getTag()) + "' , friendly_fire = " + (cp.isFriendlyFire() ? 1 : 0) + ", neutral_kills = " + cp.getNeutralKills() + ", rival_kills = " + cp.getRivalKills() + ", civilian_kills = " + cp.getCivilianKills() + ", deaths = " + cp.getDeaths() + ", last_seen = '" + cp.getLastSeen() + "', packed_past_clans = '" + Helper.escapeQuotes(cp.getPackedPastClans()) + "', trusted = " + (cp.isTrusted() ? 1 : 0) + ", flags = '" + Helper.escapeQuotes(cp.getFlags()) + "' WHERE name = '" + cp.getName() + "';";
|
||||
core.update(query);
|
||||
if (plugin.getSettingsManager().isSavePeriodically()) {
|
||||
modifiedClanPlayers.add(cp);
|
||||
return;
|
||||
}
|
||||
core.update(getUpdateClanPlayerQuery(cp));
|
||||
}
|
||||
|
||||
private String getUpdateClanPlayerQuery(ClanPlayer cp) {
|
||||
String query = "UPDATE `sc_players` SET resign_times = '"+ Helper.escapeQuotes(Helper.resignTimesToJson(cp.getResignTimes())) +"', leader = " + (cp.isLeader() ? 1 : 0) + ", tag = '" + Helper.escapeQuotes(cp.getTag()) + "' , friendly_fire = " + (cp.isFriendlyFire() ? 1 : 0) + ", neutral_kills = " + cp.getNeutralKills() + ", rival_kills = " + cp.getRivalKills() + ", civilian_kills = " + cp.getCivilianKills() + ", deaths = " + cp.getDeaths() + ", last_seen = '" + cp.getLastSeen() + "', packed_past_clans = '" + Helper.escapeQuotes(cp.getPackedPastClans()) + "', trusted = " + (cp.isTrusted() ? 1 : 0) + ", flags = '" + Helper.escapeQuotes(cp.getFlags()) + "', name = '" + cp.getName() + "' WHERE `uuid` = '" + cp.getUniqueId().toString() + "';";
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -702,17 +826,16 @@ public final class StorageManager {
|
||||
* @param cp
|
||||
*/
|
||||
public void deleteClanPlayer(ClanPlayer cp) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
String query = "DELETE FROM `sc_players` WHERE uuid = '" + cp.getUniqueId() + "';";
|
||||
core.delete(query);
|
||||
deleteKills(cp.getUniqueId());
|
||||
} else {
|
||||
String query = "DELETE FROM `sc_players` WHERE name = '" + cp.getName() + "';";
|
||||
core.delete(query);
|
||||
deleteKills(cp.getName());
|
||||
final Clan clan = cp.getClan();
|
||||
if (clan != null) {
|
||||
clan.addBbWithoutSaving(ChatColor.AQUA + MessageFormat.format(plugin.getLang("has.been.purged"), cp.getName()));
|
||||
updateClan(clan, false);
|
||||
}
|
||||
String query = "DELETE FROM `sc_players` WHERE uuid = '" + cp.getUniqueId() + "';";
|
||||
core.delete(query);
|
||||
deleteKills(cp.getUniqueId());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Insert a kill into the database
|
||||
*
|
||||
@@ -723,15 +846,9 @@ public final class StorageManager {
|
||||
* @param type
|
||||
*/
|
||||
public void insertKill(Player attacker, String attackerTag, Player victim, String victimTag, String type) {
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
String query = "INSERT INTO `sc_kills` ( `attacker_uuid`, `attacker`, `attacker_tag`, `victim_uuid`, `victim`, `victim_tag`, `kill_type`) ";
|
||||
String values = "VALUES ( '" + attacker.getUniqueId() + "','" + attacker.getName() + "','" + attackerTag + "','" + victim.getUniqueId() + "','" + victim.getName() + "','" + victimTag + "','" + type + "');";
|
||||
core.insert(query + values);
|
||||
} else {
|
||||
String query = "INSERT INTO `sc_kills` ( `attacker`, `attacker_tag`, `victim`, `victim_tag`, `kill_type`) ";
|
||||
String values = "VALUES ( '" + attacker.getName() + "','" + attackerTag + "','" + victim.getName() + "','" + victimTag + "','" + type + "');";
|
||||
core.insert(query + values);
|
||||
}
|
||||
String query = "INSERT INTO `sc_kills` ( `attacker_uuid`, `attacker`, `attacker_tag`, `victim_uuid`, `victim`, `victim_tag`, `kill_type`) ";
|
||||
String values = "VALUES ( '" + attacker.getUniqueId() + "','" + attacker.getName() + "','" + attackerTag + "','" + victim.getUniqueId() + "','" + victim.getName() + "','" + victimTag + "','" + type + "');";
|
||||
core.insert(query + values);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -775,14 +892,14 @@ public final class StorageManager {
|
||||
int kills = res.getInt("kills");
|
||||
out.put(victim, kills);
|
||||
} catch (Exception ex) {
|
||||
SimpleClans.getLog().info(ex.getMessage());
|
||||
plugin.getLogger().info(ex.getMessage());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
SimpleClans.getLog().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
SimpleClans.getLog().log(Level.SEVERE, null, ex);
|
||||
plugin.getLogger().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,20 +926,65 @@ public final class StorageManager {
|
||||
int kills = res.getInt("kills");
|
||||
out.put(attacker + " " + victim, kills);
|
||||
} catch (Exception ex) {
|
||||
SimpleClans.getLog().info(ex.getMessage());
|
||||
plugin.getLogger().info(ex.getMessage());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
SimpleClans.getLog().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
SimpleClans.getLog().log(Level.SEVERE, null, ex);
|
||||
plugin.getLogger().severe(String.format("An Error occurred: %s", ex.getErrorCode()));
|
||||
plugin.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets, asynchronously, a map of tag->count of all kills and notifies via callback when it's ready
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void getMostKilled(DataCallback<Map<String, Integer>> callback) {
|
||||
new BukkitRunnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
callback.onResultReady(getMostKilled());
|
||||
}
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets, asynchronously, a map of victim->count of all kills that specific player did and notifies via callback when it's ready
|
||||
*
|
||||
* @param playerName
|
||||
* @param callback
|
||||
*/
|
||||
public void getKillsPerPlayer(final String playerName, final DataCallback<Map<String, Integer>> callback) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
callback.onResultReady(getKillsPerPlayer(playerName));
|
||||
}
|
||||
}.runTaskAsynchronously(plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback that returns some data
|
||||
*
|
||||
* @author roinujnosde
|
||||
*
|
||||
*/
|
||||
public interface DataCallback<T> {
|
||||
/**
|
||||
* Notifies when the result is ready
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
void onResultReady(T data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the database to the latest version
|
||||
*
|
||||
@@ -838,6 +1000,42 @@ public final class StorageManager {
|
||||
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")) {
|
||||
query = "ALTER TABLE sc_clans ADD COLUMN `fee_enabled` tinyint(1) default '0';";
|
||||
core.execute(query);
|
||||
}
|
||||
if (!core.existsColumn("sc_clans", "fee_value")) {
|
||||
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")) {
|
||||
query = "ALTER TABLE sc_clans ADD COLUMN `ranks` text;";
|
||||
core.execute(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bukkit 1.7.5+ UUID Migration
|
||||
@@ -876,11 +1074,12 @@ public final class StorageManager {
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
private void updatePlayersToUUID() {
|
||||
SimpleClans.log("[SimpleClans] Starting Migration to UUID Players !");
|
||||
SimpleClans.log("[SimpleClans] ==================== ATTENTION DONT STOP BUKKIT ! ==================== ");
|
||||
SimpleClans.log("[SimpleClans] ==================== ATTENTION DONT STOP BUKKIT ! ==================== ");
|
||||
SimpleClans.log("[SimpleClans] ==================== ATTENTION DONT STOP BUKKIT ! ==================== ");
|
||||
|
||||
private void updatePlayersToUUID() {
|
||||
plugin.getLogger().log(Level.WARNING, "Starting Migration to UUID Players !");
|
||||
plugin.getLogger().log(Level.WARNING, "==================== ATTENTION DONT STOP BUKKIT ! ==================== ");
|
||||
plugin.getLogger().log(Level.WARNING, "==================== ATTENTION DONT STOP BUKKIT ! ==================== ");
|
||||
plugin.getLogger().log(Level.WARNING, "==================== ATTENTION DONT STOP BUKKIT ! ==================== ");
|
||||
SimpleClans.getInstance().setUUID(false);
|
||||
List<ClanPlayer> cps = retrieveClanPlayers();
|
||||
|
||||
@@ -901,20 +1100,53 @@ public final class StorageManager {
|
||||
|
||||
String query3 = "UPDATE `sc_kills` SET victim_uuid = '" + uuidPlayer.toString() + "' WHERE victim = '" + cp.getName() + "';";
|
||||
core.update(query3);
|
||||
SimpleClans.log("[" + i + " / " + cps.size() + "] Success: " + cp.getName() + "; UUID: " + uuidPlayer.toString());
|
||||
plugin.getLogger().info("[" + i + " / " + cps.size() + "] Success: " + cp.getName() + "; UUID: " + uuidPlayer.toString());
|
||||
} catch (Exception ex) {
|
||||
SimpleClans.log("[" + i + " / " + cps.size() + "] Failed [ERRO]: " + cp.getName() + "; UUID: ???");
|
||||
plugin.getLogger().log(Level.WARNING, "[" + i + " / " + cps.size() + "] Failed [ERRO]: " + cp.getName() + "; UUID: ???");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
SimpleClans.log("[SimpleClans] ==================== END OF MIGRATION ====================");
|
||||
SimpleClans.log("[SimpleClans] ==================== END OF MIGRATION ====================");
|
||||
SimpleClans.log("[SimpleClans] ==================== END OF MIGRATION ====================");
|
||||
plugin.getLogger().log(Level.WARNING, "==================== END OF MIGRATION ====================");
|
||||
plugin.getLogger().log(Level.WARNING, "==================== END OF MIGRATION ====================");
|
||||
plugin.getLogger().log(Level.WARNING, "==================== END OF MIGRATION ====================");
|
||||
|
||||
|
||||
if (!cps.isEmpty()) {
|
||||
SimpleClans.log(MessageFormat.format("[SimpleClans] " + plugin.getLang("clan.players"), cps.size()));
|
||||
plugin.getLogger().info(MessageFormat.format(plugin.getLang("clan.players"), cps.size()));
|
||||
}
|
||||
SimpleClans.getInstance().setUUID(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves modified Clans and ClanPlayers to the database
|
||||
*
|
||||
* @author RoinujNosde
|
||||
* @since 2.10.2
|
||||
*/
|
||||
public void saveModified() {
|
||||
try (Statement statement = core.getConnection().createStatement()) {
|
||||
List<Clan> allClans = plugin.getClanManager().getClans();
|
||||
for (Clan clan : modifiedClans) {
|
||||
if (!allClans.contains(clan)) {
|
||||
continue;
|
||||
}
|
||||
statement.addBatch(getUpdateClanQuery(clan));
|
||||
}
|
||||
List<ClanPlayer> allClanPlayers = plugin.getClanManager().getAllClanPlayers();
|
||||
for (ClanPlayer cp : modifiedClanPlayers) {
|
||||
if (!allClanPlayers.contains(cp)) {
|
||||
continue;
|
||||
}
|
||||
statement.addBatch(getUpdateClanPlayerQuery(cp));
|
||||
}
|
||||
statement.executeBatch();
|
||||
|
||||
modifiedClans.clear();
|
||||
modifiedClanPlayers.clear();
|
||||
} catch (SQLException e) {
|
||||
plugin.getLogger().severe("Error saving modified Clans and ClanPlayers:");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,17 +36,13 @@ public final class TeleportManager {
|
||||
* @param clanName
|
||||
*/
|
||||
public void addPlayer(Player player, Location dest, String clanName) {
|
||||
int secs = SimpleClans.getInstance().getSettingsManager().getWaitSecs();
|
||||
int secs = SimpleClans.getInstance().getSettingsManager().getWaitSecs();
|
||||
waitingPlayers.put(player.getUniqueId().toString(), new TeleportState(player, dest, clanName));
|
||||
|
||||
if (SimpleClans.getInstance().hasUUID()) {
|
||||
waitingPlayers.put(player.getUniqueId().toString(), new TeleportState(player, dest, clanName));
|
||||
} else {
|
||||
waitingPlayers.put(player.getName(), new TeleportState(player, dest, clanName));
|
||||
}
|
||||
|
||||
if (secs > 0) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA + MessageFormat.format(plugin.getLang("waiting.for.teleport.stand.still.for.0.seconds"), secs));
|
||||
}
|
||||
if (secs > 0) {
|
||||
ChatBlock.sendMessage(player, ChatColor.AQUA
|
||||
+ MessageFormat.format(plugin.getLang("waiting.for.teleport.stand.still.for.0.seconds"), secs));
|
||||
}
|
||||
}
|
||||
|
||||
private void dropItems(Player player) {
|
||||
@@ -61,7 +57,7 @@ public final class TeleportManager {
|
||||
|
||||
List<Integer> itemsList = plugin.getSettingsManager().getItemsList();
|
||||
|
||||
if (itemsList.contains(item.getTypeId())) {
|
||||
if (itemsList.contains(item.getType().getId())) {
|
||||
player.getWorld().dropItemNaturally(player.getLocation(), item);
|
||||
inv.remove(item);
|
||||
}
|
||||
@@ -78,7 +74,7 @@ public final class TeleportManager {
|
||||
|
||||
List<Integer> itemsList = plugin.getSettingsManager().getItemsList();
|
||||
|
||||
if (!itemsList.contains(item.getTypeId())) {
|
||||
if (!itemsList.contains(item.getType().getId())) {
|
||||
player.getWorld().dropItemNaturally(player.getLocation(), item);
|
||||
inv.remove(item);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MySQLCore implements DBCore {
|
||||
this.host = host;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.log = SimpleClans.getLog();
|
||||
this.log = SimpleClans.getInstance().getLogger();
|
||||
initialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
/**
|
||||
@@ -25,29 +27,33 @@ public class SQLiteCore implements DBCore {
|
||||
public SQLiteCore(String dbLocation) {
|
||||
this.dbName = "SimpleClans";
|
||||
this.dbLocation = dbLocation;
|
||||
this.log = SimpleClans.getLog();
|
||||
|
||||
this.log = SimpleClans.getInstance().getLogger();
|
||||
initialize();
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
if (file == null) {
|
||||
|
||||
File dbFolder = new File(dbLocation);
|
||||
|
||||
if (dbName.contains("/") || dbName.contains("\\") || dbName.endsWith(".db")) {
|
||||
log.severe("The database name can not contain: /, \\, or .db");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dbFolder.exists()) {
|
||||
dbFolder.mkdir();
|
||||
}
|
||||
|
||||
file = new File(dbFolder.getAbsolutePath() + File.separator + dbName + ".db");
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
|
||||
connection = DriverManager.getConnection("jdbc:sqlite:" + file.getAbsolutePath());
|
||||
|
||||
} catch (SQLException ex) {
|
||||
log.severe("SQLite exception on initialize " + ex);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
@@ -98,7 +104,6 @@ public class SQLiteCore implements DBCore {
|
||||
@Override
|
||||
public ResultSet select(String query) {
|
||||
try {
|
||||
|
||||
return getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
log.severe("Error at SQL Query: " + ex.getMessage());
|
||||
@@ -114,14 +119,18 @@ public class SQLiteCore implements DBCore {
|
||||
*/
|
||||
@Override
|
||||
public void insert(String query) {
|
||||
try {
|
||||
getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet")) {
|
||||
log.severe("Error at SQL INSERT Query: " + ex);
|
||||
log.severe("Query: " + query);
|
||||
}
|
||||
}
|
||||
if (SimpleClans.getInstance().getSettingsManager().getUseThreads()) {
|
||||
executeAsync(query, "INSERT");
|
||||
} else {
|
||||
try {
|
||||
getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet")) {
|
||||
log.severe("Error at SQL INSERT Query: " + ex);
|
||||
log.severe("Query: " + query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,13 +140,17 @@ public class SQLiteCore implements DBCore {
|
||||
*/
|
||||
@Override
|
||||
public void update(String query) {
|
||||
try {
|
||||
getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet")) {
|
||||
log.severe("Error at SQL UPDATE Query: " + ex);
|
||||
log.severe("Query: " + query);
|
||||
}
|
||||
if (SimpleClans.getInstance().getSettingsManager().getUseThreads()) {
|
||||
executeAsync(query, "UPDATE");
|
||||
} else {
|
||||
try {
|
||||
getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet")) {
|
||||
log.severe("Error at SQL UPDATE Query: " + ex);
|
||||
log.severe("Query: " + query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,13 +161,17 @@ public class SQLiteCore implements DBCore {
|
||||
*/
|
||||
@Override
|
||||
public void delete(String query) {
|
||||
try {
|
||||
getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet")) {
|
||||
log.severe("Error at SQL DELETE Query: " + ex);
|
||||
log.severe("Query: " + query);
|
||||
}
|
||||
if (SimpleClans.getInstance().getSettingsManager().getUseThreads()) {
|
||||
executeAsync(query, "DELETE");
|
||||
} else {
|
||||
try {
|
||||
getConnection().createStatement().executeQuery(query);
|
||||
} catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet")) {
|
||||
log.severe("Error at SQL DELETE Query: " + ex);
|
||||
log.severe("Query: " + query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,4 +225,25 @@ public class SQLiteCore implements DBCore {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void executeAsync(String query, String sqlType) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (connection != null && !connection.isClosed()) {
|
||||
connection.createStatement().executeUpdate(query);
|
||||
}
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
if (!ex.toString().contains("not return ResultSet"))
|
||||
{
|
||||
log.severe("[Thread] Error at SQL " + sqlType + " Query: " + ex);
|
||||
log.severe("[Thread] Query: " + query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}.runTaskAsynchronously(SimpleClans.getInstance());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.tasks;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
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.managers.SettingsManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class CollectFeeTask extends BukkitRunnable {
|
||||
private final SimpleClans plugin;
|
||||
|
||||
public CollectFeeTask() {
|
||||
plugin = SimpleClans.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the repetitive task
|
||||
*/
|
||||
public void start() {
|
||||
SettingsManager sm = plugin.getSettingsManager();
|
||||
|
||||
int hour = sm.getTasksCollectFeeHour();
|
||||
int minute = sm.getTasksCollectFeeMinute();
|
||||
long delay = Helper.getDelayTo(hour, minute);
|
||||
|
||||
this.runTaskTimerAsynchronously(SimpleClans.getInstance(), delay * 20, 86400 * 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* (used internally)
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
for (Clan clan : plugin.getClanManager().getClans()) {
|
||||
final double memberFee = clan.getMemberFee();
|
||||
|
||||
if (clan.isMemberFeeEnabled() && memberFee > 0) {
|
||||
for (ClanPlayer cp : clan.getFeePayers()) {
|
||||
|
||||
final boolean success = plugin.getPermissionsManager()
|
||||
.playerChargeMoney(Bukkit.getOfflinePlayer(cp.getUniqueId()), memberFee);
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (success) {
|
||||
ChatBlock.sendMessage(cp.toPlayer(), ChatColor.AQUA +
|
||||
MessageFormat.format(plugin.getLang("fee.collected"), memberFee));
|
||||
clan.setBalance(clan.getBalance() + memberFee);
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
} else {
|
||||
clan.removePlayerFromClan(cp.getUniqueId());
|
||||
clan.addBb(ChatColor.AQUA +
|
||||
MessageFormat.format(plugin.getLang("bb.fee.player.kicked"), cp.getName()));
|
||||
}
|
||||
}
|
||||
}.runTask(plugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.tasks;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class CollectUpkeepTask extends BukkitRunnable {
|
||||
private final SimpleClans plugin;
|
||||
private final SettingsManager settingsManager;
|
||||
|
||||
public CollectUpkeepTask() {
|
||||
plugin = SimpleClans.getInstance();
|
||||
settingsManager = plugin.getSettingsManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the repetitive task
|
||||
*/
|
||||
public void start() {
|
||||
int hour = settingsManager.getTasksCollectUpkeepHour();
|
||||
int minute = settingsManager.getTasksCollectUpkeepMinute();
|
||||
long delay = Helper.getDelayTo(hour, minute);
|
||||
|
||||
this.runTaskTimerAsynchronously(SimpleClans.getInstance(), delay * 20, 86400 * 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* (used internally)
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
if (plugin == null) {
|
||||
throw new IllegalStateException("Use the start() method!");
|
||||
}
|
||||
plugin.getClanManager().getClans().forEach((clan) -> {
|
||||
if (settingsManager.isChargeUpkeepOnlyIfMemberFeeEnabled() && !clan.isMemberFeeEnabled()) {
|
||||
return;
|
||||
}
|
||||
double upkeep = settingsManager.getClanUpkeep();
|
||||
if (settingsManager.isMultiplyUpkeepBySize()) {
|
||||
upkeep = upkeep * clan.getSize();
|
||||
}
|
||||
final double balance = clan.getBalance();
|
||||
if (balance >= upkeep) {
|
||||
clan.setBalance(balance - upkeep);
|
||||
clan.addBb(ChatColor.AQUA + MessageFormat.format(plugin.getLang("upkeep.collected"), upkeep), false);
|
||||
} else {
|
||||
clan.disband();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.tasks;
|
||||
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RoinujNosde
|
||||
* @since 2.10.2
|
||||
*
|
||||
*/
|
||||
public class SaveDataTask extends BukkitRunnable {
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
|
||||
/**
|
||||
* Starts the repetitive task
|
||||
*/
|
||||
public void start() {
|
||||
long interval = plugin.getSettingsManager().getSaveInterval() * 20;
|
||||
runTaskTimerAsynchronously(plugin, interval, interval);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
plugin.getStorageManager().saveModified();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.tasks;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author roinujnosde
|
||||
*/
|
||||
public class UpkeepWarningTask extends BukkitRunnable {
|
||||
private final SimpleClans plugin;
|
||||
private final SettingsManager sm;
|
||||
|
||||
public UpkeepWarningTask() {
|
||||
plugin = SimpleClans.getInstance();
|
||||
sm = plugin.getSettingsManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the repetitive task
|
||||
*
|
||||
*/
|
||||
public void start() {
|
||||
int hour = sm.getTasksCollectUpkeepWarningHour();
|
||||
int minute = sm.getTasksCollectUpkeepWarningMinute();
|
||||
long delay = Helper.getDelayTo(hour, minute);
|
||||
|
||||
this.runTaskTimerAsynchronously(plugin, delay * 20, 86400 * 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* (used internally)
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
if (plugin == null) {
|
||||
throw new IllegalStateException("Use the start() method!");
|
||||
}
|
||||
plugin.getClanManager().getClans().forEach((clan) -> {
|
||||
if (sm.isChargeUpkeepOnlyIfMemberFeeEnabled() && !clan.isMemberFeeEnabled()) {
|
||||
return;
|
||||
}
|
||||
final double balance = clan.getBalance();
|
||||
double upkeep = sm.getClanUpkeep();
|
||||
if (sm.isMultiplyUpkeepBySize()) {
|
||||
upkeep = upkeep * clan.getSize();
|
||||
}
|
||||
if (balance < upkeep) {
|
||||
clan.addBb(MessageFormat.format(plugin.getLang("balance.is.not.enough.for.upkeep"), upkeep), false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,15 +10,15 @@ import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
*/
|
||||
public class ThreadUpdateSQL extends Thread {
|
||||
|
||||
Connection Connection;
|
||||
String Query;
|
||||
String TypeSQL;
|
||||
Connection connection;
|
||||
String query;
|
||||
String sqlType;
|
||||
|
||||
public ThreadUpdateSQL(Connection Connection, String Query, String TypeSQL)
|
||||
public ThreadUpdateSQL(Connection connection, String query, String sqlType)
|
||||
{
|
||||
this.Query = Query;
|
||||
this.Connection = Connection;
|
||||
this.TypeSQL = TypeSQL;
|
||||
this.query = query;
|
||||
this.connection = connection;
|
||||
this.sqlType = sqlType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -26,14 +26,16 @@ public class ThreadUpdateSQL extends Thread {
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Connection.createStatement().executeUpdate(this.Query);
|
||||
if (!connection.isClosed()) {
|
||||
this.connection.createStatement().executeUpdate(this.query);
|
||||
}
|
||||
}
|
||||
catch (SQLException ex)
|
||||
{
|
||||
if (!ex.toString().contains("not return ResultSet"))
|
||||
{
|
||||
SimpleClans.getLog().severe("[Thread] Error at SQL " + this.TypeSQL + " Query: " + ex);
|
||||
SimpleClans.getLog().severe("[Thread] Query: " + this.Query);
|
||||
SimpleClans.getInstance().getLogger().severe("[Thread] Error at SQL " + this.sqlType + " Query: " + ex);
|
||||
SimpleClans.getInstance().getLogger().severe("[Thread] Query: " + this.query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.concurrent.Callable;
|
||||
public class UUIDFetcher implements Callable<Map<String, UUID>> {
|
||||
|
||||
private static final double PROFILES_PER_REQUEST = 100;
|
||||
private static final String PROFILE_URL = "https://api.mojang.com/profiles/minecraft";
|
||||
private static final String PROFILE_URL = "https://api.mojang.com/users/profiles/minecraft";
|
||||
private final JSONParser jsonParser = new JSONParser();
|
||||
private final List<String> names;
|
||||
private final boolean rateLimiting;
|
||||
|
||||
@@ -16,8 +16,6 @@ public class UUIDMigration {
|
||||
private UUIDMigration() {}
|
||||
|
||||
public static boolean canReturnUUID() {
|
||||
if(!SimpleClans.getInstance().getSettingsManager().isOnlineMode())
|
||||
return false;
|
||||
try {
|
||||
Bukkit.class.getDeclaredMethod("getPlayer", UUID.class);
|
||||
return true;
|
||||
@@ -27,26 +25,23 @@ public class UUIDMigration {
|
||||
}
|
||||
|
||||
public static UUID getForcedPlayerUUID(String playerDisplayName) {
|
||||
Player OnlinePlayer = SimpleClans.getInstance().getServer().getPlayerExact(playerDisplayName);
|
||||
OfflinePlayer OfflinePlayer = SimpleClans.getInstance().getServer().getOfflinePlayer(playerDisplayName);
|
||||
Player onlinePlayer = SimpleClans.getInstance().getServer().getPlayerExact(playerDisplayName);
|
||||
@SuppressWarnings("deprecation")
|
||||
OfflinePlayer offlinePlayer = SimpleClans.getInstance().getServer().getOfflinePlayer(playerDisplayName);
|
||||
|
||||
if (OnlinePlayer != null) {
|
||||
return OnlinePlayer.getUniqueId();
|
||||
if (onlinePlayer != null) {
|
||||
return onlinePlayer.getUniqueId();
|
||||
} else {
|
||||
for (ClanPlayer cp : SimpleClans.getInstance().getClanManager().getAllClanPlayers()) {
|
||||
if (cp.getName().equalsIgnoreCase(playerDisplayName)) {
|
||||
return cp.getUniqueId();
|
||||
}
|
||||
}
|
||||
try {
|
||||
return UUIDFetcher.getUUIDOf(playerDisplayName);
|
||||
} catch (Exception ex) {
|
||||
if (OfflinePlayer != null) {
|
||||
return OfflinePlayer.getUniqueId();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
for (ClanPlayer cp : SimpleClans.getInstance().getClanManager().getAllClanPlayers()) {
|
||||
if (cp.getName().equalsIgnoreCase(playerDisplayName)) {
|
||||
return cp.getUniqueId();
|
||||
}
|
||||
}
|
||||
if (offlinePlayer != null) {
|
||||
return offlinePlayer.getUniqueId();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+184
-141
@@ -1,141 +1,184 @@
|
||||
safe-civilians: false
|
||||
tag:
|
||||
default-color: '8'
|
||||
max-length: 5
|
||||
bracket:
|
||||
color: '8'
|
||||
leader-color: '4'
|
||||
left: ''
|
||||
right: ''
|
||||
min-length: 2
|
||||
separator:
|
||||
color: '8'
|
||||
leader-color: '4'
|
||||
char: ' .'
|
||||
settings:
|
||||
online-mode: true
|
||||
disable-messages: false
|
||||
tameable-mobs-sharing: false
|
||||
teleport-blocks: false
|
||||
teleport-home-on-spawn: false
|
||||
drop-items-on-clan-home: false
|
||||
keep-items-on-clan-home: false
|
||||
item-list: []
|
||||
show-debug-info: false
|
||||
mchat-integration: true
|
||||
enable-auto-groups: false
|
||||
chat-compatibility-mode: true
|
||||
rival-limit-percent: 50
|
||||
use-colorcode-from-prefix-for-name: true
|
||||
display-chat-tags: true
|
||||
unrivable-clans:
|
||||
- admin
|
||||
- staff
|
||||
- mod
|
||||
show-unverified-on-list: false
|
||||
blacklisted-worlds: []
|
||||
banned-players: []
|
||||
disallowed-tags:
|
||||
- vip
|
||||
- clan
|
||||
language: en
|
||||
disallowed-tag-colors:
|
||||
- '4'
|
||||
server-name: '&4SimpleClans'
|
||||
new-clan-verification-required: true
|
||||
allow-regroup-command: true
|
||||
allow-reset-kdr: false
|
||||
commands:
|
||||
more: more
|
||||
ally: ally
|
||||
clan: clan
|
||||
accept: accept
|
||||
deny: deny
|
||||
global: global
|
||||
clan_chat: "."
|
||||
force-priority: true
|
||||
economy:
|
||||
creation-price: 100.0
|
||||
purchase-clan-create: false
|
||||
verification-price: 1000.0
|
||||
purchase-clan-verify: false
|
||||
invite-price: 20.0
|
||||
purchase-clan-invite: false
|
||||
home-teleport-price: 5.0
|
||||
purchase-home-teleport: false
|
||||
home-teleport-set-price: 5.0
|
||||
purchase-home-teleport-set: false
|
||||
home-regroup-price: 5.0
|
||||
purchase-home-regroup: false
|
||||
unique-tax-on-regroup: true
|
||||
issuer-pays-regroup: true
|
||||
money-per-kill: false
|
||||
money-per-kill-kdr-multipier: 10
|
||||
purchase-reset-kdr: true
|
||||
reset-kdr-price: 10000.0
|
||||
kill-weights:
|
||||
rival: 2.0
|
||||
civilian: 0.0
|
||||
neutral: 1.0
|
||||
clan:
|
||||
homebase-teleport-wait-secs: 10
|
||||
homebase-can-be-set-only-once: true
|
||||
min-size-to-set-rival: 3
|
||||
max-length: 25
|
||||
max-members: 25
|
||||
confirmation-for-promote: false
|
||||
trust-members-by-default: false
|
||||
confirmation-for-demote: false
|
||||
ff-on-by-default: false
|
||||
min-length: 2
|
||||
min-size-to-set-ally: 3
|
||||
page:
|
||||
untrusted-color: '8'
|
||||
clan-name-color: b
|
||||
subtitle-color: '7'
|
||||
headings-color: '8'
|
||||
trusted-color: f
|
||||
leader-color: '4'
|
||||
separator: '-'
|
||||
size: 100
|
||||
clanchat:
|
||||
enable: true
|
||||
tag-based-clan-chat: false
|
||||
announcement-color: e
|
||||
format: "&b[%clan%&b] &4<%nick-color%%player%&4> %rank%: &b%message%"
|
||||
rank: "&f[%rank%&f]"
|
||||
leader-color: '4'
|
||||
member-color: 'f'
|
||||
request:
|
||||
message-color: b
|
||||
ask-frequency-secs: 60
|
||||
max-asks-per-request: 1440
|
||||
bb:
|
||||
color: e
|
||||
accent-color: '8'
|
||||
show-on-login: true
|
||||
size: 6
|
||||
allychat:
|
||||
enable: true
|
||||
format: "&b[Ally Chat] &4<%clan%&4> <%nick-color%%player%&4> %rank%: &b%message%"
|
||||
rank: "&f[%rank%&f]"
|
||||
leader-color: '4'
|
||||
member-color: 'f'
|
||||
purge:
|
||||
inactive-player-data-days: 30
|
||||
inactive-clan-days: 7
|
||||
unverified-clan-days: 2
|
||||
mysql:
|
||||
username: ''
|
||||
host: localhost
|
||||
port: 3306
|
||||
enable: false
|
||||
password: ''
|
||||
database: ''
|
||||
permissions:
|
||||
auto-group-groupname: true
|
||||
YourClanNameHere:
|
||||
- test.permission
|
||||
performance:
|
||||
use-threads: false
|
||||
use-bungeecord: false
|
||||
safe-civilians: false
|
||||
tag:
|
||||
default-color: '8'
|
||||
max-length: 5
|
||||
bracket:
|
||||
color: '8'
|
||||
leader-color: '4'
|
||||
left: ''
|
||||
right: ''
|
||||
min-length: 2
|
||||
separator:
|
||||
color: '8'
|
||||
leader-color: '4'
|
||||
char: ' .'
|
||||
settings:
|
||||
disable-messages: false
|
||||
tameable-mobs-sharing: false
|
||||
teleport-blocks: false
|
||||
teleport-home-on-spawn: false
|
||||
drop-items-on-clan-home: false
|
||||
keep-items-on-clan-home: false
|
||||
item-list: []
|
||||
show-debug-info: false
|
||||
mchat-integration: true
|
||||
enable-auto-groups: false
|
||||
chat-compatibility-mode: true
|
||||
rival-limit-percent: 50
|
||||
use-colorcode-from-prefix-for-name: true
|
||||
display-chat-tags: true
|
||||
unrivable-clans:
|
||||
- admin
|
||||
- staff
|
||||
- mod
|
||||
show-unverified-on-list: false
|
||||
blacklisted-worlds: []
|
||||
banned-players: []
|
||||
disallowed-tags:
|
||||
- vip
|
||||
- clan
|
||||
language: en
|
||||
language-per-player: false
|
||||
disallowed-tag-colors:
|
||||
- '4'
|
||||
server-name: '&4SimpleClans'
|
||||
new-clan-verification-required: true
|
||||
allow-regroup-command: true
|
||||
allow-reset-kdr: false
|
||||
rejoin-cooldown: 60
|
||||
rejoin-cooldown-enabled: false
|
||||
kdr-grinding-prevention:
|
||||
enable-max-kills: false
|
||||
max-kills-per-victim: 10
|
||||
enable-kill-delay: false
|
||||
delay-between-kills: 5
|
||||
list:
|
||||
size: size
|
||||
kdr: kdr
|
||||
name: name
|
||||
founded: founded
|
||||
active: active
|
||||
asc: asc
|
||||
desc: desc
|
||||
default: kdr
|
||||
commands:
|
||||
more: more
|
||||
ally: ally
|
||||
clan: clan
|
||||
accept: accept
|
||||
deny: deny
|
||||
global: global
|
||||
clan_chat: "."
|
||||
force-priority: true
|
||||
economy:
|
||||
creation-price: 100.0
|
||||
purchase-clan-create: false
|
||||
verification-price: 1000.0
|
||||
purchase-clan-verify: false
|
||||
invite-price: 20.0
|
||||
purchase-clan-invite: false
|
||||
home-teleport-price: 5.0
|
||||
purchase-home-teleport: false
|
||||
home-teleport-set-price: 5.0
|
||||
purchase-home-teleport-set: false
|
||||
home-regroup-price: 5.0
|
||||
purchase-home-regroup: false
|
||||
unique-tax-on-regroup: true
|
||||
issuer-pays-regroup: true
|
||||
money-per-kill: false
|
||||
money-per-kill-kdr-multipier: 10
|
||||
purchase-reset-kdr: true
|
||||
reset-kdr-price: 10000.0
|
||||
purchase-member-fee-set: false
|
||||
member-fee-set-price: 1000.0
|
||||
member-fee-enabled: false
|
||||
max-member-fee: 200.0
|
||||
upkeep: 200.0
|
||||
upkeep-enabled: false
|
||||
multiply-upkeep-by-clan-size: false
|
||||
charge-upkeep-only-if-member-fee-enabled: true
|
||||
kill-weights:
|
||||
rival: 2.0
|
||||
civilian: 0.0
|
||||
neutral: 1.0
|
||||
deny-same-ip-kills: false
|
||||
clan:
|
||||
homebase-teleport-wait-secs: 10
|
||||
homebase-can-be-set-only-once: true
|
||||
min-size-to-set-rival: 3
|
||||
max-length: 25
|
||||
max-description-length: 120
|
||||
min-description-length: 10
|
||||
max-members: 25
|
||||
confirmation-for-promote: false
|
||||
trust-members-by-default: false
|
||||
confirmation-for-demote: false
|
||||
percentage-online-to-demote: 100.0
|
||||
ff-on-by-default: false
|
||||
min-length: 2
|
||||
min-size-to-set-ally: 3
|
||||
tasks:
|
||||
collect-upkeep:
|
||||
hour: 1
|
||||
minute: 30
|
||||
collect-upkeep-warning:
|
||||
hour: 12
|
||||
minute: 0
|
||||
collect-fee:
|
||||
hour: 1
|
||||
minute: 0
|
||||
page:
|
||||
untrusted-color: '8'
|
||||
clan-name-color: b
|
||||
subtitle-color: '7'
|
||||
headings-color: '8'
|
||||
trusted-color: f
|
||||
leader-color: '4'
|
||||
separator: '-'
|
||||
size: 100
|
||||
clanchat:
|
||||
enable: true
|
||||
tag-based-clan-chat: false
|
||||
announcement-color: e
|
||||
format: "&b[%clan%&b] &4<%nick-color%%player%&4> %rank%: &b%message%"
|
||||
rank: "&f[%rank%&f]"
|
||||
leader-color: '4'
|
||||
trusted-color: 'f'
|
||||
member-color: '7'
|
||||
request:
|
||||
message-color: b
|
||||
ask-frequency-secs: 60
|
||||
max-asks-per-request: 1440
|
||||
bb:
|
||||
color: e
|
||||
accent-color: '8'
|
||||
show-on-login: true
|
||||
size: 6
|
||||
login-size: 6
|
||||
allychat:
|
||||
enable: true
|
||||
format: "&b[Ally Chat] &4<%clan%&4> <%nick-color%%player%&4> %rank%: &b%message%"
|
||||
rank: "&f[%rank%&f]"
|
||||
leader-color: '4'
|
||||
trusted-color: 'f'
|
||||
member-color: '7'
|
||||
purge:
|
||||
inactive-player-data-days: 30
|
||||
inactive-clan-days: 7
|
||||
unverified-clan-days: 2
|
||||
mysql:
|
||||
username: ''
|
||||
host: localhost
|
||||
port: 3306
|
||||
enable: false
|
||||
password: ''
|
||||
database: ''
|
||||
permissions:
|
||||
auto-group-groupname: true
|
||||
YourClanNameHere:
|
||||
- test.permission
|
||||
performance:
|
||||
save-periodically: true
|
||||
save-interval: 10
|
||||
use-threads: true
|
||||
use-bungeecord: false
|
||||
@@ -1,417 +0,0 @@
|
||||
create.command: "criar"
|
||||
list.command: "listar"
|
||||
profile.command: "perfil"
|
||||
roster.command: "roster" #TODO
|
||||
lookup.command: "lookup" #TODO
|
||||
leaderboard.command: "leaderboard" #TODO
|
||||
alliances.command: "aliancas"
|
||||
rivalries.command: "rivalidades"
|
||||
vitals.command: "saude"
|
||||
coords.command: "coords"
|
||||
stats.command: "estatisticas"
|
||||
ally.command: "aliado"
|
||||
rival.command: "rival"
|
||||
bb.command: "bb"
|
||||
cape.command: "capa"
|
||||
modtag.command: "mudartag"
|
||||
toggle.command: "alternar"
|
||||
invite.command: "convidar"
|
||||
kick.command: "expulsar"
|
||||
bank.command: "banco"
|
||||
trust.command: "confiar"
|
||||
untrust.command: "naoconfiar"
|
||||
promote.command: "promover"
|
||||
demote.command: "rebaixar"
|
||||
clanff.command: "clanff"
|
||||
ff.command: "ff"
|
||||
resign.command: "abandonar"
|
||||
disband.command: "debandar"
|
||||
verify.command: "verificar"
|
||||
ban.command: "banir"
|
||||
unban.command: "desbanir"
|
||||
reload.command: "recarregar"
|
||||
globalff.command: "globalff"
|
||||
kills.command: "kills"
|
||||
mostkilled.command: "maismatou"
|
||||
war.command: "guerra"
|
||||
home.command: "casa"
|
||||
setrank.command: "definirrank"
|
||||
place.command: "colocar"
|
||||
resetkdr.command: "redefinirkdr"
|
||||
usage.resetkdr: "Usage: /{0} resetkdr [all/player]" #TODO: from here, to the bottom
|
||||
usage.clan.alliances: "Usage: /{0} alliances"
|
||||
usage.ally: "Usage: /{0} ally add/remove [tag]"
|
||||
usage.ban.unban: "Usage: /{0} ban/unban [player]"
|
||||
usage.rival: "Usage: /{0} rival add/remove [tag]"
|
||||
usage.war: "Usage: /{0} war start/end [tag]"
|
||||
usage.cape.url: "Usage: /{0} cape [url]"
|
||||
usage.setrank: "Usage: /{0} setrank [player] [rank], rank can be multiple worlds and contain &f color codes"
|
||||
usage.clanff: "Usage: /{0} clanff allow/block"
|
||||
usage.0.coords: "Usage: /{0} coords"
|
||||
usage.create.tag: "Usage: /{0} create [tag] [name]"
|
||||
usage.demote.leader: "Usage: /{0} demote [leader]"
|
||||
usage.0.disband: "Usage: /{0} disband"
|
||||
usage.0.ff.allow.auto: "Usage: /{0} ff allow/auto"
|
||||
usage.0.globalff.allow.auto: "Usage: /{0} globalff allow/auto"
|
||||
usage.0.permissions.player: "Usage: /{0} permissions [clan] add/remove [permission]"
|
||||
usage.0.invite.player: "Usage: /{0} invite [player]"
|
||||
usage.kick.player: "Usage: /{0} kick [player]"
|
||||
usage.bank: "Usage: /{0} bank withdraw/deposit/status [amount]"
|
||||
usage.0.modtag.tag: "Usage: /{0} modtag [tag]"
|
||||
usage.list: "Usage: /{0} list"
|
||||
usage.lookup.tag: "Usage: /{0} lookup [tag]"
|
||||
usage.0.profile.tag: "Usage: /{0} profile [tag]"
|
||||
usage.0.promote.member: "Usage: /{0} promote <member>"
|
||||
usage.0.rivalries: "Usage: /{0} rivalries"
|
||||
usage.0.roster.tag: "Usage: /{0} roster [tag]"
|
||||
usage.0.stats: "Usage: /{0} stats"
|
||||
usage.0.trust.player: "Usage: /{0} trust [player]"
|
||||
usage.0.untrust.player: "Usage: /{0} untrust [player]"
|
||||
usage.0.verify.tag: "Usage: /{0} verify [tag]"
|
||||
usage.0.vitals: "Usage: /{0} vitals"
|
||||
usage.0.place: "Usage: /{0} place [player] [tag]"
|
||||
usage.0.leaderboard: "Usage: /{0} leaderboard"
|
||||
0.reload.1.reload.configuration: "/{0} reload{1} - Reload configuration"
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire: "/{0} globalff allow/auto {1} - Set global friendly fire"
|
||||
0.place: "/{0} place [player] [tag]{1} - Place a player in a clan"
|
||||
0.ban.unban.player.1.ban.unban.a.player: "/{0} ban/unban [player]{1} - Ban/unban a player"
|
||||
0.hometp.clan.1.tp.home.a.clan: "/{0} home tp [clan]{1} - Teleport to all clans homes"
|
||||
0.disband.tag.1.disband.a.clan: "/{0} disband [tag]{1} - Disband a clan"
|
||||
0.resetkdr.1.resets.kdr: "/{0} resetkdr player/all{1} - Reset KDR of all players or just of one"
|
||||
0.resetkdr.1.resets.your.kdr: "/{0} resetkdr{1} - Reset your KDR"
|
||||
0.verify.tag.1.verify.an.unverified.clan: "/{0} verify [tag]{1} - Verify an unverified clan"
|
||||
0.verify.1.purchase.verification.of.your.clan: "/{0} verify{1} - Purchase verification of your clan"
|
||||
0.list.1.lists.all.clans: "/{0} list{1} - Lists all clans"
|
||||
0.profile.1.view.your.clan.s.profile: "/{0} profile{1} - View your clan''s profile"
|
||||
0.profile.tag.1.view.a.clan.s.profile: "/{0} profile [tag]{1} - View a clan''s profile"
|
||||
0.lookup.1.lookup.your.info: "/{0} lookup{1} - Lookup your info"
|
||||
0.lookup.player.1.lookup.a.player.s.info: "/{0} lookup [player]{1} - Lookup a player''s info"
|
||||
0.leaderboard.1.view.leaderboard: "/{0} leaderboard{1} - View leaderboard"
|
||||
0.alliances.1.view.all.clan.alliances: "/{0} alliances{1} - View all clan alliances"
|
||||
0.rivalries.1.view.all.clan.rivalries: "/{0} rivalries{1} - View all clan rivalries"
|
||||
0.roster.1.view.your.clan.s.member.list: "/{0} roster{1} - View your clan''s member list"
|
||||
0.roster.tag.1.view.a.clan.s.member.list: "/{0} roster [tag]{1} - View a clan''s member list"
|
||||
0.vitals.1.view.your.clan.member.s.vitals: "/{0} vitals{1} - View your clan member''s vitals"
|
||||
0.coords.1.view.your.clan.member.s.coordinates: "/{0} coords{1} - View your clan member''s coordinates"
|
||||
0.stats.1.view.your.clan.member.s.stats: "/{0} stats{1} - View your clan member''s stats"
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan: "/{0} ally add/remove [tag]{1} - Add/remove an ally clan"
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan: "/{0} rival add/remove [tag]{1} - Add/remove a rival clan"
|
||||
0.bb.1.display.bulletin.board: "/{0} bb{1} - Display bulletin board"
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board: "/{0} bb [msg]{1} - Add a message to the bulletin board"
|
||||
0.modtag.tag.1.modify.the.clan.s.tag: "/{0} modtag [tag]{1} - Modify the clan''s tag"
|
||||
0.cape.url.1.change.your.clan.s.cape: "/{0} cape [url]{1} - Change your clan''s cape"
|
||||
0.invite.player.1.invite.a.player: "/{0} invite [player]{1} - Invite a player"
|
||||
0.kick.player.1.kick.a.player.from.the.clan: "/{0} kick [player]{1} - Kick a player from the clan"
|
||||
0.trust.untrust.player.1.set.trust.level1: "/{0} trust [player]{1} - Set member as trusted"
|
||||
0.trust.untrust.player.1.set.trust.level2: "/{0} untrust [player]{1} - Set member as untrusted"
|
||||
0.promote.member.1.promote.a.member.to.leader: "/{0} promote [member]{1} - Promote a member to leader"
|
||||
0.demote.leader.1.demote.a.leader.to.member: "/{0} demote [leader]{1} - Demote a leader to member"
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire: "/{0} clanff allow/block{1} - Toggle clan''s friendly fire"
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire: "/{0} ff allow/auto{1} - Toggle personal friendly fire"
|
||||
0.toggle.command: "/{0} toggle [{2}]{1} - Toggle personal settings"
|
||||
0.resign.1.resign.from.the.clan: "/{0} resign{1} - Resign from the clan"
|
||||
0.disband.1.disband.your.clan: "/{0} disband{1} - Disband your clan"
|
||||
0.trust.setrank: "/{0} setrank [player] [rank]{1} - Give a player a rank"
|
||||
0.create.tag.name.1.purchase.a.new.clan: "/{0} create [tag] [name]{1} - Purchase a new clan"
|
||||
0.create.tag.name.1.create.a.new.clan: "/{0} create [tag] [name]{1} - Create a new clan"
|
||||
0.kills: "/{0} kills{1} - View your kill counts"
|
||||
0.killsplayer: "/{0} kills [player]{1} - View a player''s kill counts"
|
||||
0.mostkilled: "/{0} mostkilled{1} - View serverwide most killed counts"
|
||||
home-menu: "/{0} home{1} - Teleport to clan home-base"
|
||||
home-set-menu: "/{0} home set{1} - Set the clan''s home base"
|
||||
home-clear-menu: "/{0} home clear{1} - Clear the clan''s home base"
|
||||
home-regroup-menu: "/{0} home regroup [me]{1} - Regroup all members to clan home-base or to you"
|
||||
example.clan.modtag.4kfo.4l: "Example: /clan modtag &4K&fo&4L"
|
||||
example.clan.create: "Example: /clan create &4Kol Knights of the Labyrinth"
|
||||
clan: "Clan"
|
||||
allies: "Allies"
|
||||
alliances: "alliances"
|
||||
coords: "coords"
|
||||
name: "Name"
|
||||
distance: "Distance"
|
||||
coords.upper: "Coords"
|
||||
world: "World"
|
||||
kdr: "KDR"
|
||||
members: "Members"
|
||||
clans.lower: "clans"
|
||||
rival: "Rival"
|
||||
civilian: "Civilian"
|
||||
neutral: "Neutral"
|
||||
free.agent: "Free Agent"
|
||||
days: "days"
|
||||
rivals: "Rivals"
|
||||
rivalries: "rivalries"
|
||||
online: "Online"
|
||||
player: "Player"
|
||||
seen: "Seen"
|
||||
leader: "leader"
|
||||
roster: "roster"
|
||||
trusted: "trusted"
|
||||
untrusted: "untrusted"
|
||||
deaths: "Deaths"
|
||||
weights: "Weights"
|
||||
stats: "stats"
|
||||
health: "Health"
|
||||
armor: "Armor"
|
||||
weapons: "Weapons"
|
||||
food: "Food"
|
||||
vitals: "vitals"
|
||||
verified: "Verified"
|
||||
unverified: "Unverified"
|
||||
profile: "profile"
|
||||
civilian.abbreviation: "Civ"
|
||||
rank: "Rank"
|
||||
leaders: "Leaders"
|
||||
none: "None"
|
||||
today: "Today"
|
||||
kills: "Kills"
|
||||
mostkilled: "Most Killed"
|
||||
killcount: "Kill Count"
|
||||
attacker: "Attacker"
|
||||
victim: "Victim"
|
||||
kill.death.ratio: "Kill/Death Ratio"
|
||||
nokillsfound: "No Kills Found"
|
||||
version.loaded: "[{0}] Version {1} loaded"
|
||||
promoted.to.leader: "{0} has been promoted to leader"
|
||||
denied.demotion: "{0} denied the demotion of {1}. Consensus failed."
|
||||
membership.invitation: "{0} has denied the membership invitation"
|
||||
joined.the.clan: "{0} has joined the clan"
|
||||
signed.off.request.cancelled: "{0} has signed off. {1} request cancelled."
|
||||
clan.deletion: "{0} denied the clan deletion. Consensus failed."
|
||||
has.been.disbanded: "Clan {0} has been disbanded"
|
||||
denied.the.promotion: "{0} denied the promotion of {1}. Consensus failed."
|
||||
demoted.back.to.member: "{0} has been demoted back to member"
|
||||
peace.agreement.denied: "The peace agreement with {0} was denied"
|
||||
denied.to.make.peace: "{0} has denied to make peace with {1}"
|
||||
broken.the.rivalry: "{0} has broken the rivalry with {1}"
|
||||
broken.the.rivalry.with: "{0} has broken the rivalry with {1}"
|
||||
the.alliance.was.denied: "The alliance with {0} was denied"
|
||||
denied.an.alliance: "{0} has denied an alliance with {1}"
|
||||
accepted.an.alliance: "{0} has accepted an alliance with {1}"
|
||||
created.an.alliance: "{0} has created an alliance with {1}"
|
||||
has.joined: "{0} has joined {1}"
|
||||
proposing.to.end.the.rivalry: "{0} is proposing to end the rivalry with {1}"
|
||||
proposing.an.alliance: "{0} is proposing an alliance with {1}"
|
||||
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}"
|
||||
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"
|
||||
mysql.connection.failed: "MySQL Connection failed"
|
||||
sqlite.connection.successful: "SQLite Connection successful"
|
||||
sqlite.connection.failed: " SQLite Connection failed"
|
||||
purging.player.data: "purging player''s data: {0}"
|
||||
purging.clan: "Purging clan: {0}"
|
||||
clan.players: "Clan players: {0}"
|
||||
clans: "Clans: {0}"
|
||||
banned: "You are banned from using clan commands"
|
||||
nothing.more.to.see: "Nothing more to see"
|
||||
nothing.to.deny: "Nothing to deny"
|
||||
no.leader.permissions: "You do not have leader permissions"
|
||||
you.have.already.voted: "You have already voted"
|
||||
has.voted.to.deny: "{0} has voted to deny"
|
||||
nothing.to.accept: "Nothing to accept"
|
||||
view.next.page: "Type /{0} to view next page."
|
||||
voted.to.accept: "{0} voted to accept"
|
||||
bulletin.board.header: "{0}* {1}{2} bulletin board"
|
||||
has.been.disbanded.rivalry.ended: "{0} has been disbanded. Rivalry has ended."
|
||||
has.been.disbanded.alliance.ended: "{0} has been disbanded. Alliance has ended."
|
||||
clan.disbanded: "Clan Disbanded"
|
||||
1.color.day: "1 {0}day"
|
||||
many.color.days: "{0}{1} days"
|
||||
does.not.match: "Does not match a clan command"
|
||||
simpleclans.command.failure: "SimpleClans command failure: {0}"
|
||||
insufficient.permissions: "Insufficient permissions"
|
||||
clan.is.not.verified: "Clan is not verified"
|
||||
not.a.member.of.any.clan: "You are not a member of any clan"
|
||||
minimum.to.make.alliance: "Your clan must have at least {0} players in order to make alliances"
|
||||
no.clan.matched: "No clan matched"
|
||||
cannot.ally.with.an.unverified.clan: "You cannot ally with an unverified clan"
|
||||
your.clans.are.not.allies: "Your clans are not allies"
|
||||
has.broken.the.alliance: "{0} has broken the alliance with {1}"
|
||||
at.least.one.leader.accept.the.alliance: "At least one leader of the allied must be online to accept the alliance"
|
||||
leaders.have.been.asked.for.an.alliance: "{0} leaders have been asked for an alliance"
|
||||
your.clans.are.already.allies: "Your clans are already allies"
|
||||
your.clan.cannot.create.rivals: "Your clan cannot create rivals"
|
||||
min.players.rivalries: "Your clan must have at least {0} players in order to make rivalries"
|
||||
this.player.is.already.banned: "This player is already banned"
|
||||
player.added.to.banned.list: "Player added to banned list"
|
||||
you.banned: "You have been banned from clan commands"
|
||||
cape.must.be.png: "The cape url must point to a png image"
|
||||
url.error: "The URL is retuning an error. Please verify that it is working."
|
||||
changed.the.clan.cape: "{0} has changed the clan''s cape"
|
||||
clan.wide.friendly.fire.blocked: "Clan-wide friendly-fire blocked"
|
||||
clan.wide.friendly.fire.is.allowed: "Clan-wide friendly-fire is allowed"
|
||||
only.trusted.players.can.access.clan.coords: "Only trusted players can access clan coords"
|
||||
you.are.the.only.member.online: "You are the only member online"
|
||||
your.clan.tag.cannot.be.longer.than.characters: "Your clan''s tag cannot be longer than {0} characters"
|
||||
your.clan.tag.must.be.longer.than.characters: "Your clan''s tag must be longer than {0} characters"
|
||||
your.tag.cannot.contain.the.following.colors: "Your tag cannot contain the following colors: {0}"
|
||||
your.tag.cannot.contain.color.codes: "Your tag cannot contain color codes"
|
||||
your.clan.name.cannot.be.longer.than.characters: "Your clan''s name cannot be longer than {0} characters"
|
||||
your.clan.name.must.be.longer.than.characters: "Your clan''s name must be longer than {0} characters"
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes: "Your clan''s tag can only contain letters, numbers, and color codes"
|
||||
your.clan.name.cannot.contain.color.codes: "Your clan''s name cannot contain color codes"
|
||||
that.tag.name.is.disallowed: "That tag name is disallowed"
|
||||
you.must.first.resign: "You must first resign from {0}"
|
||||
clan.with.this.tag.already.exists: "A clan with this tag already exists"
|
||||
get.your.clan.verified.to.access.advanced.features: "Get your clan verified to access advanced features"
|
||||
clan.created: "Clan {0} created"
|
||||
leaders.must.be.online.to.vote.on.demotion: "All leaders other than the demoted must be online to vote on this demotion"
|
||||
demotion.vote.has.been.requested.from.all.leaders: "Demotion vote has been requested from all leaders"
|
||||
player.is.not.a.leader.of.your.clan: "The player is not a leader of your clan"
|
||||
clan.has.been.disbanded: "Clan {0} has been disbanded"
|
||||
clan.disband.vote.has.been.requested.from.all.leaders: "Clan disband vote has been requested from all leaders"
|
||||
friendy.fire.is.now.managed.by.your.clan: "Friendy-fire is now managed by your clan"
|
||||
personal.friendly.fire.is.set.to.allowed: "Personal friendly-fire is set to allowed"
|
||||
global.friendy.fire.is.now.managed.by.each.clan: "Global friendy-fire is now managed by each clan"
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan: "Global friendy-fire is already being managed by each clan"
|
||||
global.friendly.fire.is.set.to.allowed: "Global friendly-fire is set to allowed"
|
||||
global.friendly.fire.is.already.being.allowed: "Global friendly-fire is already being allowed"
|
||||
no.player.matched: "No player matched"
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans: "The player doesn''t not have the permissions to join clans"
|
||||
you.cannot.invite.yourself: "You cannot invite yourself"
|
||||
this.player.is.banned.from.using.clan.commands: "This player is banned from using clan commands"
|
||||
the.player.is.already.member.of.another.clan: "The player is already member of another clan"
|
||||
has.been.asked.to.join: "{0} has been asked to join {1}"
|
||||
you.cannot.kick.yourself: "You cannot kick yourself"
|
||||
the.player.is.not.a.member.of.your.clan: "The player is not a member of your clan"
|
||||
you.cannot.kick.another.leader: "You cannot kick another leader"
|
||||
has.been.kicked.by: "{0} has been kicked by {1}"
|
||||
no.clans.have.been.created: "No clans have been created"
|
||||
total.clans: "Total clans:"
|
||||
legend: "Legend:"
|
||||
kill.type.civilian: "Kill Type: {0}Civilian"
|
||||
no.player.data.found: "No player data found"
|
||||
kill.type.0: "Kill Type: {0}"
|
||||
s.player.info: "{0}''s player info"
|
||||
clan.0: "Clan: {0}"
|
||||
status.0: "Status: {0}"
|
||||
rank.0: "Rank: {0}"
|
||||
kdr.0: "KDR: {0}"
|
||||
deaths.0: "Deaths: {0}"
|
||||
join.date.0: "Join Date: {0}"
|
||||
last.seen.0: "Last Seen: {0}"
|
||||
past.clans.0: "Past Clans: {0}"
|
||||
inactive.0: "Inactive: {0}"
|
||||
kill.totals: "Kill Totals:"
|
||||
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}"
|
||||
name.0: "Name: {0}"
|
||||
leaders.0: "Leaders: {0}"
|
||||
members.online.0: "Members Online: {0}"
|
||||
allies.0: "Allies: {0}"
|
||||
rivals.0: "Rivals: {0}"
|
||||
founded.0: "Founded: {0}"
|
||||
the.member.to.be.promoted.must.be.online: "The member to be promoted must be online"
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan: "The player does not have the permissions to lead a clan"
|
||||
you.cannot.promote.yourself: "You cannot promote yourself"
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion: "All leaders must be online to vote on this promotion"
|
||||
the.player.is.already.a.leader: "The player is already a leader"
|
||||
configuration.reloaded: "Configuration reloaded"
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan: "Last leader cannot resign.You must appoint another leader or disband the clan"
|
||||
0.has.resigned: "{0} has resigned"
|
||||
only.trusted.players.can.access.clan.stats: "Only trusted players can access clan stats"
|
||||
you.cannot.trust.yourself: "You cannot trust yourself"
|
||||
leaders.are.already.trusted: "Leaders are already trusted"
|
||||
this.player.is.already.trusted: "This player is already trusted"
|
||||
has.been.given.trusted.status.by: "{0} has been given trusted status by {1}"
|
||||
this.player.is.not.banned: "This player is not banned"
|
||||
player.removed.from.the.banned.list: "Player removed from the banned list"
|
||||
you.have.been.unbanned.from.clan.commands: "You have been unbanned from clan commands"
|
||||
you.cannot.untrust.yourself: "You cannot untrust yourself"
|
||||
leaders.cannot.be.untrusted: "Leaders cannot be untrusted"
|
||||
this.player.is.already.untrusted: "This player is already untrusted"
|
||||
has.been.given.untrusted.status.by: "{0} has been given untrusted status by {1}"
|
||||
the.clan.does.not.exist: "The clan does not exist"
|
||||
the.clan.is.already.verified: "The clan is already verified"
|
||||
the.clan.has.been.verified: "The clan has been verified"
|
||||
clan.0.has.been.verified: "Clan {0} has been verified!"
|
||||
only.trusted.players.can.access.clan.vitals: "Only trusted players can access clan vitals"
|
||||
total.clan.players.0: "Total clan players: {0}"
|
||||
proposing.war: "{0} is proposing to start a war with {1}"
|
||||
you.can.only.start.war.with.rivals: "You can only start war with rivals"
|
||||
leaders.have.been.asked.to.accept.the.war.request: "{0} leaders have been asked to accept the war request"
|
||||
leaders.asked.to.end.rivalry: "{0} leaders have been asked to end the war"
|
||||
proposing.to.end.the.war: "{0} is proposing to end the war with {1}"
|
||||
clans.already.at.war: "Your clans are already in war"
|
||||
clans.not.at.war: "Your clans are not at war"
|
||||
you.are.at.war: "{0} is now at war with {1}"
|
||||
denied.war.req: "{0} denied the war request sent by {1}"
|
||||
you.are.no.longer.at.war: "{0} is no longer at war with {1}"
|
||||
end.war.denied: "Request to end the war has been denied by {0}"
|
||||
denied.war.end: "{0} denied {1}''s request to end the war"
|
||||
0.war: "/{0} war{1} start/end [tag] - Start or end a war"
|
||||
has.initiated.a.rivalry: "{0} has initiated a rivalry with {1}"
|
||||
start: "start"
|
||||
end: "end"
|
||||
add: "add"
|
||||
remove: "remove"
|
||||
allow: "allow"
|
||||
block: "block"
|
||||
auto: "auto"
|
||||
war: "war"
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow: "{0}S=Sword{1}, {2}B=Bow{3}, {4}#=Arrows"
|
||||
weapon.S: "S"
|
||||
weapon.B: "B"
|
||||
weapon.A: "A"
|
||||
materials: "Materials"
|
||||
armor.h: "H"
|
||||
armor.c: "C"
|
||||
armor.l: "L"
|
||||
armor.B: "B"
|
||||
diamond: "diamond"
|
||||
gold: "gold"
|
||||
wood: "wood"
|
||||
server.announce: "Server Announce"
|
||||
clan.announce: "Clan Announce"
|
||||
leader.announce: "Leader Announce"
|
||||
hunger: "Hunger"
|
||||
stone: "Stone"
|
||||
iron: "Iron"
|
||||
the.clan.cannot.be.rivaled: "The clan cannot be rivaled"
|
||||
capeoff: "Cape toggled off"
|
||||
capeon: "Cape toggled on"
|
||||
bboff: "BB toggled off"
|
||||
bbon: "BB toggled on"
|
||||
tagoff: "Tag toggled off"
|
||||
tagon: "Tag toggled on"
|
||||
depositon: "Deposit toggled on"
|
||||
depositoff: "Deposit toggled off"
|
||||
withdrawon: "Withdraw toggled on"
|
||||
withdrawoff: "Withdraw toggled off"
|
||||
home.base.only.once: "Home base can only be set once"
|
||||
now.at.homebase: "You are now at {0}''s home base"
|
||||
hombase.set: "Clan home-base set to: {0}"
|
||||
hombase.cleared: "Clan home-base cleared"
|
||||
hombase.mod.set: "{0}''s home-base set to:"
|
||||
hombase.not.set: "Home-base not set"
|
||||
rival.limit.reached: "You have reached the rival limit. You cannot rival any more clans."
|
||||
you.moved.teleport.cancelled: "You moved, teleport cancelled"
|
||||
waiting.for.teleport.stand.still.for.0.seconds: "Waiting for teleport, stand still for {0} seconds"
|
||||
no.teleport: "You are not allowed to teleport to that location"
|
||||
on: "on"
|
||||
off: "off"
|
||||
leave: "leave"
|
||||
join: "join"
|
||||
mute: "mute"
|
||||
player.rank.changed: "Rank has been set"
|
||||
your.clans.are.already.rivals: "Your clans are already rivals"
|
||||
player.got.money: "You got {0} for killing {1} based on you KDR: {2}"
|
||||
cleared.bb: "Cleared the bulletin board"
|
||||
clan.balance: "Clan-Balance: {0}"
|
||||
bb.clan.deposit: "{0} $ were deposited"
|
||||
player.clan.deposit: "You deposited {0}"
|
||||
bb.clan.withdraw: "{0} $ were withdrawn"
|
||||
player.clan.withdraw: "You withdraw {0}"
|
||||
clan.bank.not.enough.money: "Your clans bank has not enough money"
|
||||
your.clans.are.not.rivals: "Your clans are not rivals"
|
||||
you.cannot.rival.your.own.clan: "You cannot rival your own clan"
|
||||
the.clan.members.reached.limit: "Your clan members reached limit"
|
||||
you.have.reseted.your.kdr: "You have reseted your KDR"
|
||||
you.have.reseted.0.kdr: "You have reseted {0}''s KDR"
|
||||
you.have.reseted.kdr.of.all.players: "You have reseted the KDR of all players"
|
||||
@@ -1,417 +0,0 @@
|
||||
create.command: "create"
|
||||
list.command: "list"
|
||||
profile.command: "profile"
|
||||
roster.command: "roster"
|
||||
lookup.command: "lookup"
|
||||
leaderboard.command: "leaderboard"
|
||||
alliances.command: "alliances"
|
||||
rivalries.command: "rivalries"
|
||||
vitals.command: "vitals"
|
||||
coords.command: "coords"
|
||||
stats.command: "stats"
|
||||
ally.command: "ally"
|
||||
rival.command: "rival"
|
||||
bb.command: "bb"
|
||||
cape.command: "cape"
|
||||
modtag.command: "modtag"
|
||||
toggle.command: "toggle"
|
||||
invite.command: "invite"
|
||||
kick.command: "kick"
|
||||
bank.command: "bank"
|
||||
trust.command: "trust"
|
||||
untrust.command: "untrust"
|
||||
promote.command: "promote"
|
||||
demote.command: "demote"
|
||||
clanff.command: "clanff"
|
||||
ff.command: "ff"
|
||||
resign.command: "resign"
|
||||
disband.command: "disband"
|
||||
verify.command: "verify"
|
||||
ban.command: "ban"
|
||||
unban.command: "unban"
|
||||
reload.command: "reload"
|
||||
globalff.command: "globalff"
|
||||
kills.command: "kills"
|
||||
mostkilled.command: "mostkilled"
|
||||
war.command: "war"
|
||||
home.command: "home"
|
||||
setrank.command: "setrank"
|
||||
place.command: "place"
|
||||
resetkdr.command: "resetkdr"
|
||||
usage.resetkdr: "Használat: /{0} resetkdr [all/player]"
|
||||
usage.clan.alliances: "Használat: /{0} alliances"
|
||||
usage.ally: "Használat: /{0} ally add/remove [címke]"
|
||||
usage.ban.unban: "Használat: /{0} ban/unban [játékos]"
|
||||
usage.rival: "Használat: /{0} rival add/remove [címke]"
|
||||
usage.war: "Használat: /{0} war start/end [címke]"
|
||||
usage.cape.url: "Használat: /{0} cape [url]"
|
||||
usage.setrank: "Használat: /{0} setrank [játékos] [rang], rangsor több világot is tartalmazhat és tartalmazhat &f színkódokat"
|
||||
usage.clanff: "Használat: /{0} clanff allow/block"
|
||||
usage.0.coords: "Használat: /{0} coords"
|
||||
usage.create.tag: "Használat: /{0} create [címke] [név]"
|
||||
usage.demote.leader: "Használat: /{0} demote [vezető]"
|
||||
usage.0.disband: "Használat: /{0} disband"
|
||||
usage.0.ff.allow.auto: "Használat: /{0} ff allow/auto"
|
||||
usage.0.globalff.allow.auto: "Használat: /{0} globalff allow/auto"
|
||||
usage.0.permissions.player: "Használat: /{0} permissions [klán] add/remove [jog]"
|
||||
usage.0.invite.player: "Használat: /{0} invite [játékos]"
|
||||
usage.kick.player: "Használat: /{0} kick [játékos]"
|
||||
usage.bank: "Használat: /{0} bank withdraw/deposit/status [mennyiség]"
|
||||
usage.0.modtag.tag: "Használat: /{0} modtag [címke]"
|
||||
usage.list: "Használat: /{0} list"
|
||||
usage.lookup.tag: "Használat: /{0} lookup [címke]"
|
||||
usage.0.profile.tag: "Használat: /{0} profile [címke]"
|
||||
usage.0.promote.member: "Használat: /{0} promote <tag>"
|
||||
usage.0.rivalries: "Használat: /{0} rivalries"
|
||||
usage.0.roster.tag: "Használat: /{0} roster [címke]"
|
||||
usage.0.stats: "Használat: /{0} stats"
|
||||
usage.0.trust.player: "Használat: /{0} trust [játékos]"
|
||||
usage.0.untrust.player: "Használat: /{0} untrust [játékos]"
|
||||
usage.0.verify.tag: "Használat: /{0} verify [címke]"
|
||||
usage.0.vitals: "Használat: /{0} vitals"
|
||||
usage.0.place: "Használat: /{0} place [player] [címke]"
|
||||
usage.0.leaderboard: "Használat: /{0} leaderboard"
|
||||
0.reload.1.reload.configuration: "/{0} reload{1} - Konfiguráció újratöltése"
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire: "/{0} globalff allow/auto {1} - Beállítsa a globális barátságot"
|
||||
0.place: "/{0} place [player] [címke]{1} - Berak egy játékost egy klánba"
|
||||
0.ban.unban.player.1.ban.unban.a.player: "/{0} ban/unban [játékos]{1} - Kitiltja/visszaengedi a játékost"
|
||||
0.hometp.clan.1.tp.home.a.clan: "/{0} home tp [clan]{1} - Elteleportálja minden klán otthonába"
|
||||
0.disband.tag.1.disband.a.clan: "/{0} disband [címke]{1} - Eltávolít egy klánt"
|
||||
0.resetkdr.1.resets.kdr: "/{0} resetkdr player/all{1} - Visszaállítsa az összes játékos KDR-jét vagy csak egy"
|
||||
0.resetkdr.1.resets.your.kdr: "/{0} resetkdr{1} - Visszaállítja KDR-t"
|
||||
0.verify.tag.1.verify.an.unverified.clan: "/{0} verify [címke]{1} - Ellenőrzi az ellenőrzött klánt"
|
||||
0.verify.1.purchase.verification.of.your.clan: "/{0} verify{1} - A klán megvásárlásának ellenőrzése"
|
||||
0.list.1.lists.all.clans: "/{0} list{1} - Az összes klán felsorolása"
|
||||
0.profile.1.view.your.clan.s.profile: "/{0} profile{1} - Megtekinti a klán profilját"
|
||||
0.profile.tag.1.view.a.clan.s.profile: "/{0} profile [címke]{1} - Klán profiljának megtekintése"
|
||||
0.lookup.1.lookup.your.info: "/{0} lookup{1} - Megkeresi az adatait"
|
||||
0.lookup.player.1.lookup.a.player.s.info: "/{0} lookup [játékos]{1} - Megkeresi a játékos információit"
|
||||
0.leaderboard.1.view.leaderboard: "/{0} leaderboard{1} - Megnézi a ranglistát"
|
||||
0.alliances.1.view.all.clan.alliances: "/{0} alliances{1} - Megtekinti az összes klán szövetséget"
|
||||
0.rivalries.1.view.all.clan.rivalries: "/{0} rivalries{1} - Megtekinti az összes klánversenyt"
|
||||
0.roster.1.view.your.clan.s.member.list: "/{0} roster{1} - Megtekinti a klán taglistáját"
|
||||
0.roster.tag.1.view.a.clan.s.member.list: "/{0} roster [címke]{1} - Egy osztály taglista megtekintéset"
|
||||
0.vitals.1.view.your.clan.member.s.vitals: "/{0} vitals{1} - Megtekinti a klántagod vitálását"
|
||||
0.coords.1.view.your.clan.member.s.coordinates: "/{0} coords{1} - Megtekinti a klántagod koordinátáit"
|
||||
0.stats.1.view.your.clan.member.s.stats: "/{0} stats{1} - Megtekinti a klántag statisztikáit"
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan: "/{0} ally add/remove [címke]{1} - Egy szövetséges klán hozzáadása/eltávolítása"
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan: "/{0} rival add/remove [címke]{1} - Egy rivális klán hozzáadása/eltávolítása"
|
||||
0.bb.1.display.bulletin.board: "/{0} bb{1} - Hirdetőtábla megjelenítése"
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board: "/{0} bb [msg]{1} - Üzenet hozzáadása a hirdetőtáblához"
|
||||
0.modtag.tag.1.modify.the.clan.s.tag: "/{0} modtag [címke]{1} - Módosítja a klán címkéjét"
|
||||
0.cape.url.1.change.your.clan.s.cape: "/{0} cape [url]{1} - Megváltoztatja a klánodat"
|
||||
0.invite.player.1.invite.a.player: "/{0} invite [játékos]{1} - Meghív egy játékost"
|
||||
0.kick.player.1.kick.a.player.from.the.clan: "/{0} kick [játékos]{1} - Kirúg egy játékost a klánból"
|
||||
0.trust.untrust.player.1.set.trust.level1: "/{0} trust [játékos]{1} - Beállítja a tagot megbízhatónak"
|
||||
0.trust.untrust.player.1.set.trust.level2: "/{0} untrust [játékos]{1} - Beállítja a tagot megbízhatatlannak"
|
||||
0.promote.member.1.promote.a.member.to.leader: "/{0} promote [tag]{1} - Támogat egy tagot vezetőnek"
|
||||
0.demote.leader.1.demote.a.leader.to.member: "/{0} demote [vezető]{1} - Vezet egy vezetőt a tagnak"
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire: "/{0} clanff allow/block{1} - Kapcsolja a klán baráti tüzet"
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire: "/{0} ff allow/auto{1} - Kapcsolja a személyes barátságos tüzet"
|
||||
0.toggle.command: "/{0} toggle [{2}]{1} - A személyes beállítások módosítása"
|
||||
0.resign.1.resign.from.the.clan: "/{0} resign{1} - Tiltakozik a klánról"
|
||||
0.disband.1.disband.your.clan: "/{0} disband{1} - Lehúzza a klánját"
|
||||
0.trust.setrank: "/{0} setrank [játékos] [rank]{1} - Ad egy rangot a játékosnak"
|
||||
0.create.tag.name.1.purchase.a.new.clan: "/{0} create [címke] [name]{1} - Vásárol egy új klánt"
|
||||
0.create.tag.name.1.create.a.new.clan: "/{0} create [címke] [name]{1} - Létrehoz egy új klánt"
|
||||
0.kills: "/{0} kills{1} - Megnézi az ölésedet"
|
||||
0.killsplayer: "/{0} kills [játékos]{1} - Megtekinti a játékos ölési számát"
|
||||
0.mostkilled: "/{0} mostkilled{1} - Megtekinti a kiszolgálón leggyakoribb ölési számokat"
|
||||
home-menu: "/{0} home{1} - Teleportálás a klán hazai bázisához"
|
||||
home-set-menu: "/{0} home set{1} - Beállítsa a klán hazai bázisát"
|
||||
home-clear-menu: "/{0} home clear{1} - Törli a klán hazai bázisát"
|
||||
home-regroup-menu: "/{0} home regroup [me]{1} - Áthelyezi az összes tagot a háziasított klán vagy magad számára"
|
||||
example.clan.modtag.4kfo.4l: "Példa: /clan modtag &4K&fo&4L"
|
||||
example.clan.create: "Példa: /clan create &4Kol labirintus lovagjai"
|
||||
clan: "Klán"
|
||||
allies: "Szövetségesek"
|
||||
alliances: "szövetségek"
|
||||
coords: "koordináták"
|
||||
name: "Név"
|
||||
distance: "Távolság"
|
||||
coords.upper: "Koordináták"
|
||||
world: "Világ"
|
||||
kdr: "KDR"
|
||||
members: "Tagok"
|
||||
clans.lower: "klánok"
|
||||
rival: "Vetélytárs"
|
||||
civilian: "Polgári"
|
||||
neutral: "Semleges"
|
||||
free.agent: "Szabadúszó"
|
||||
days: "nap"
|
||||
rivals: "Versenytárs"
|
||||
rivalries: "versengés"
|
||||
online: "Elérhető"
|
||||
player: "Játékos"
|
||||
seen: "Látott"
|
||||
leader: "vezető"
|
||||
roster: "névsor"
|
||||
trusted: "megbízható"
|
||||
untrusted: "megbízhatatlan"
|
||||
deaths: "Halálok"
|
||||
weights: "Súlyok"
|
||||
stats: "stats"
|
||||
health: "Élet"
|
||||
armor: "Páncél"
|
||||
weapons: "Fegyverek"
|
||||
food: "Étel"
|
||||
vitals: "nemes szervek"
|
||||
verified: "ellenőrzött"
|
||||
unverified: "Nem ellenőrzött"
|
||||
profile: "profil"
|
||||
civilian.abbreviation: "Polgár"
|
||||
rank: "Rang"
|
||||
leaders: "Vezetők"
|
||||
none: "Semmi"
|
||||
today: "Ma"
|
||||
kills: "Ölések"
|
||||
mostkilled: "Legtöbbször megölt"
|
||||
killcount: "Ölés számítás"
|
||||
attacker: "Támadó"
|
||||
victim: "Áldozat"
|
||||
kill.death.ratio: "Ölés/halál arány"
|
||||
nokillsfound: "Nincs ölések találva"
|
||||
version.loaded: "[{0}] Verzió {1} betöltve"
|
||||
promoted.to.leader: "{0} vezető szerepet kapott"
|
||||
denied.demotion: "{0} tagadta a lecsökkentését {1}. A konszenzus sikertelen volt."
|
||||
membership.invitation: "{0} tagadta a tagsági meghívást"
|
||||
joined.the.clan: "{0} csatlakozott a klánhoz"
|
||||
signed.off.request.cancelled: "{0} aláírták. {1} kérés törölve."
|
||||
clan.deletion: "{0} tagadta a klán törlését. A konszenzus sikertelen volt."
|
||||
has.been.disbanded: "A(z) {0} klán feloszlott"
|
||||
denied.the.promotion: "{0} tagadta a {1} promócióját. A konszenzus sikertelen volt."
|
||||
demoted.back.to.member: "{0} visszatért a taghoz"
|
||||
peace.agreement.denied: "A(z) {0} kötött békemegállapodást megtagadták"
|
||||
denied.to.make.peace: "{0} tagadta a békét a(z) {1}"
|
||||
broken.the.rivalry: "{0} megszüntette a versenyt {1}"
|
||||
broken.the.rivalry.with: "{0} megszüntette a versenyt {1}"
|
||||
the.alliance.was.denied: "A(z) {0} szövetség tagadta"
|
||||
denied.an.alliance: "{0} tagadta a szövetséget {1}"
|
||||
accepted.an.alliance: "{0} szövetséget kötött a(z) {1}"
|
||||
created.an.alliance: "{0} szövetséget kötött a(z) {1}"
|
||||
has.joined: "{0} csatlakozott {1}"
|
||||
proposing.to.end.the.rivalry: "{0} azt javasolja, hogy vessen véget a rivalizálás {1}"
|
||||
proposing.an.alliance: "{0} szövetséget javasol {1}"
|
||||
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}"
|
||||
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"
|
||||
mysql.connection.failed: "MySQL kapcsolat sikertelen"
|
||||
sqlite.connection.successful: "SQLite kapcsolat sikeres"
|
||||
sqlite.connection.failed: " SQLite kapcsolat sikertelen"
|
||||
purging.player.data: "tisztító játékos adatai: {0}"
|
||||
purging.clan: "Pusztító klán: {0}"
|
||||
clan.players: "Klán játékosok: {0}"
|
||||
clans: "Klánok: {0}"
|
||||
banned: "Kitiltottad a klánparancsok használatát"
|
||||
nothing.more.to.see: "Semmi többet látni"
|
||||
nothing.to.deny: "Semmi tagadni"
|
||||
no.leader.permissions: "Nincs vezető engedélye"
|
||||
you.have.already.voted: "Már szavaztál"
|
||||
has.voted.to.deny: "{0} tagadta a szavazást"
|
||||
nothing.to.accept: "Semmi elfogadni"
|
||||
view.next.page: "Típus /{0} a következő oldal megtekintéséhez."
|
||||
voted.to.accept: "{0} elfogadták"
|
||||
bulletin.board.header: "{0}* {1}{2} hirdetőtábla"
|
||||
has.been.disbanded.rivalry.ended: "{0} feloszlott. A rivalizálás véget ért."
|
||||
has.been.disbanded.alliance.ended: "{0} feloszlott. A Szövetség véget ért."
|
||||
clan.disbanded: "A klán megszűnt"
|
||||
1.color.day: "1 {0}nap"
|
||||
many.color.days: "{0}{1} nap"
|
||||
does.not.match: "Nem egyezik a klán parancsával"
|
||||
simpleclans.command.failure: "A SimpleClans parancs sikertelen: {0}"
|
||||
insufficient.permissions: "Nincs elegendő engedély"
|
||||
clan.is.not.verified: "A klán nem ellenőrzött"
|
||||
not.a.member.of.any.clan: "Nem vagy tagja semmilyen klánnak"
|
||||
minimum.to.make.alliance: "A klánnak legalább {0} játékosnak kell lennie ahhoz, hogy szövetségeket kössön"
|
||||
no.clan.matched: "Nincsenek klánok"
|
||||
cannot.ally.with.an.unverified.clan: "Nem tudsz szövetséget kötni egy be nem bizonyított klánnal"
|
||||
your.clans.are.not.allies: "A klánod nem szövetségesek"
|
||||
has.broken.the.alliance: "{0} megszakította a szövetséget {1}"
|
||||
at.least.one.leader.accept.the.alliance: "A szövetség legalább egy vezetőjének online kell lennie ahhoz, hogy elfogadja a szövetséget"
|
||||
leaders.have.been.asked.for.an.alliance: "A(z) {0} vezetők szövetségre szólítottak fel"
|
||||
your.clans.are.already.allies: "A klánod már szövetségesek"
|
||||
your.clan.cannot.create.rivals: "A klán nem hozhat létre riválisokat"
|
||||
min.players.rivalries: "A klánnak legalább {0} játékosnak kell lennie a rivalizálás érdekében"
|
||||
this.player.is.already.banned: "Ez a játékos már tiltott"
|
||||
player.added.to.banned.list: "A játékos hozzáadva a tiltott listához"
|
||||
you.banned: "Kitiltottad a klánparancsokból"
|
||||
cape.must.be.png: "A cape url-nek egy png képre kell mutatnia"
|
||||
url.error: "Az URL hibaüzenetet küld. Ellenőrizze, hogy működik-e."
|
||||
changed.the.clan.cape: "{0} megváltoztatta a klán kupáját"
|
||||
clan.wide.friendly.fire.blocked: "A klán egész barátságos tűz zárt"
|
||||
clan.wide.friendly.fire.is.allowed: "A Klánbarát barátságos tűz megengedett"
|
||||
only.trusted.players.can.access.clan.coords: "Csak a megbízható játékosok férhetnek hozzá a klánokhoz"
|
||||
you.are.the.only.member.online: "Te vagy az egyetlen tagja online"
|
||||
your.clan.tag.cannot.be.longer.than.characters: "A klán tagja legfeljebb {0} karakter lehet"
|
||||
your.clan.tag.must.be.longer.than.characters: "A klán tagjának hosszabbnak kell lennie, mint {0} karakter"
|
||||
your.tag.cannot.contain.the.following.colors: "A címke nem tartalmazhatja a következő színeket: {0}"
|
||||
your.clan.name.cannot.be.longer.than.characters: "A klán neve legfeljebb {0} karakter lehet"
|
||||
your.tag.cannot.contain.color.codes: "A címke nem tartalmazhat színkódokat"
|
||||
your.clan.name.must.be.longer.than.characters: "A klán neveinek {0} karakter hosszúnak kell lenniük"
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes: "A klán tagja csak betűket, számokat és színkódokat tartalmazhat"
|
||||
your.clan.name.cannot.contain.color.codes: "A klán neve nem tartalmazhat színkódokat"
|
||||
that.tag.name.is.disallowed: "A címke neve elutasítva"
|
||||
you.must.first.resign: "Először lemondania a {0}"
|
||||
clan.with.this.tag.already.exists: "Ezzel a címkével már létezik egy klán"
|
||||
get.your.clan.verified.to.access.advanced.features: "Szerezd meg a klánt, hogy ellenőrizze a speciális funkciók elérését"
|
||||
clan.created: "A(z) {0} klán létrehozva"
|
||||
leaders.must.be.online.to.vote.on.demotion: "A lefokozástól eltérő összes vezetőnek online kell lennie ahhoz, hogy szavazzon a lefokozásról"
|
||||
demotion.vote.has.been.requested.from.all.leaders: "Demotion szavazást kértek minden vezetőtől"
|
||||
player.is.not.a.leader.of.your.clan: "A játékos nem a klán egyik vezetője"
|
||||
clan.has.been.disbanded: "A(z) {0} klán feloszlott"
|
||||
clan.disband.vote.has.been.requested.from.all.leaders: "A klán feloszlatásáról szavazást kértek minden vezetőtől"
|
||||
friendy.fire.is.now.managed.by.your.clan: "A barátságos tüzet most kezeli a klán"
|
||||
personal.friendly.fire.is.set.to.allowed: "A személyes barátságos tűz megengedett"
|
||||
global.friendy.fire.is.now.managed.by.each.clan: "A globális barátságos tüzet minden egyes klán kezeli"
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan: "A globális barátságos tüzeket már kezelik minden egyes klán"
|
||||
global.friendly.fire.is.set.to.allowed: "A globális barátságos tűz megengedett"
|
||||
global.friendly.fire.is.already.being.allowed: "A globális barátságos tűz már engedélyezett"
|
||||
no.player.matched: "Nincs olyan játékos, aki megfelelt"
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans: "A játékosnak nincs joga a klánokhoz való csatlakozáshoz"
|
||||
you.cannot.invite.yourself: "Nem hívhatod meg magad"
|
||||
this.player.is.banned.from.using.clan.commands: "Ez a játékos tiltja a klánparancsok használatát"
|
||||
the.player.is.already.member.of.another.clan: "A játékos már tagja egy másik klánnak"
|
||||
has.been.asked.to.join: "{0} felkérést kapott, hogy csatlakozzon {1}"
|
||||
you.cannot.kick.yourself: "Nem tudod magadat kirúgni"
|
||||
the.player.is.not.a.member.of.your.clan: "A játékos nem tagja a klánnak"
|
||||
you.cannot.kick.another.leader: "Nem tehetsz meg egy másik vezetőt"
|
||||
has.been.kicked.by: "{0} kirúgva {1} által"
|
||||
no.clans.have.been.created: "Nem hoztak létre klánokat"
|
||||
total.clans: "Összes klán:"
|
||||
legend: "Legenda:"
|
||||
kill.type.civilian: "Ölés típus: {0} Civil"
|
||||
no.player.data.found: "Nincsenek játékosadatok"
|
||||
kill.type.0: "Ölés típus: {0}"
|
||||
s.player.info: "{0} játékos adatai"
|
||||
clan.0: "Klán: {0}"
|
||||
status.0: "Állapot: {0}"
|
||||
rank.0: "Rang: {0}"
|
||||
kdr.0: "KDR: {0}"
|
||||
deaths.0: "Halálok: {0}"
|
||||
join.date.0: "Csatlakozás dátuma: {0}"
|
||||
last.seen.0: "Utoljára látva: {0}"
|
||||
past.clans.0: "Múlt klánok: {0}"
|
||||
inactive.0: "Elérhetetlen(ek): {0}"
|
||||
kill.totals: "Összes ölés:"
|
||||
clan.commands: "klán parancsok"
|
||||
you.can.only.modify.the.color.and.case.of.the.tag: "Csak a címke színét és esetét módosíthatod"
|
||||
tag.changed.to.0: "A címke megváltoztatva {0}"
|
||||
name.0: "Név: {0}"
|
||||
leaders.0: "Vezetők: {0}"
|
||||
members.online.0: "Tagok online: {0}"
|
||||
allies.0: "Szövetségesek: {0}"
|
||||
rivals.0: "Vetélytárs(ak): {0}"
|
||||
founded.0: "Alapított: {0}"
|
||||
the.member.to.be.promoted.must.be.online: "A támogatni kívánt tagnak online-nak kell lennie"
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan: "A játékosnak nincs joga a klán vezetésére"
|
||||
you.cannot.promote.yourself: "Nem reklámozhatod magad"
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion: "Minden vezetőnek online kell szavaznia erről a promócióról"
|
||||
the.player.is.already.a.leader: "A játékos már vezető szerepet játszik"
|
||||
configuration.reloaded: "A konfiguráció újratöltve"
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan: "A legutóbbi vezető nem tud lemondani. Új vezetőt kell kijelölni vagy fel kell oszlatni a klánt"
|
||||
0.has.resigned: "{0} lemondott"
|
||||
only.trusted.players.can.access.clan.stats: "Csak a megbízható játékosok férhetnek hozzá a klánstatisztikákhoz"
|
||||
you.cannot.trust.yourself: "Nem bízhatsz magadban"
|
||||
leaders.are.already.trusted: "A vezetők már megbízhatóak"
|
||||
this.player.is.already.trusted: "Ez a játékos már megbízható"
|
||||
has.been.given.trusted.status.by: "{0} megbízható állapotot kapott {1} által"
|
||||
this.player.is.not.banned: "Ez a játékos nem tiltott"
|
||||
player.removed.from.the.banned.list: "A játékos eltávolítva a tiltott listáról"
|
||||
you.have.been.unbanned.from.clan.commands: "Vissza engedted a klánparancsoktól"
|
||||
you.cannot.untrust.yourself: "Nem bízhatsz magadban"
|
||||
leaders.cannot.be.untrusted: "A vezetők nem lehetnek megbízhatatlanok"
|
||||
this.player.is.already.untrusted: "Ez a játékos már nem megbízható"
|
||||
has.been.given.untrusted.status.by: "{0} megbízható állapotot kapott {1} által"
|
||||
the.clan.does.not.exist: "A klán nem létezik"
|
||||
the.clan.is.already.verified: "A klán már ellenőrzött"
|
||||
the.clan.has.been.verified: "A klán igazolt"
|
||||
clan.0.has.been.verified: "A(z) {0} klán ellenőrizve!"
|
||||
only.trusted.players.can.access.clan.vitals: "Csak a megbízható játékosok férhetnek hozzá a klánéletekhez"
|
||||
total.clan.players.0: "Összes klán játékos: {0}"
|
||||
proposing.war: "{0} azt javasolja, hogy indítsanak háborút {1} ellen"
|
||||
you.can.only.start.war.with.rivals: "Csak háborút kezdhet a riválisokkal"
|
||||
leaders.have.been.asked.to.accept.the.war.request: "A(z) {0} vezetőket felkérték, hogy fogadják el a háborús kérést"
|
||||
leaders.asked.to.end.rivalry: "A(z) {0} vezetőket felkérték, hogy vessenek véget a háborúnak"
|
||||
proposing.to.end.the.war: "{0} a háború befejezését javasolja {1}"
|
||||
clans.already.at.war: "A klánod már háborúban van"
|
||||
clans.not.at.war: "A klánod nincsenek háborúban"
|
||||
you.are.at.war: "{0} most háborúban van {1} ellen"
|
||||
denied.war.req: "{0} megtagadta {1} által küldött háborús kérést"
|
||||
you.are.no.longer.at.war: "{0} már nincs háborúban {1} ellen"
|
||||
end.war.denied: "A háború befejezésére irányuló kérelmet a(z) {0}"
|
||||
denied.war.end: "{0} tagadta {1} kérését a háború befejezésére"
|
||||
0.war: "/{0} war{1} start/end [tag] - Háború indítása vagy befejezése"
|
||||
has.initiated.a.rivalry: "{0} rivalizációt indított {1} ellen"
|
||||
start: "start"
|
||||
end: "end"
|
||||
add: "add"
|
||||
remove: "remove"
|
||||
allow: "allow"
|
||||
block: "block"
|
||||
auto: "auto"
|
||||
war: "war"
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow: "{0}S=Kard{1}, {2}B=Íj{3}, {4}#=Nyilak"
|
||||
weapon.S: "S"
|
||||
weapon.B: "B"
|
||||
weapon.A: "A"
|
||||
materials: "Anyagok"
|
||||
armor.h: "H"
|
||||
armor.c: "C"
|
||||
armor.l: "L"
|
||||
armor.B: "B"
|
||||
diamond: "diamond"
|
||||
gold: "gold"
|
||||
wood: "wood"
|
||||
server.announce: "Szerver bejelentés"
|
||||
clan.announce: "Klán bejelentés"
|
||||
leader.announce: "Vezetői bejelentés"
|
||||
hunger: "Éhség"
|
||||
stone: "Kő"
|
||||
iron: "Vas"
|
||||
the.clan.cannot.be.rivaled: "A klán nem lehet versengeni"
|
||||
capeoff: "A köpeny kikapcsolva"
|
||||
capeon: "A köpeny bekapcsolva"
|
||||
bboff: "BB kikapcsolva"
|
||||
bbon: "BB bekapcsolva"
|
||||
tagoff: "Tag kikapcsolva"
|
||||
tagon: "Címke bekapcsolva"
|
||||
depositon: "Letét bekapcsolva"
|
||||
depositoff: "Letét kikapcsolva"
|
||||
withdrawon: "Visszavonulás bekapcsolva"
|
||||
withdrawoff: "Visszavonulás kikapcsolva"
|
||||
home.base.only.once: "A bázis csak egyszer állítható be"
|
||||
now.at.homebase: "Most a(z) {0} székhelyen tartózkodsz"
|
||||
hombase.set: "Klán bázis beállítva: {0}"
|
||||
hombase.cleared: "Klán bázis törölve"
|
||||
hombase.mod.set: "{0} bázisa beállítva:"
|
||||
hombase.not.set: "Bázis nincs beállítva"
|
||||
rival.limit.reached: "Elérted a rivális limitet. Nem tehetsz többé klánokkal."
|
||||
you.moved.teleport.cancelled: "Elmozdultál, a teleportálás megszakítva"
|
||||
waiting.for.teleport.stand.still.for.0.seconds: "Várakozás a teleportálásra, állj meg {0} másodpercig"
|
||||
no.teleport: "Tilos teleportálni erre a helyre"
|
||||
on: "be"
|
||||
off: "ki"
|
||||
leave: "elhagy"
|
||||
join: "csatlakoz"
|
||||
mute: "mute"
|
||||
player.rank.changed: "A rang beállítva"
|
||||
your.clans.are.already.rivals: "A klánod már riválisok"
|
||||
player.got.money: "Megkaptad {0} a(z) {1} megöléséért KDR-ed alapján: {2}"
|
||||
cleared.bb: "Törölte a hirdetőtáblát"
|
||||
clan.balance: "Klán egyenleg: {0}"
|
||||
bb.clan.deposit: "{0} $ letétbe helyezték"
|
||||
player.clan.deposit: "Letétbe helyezted {0}"
|
||||
bb.clan.withdraw: "{0} $ visszavonták"
|
||||
player.clan.withdraw: "Visszavonsz {0}"
|
||||
clan.bank.not.enough.money: "A klán bankjaidnak nincs elég pénzük"
|
||||
your.clans.are.not.rivals: "A klánok nem riválisok"
|
||||
you.cannot.rival.your.own.clan: "Nem tudsz versengeni a saját klánoddal"
|
||||
the.clan.members.reached.limit: "A klán tagjai elérik a határt"
|
||||
you.have.reseted.your.kdr: "Visszaállítottad KDR-t"
|
||||
you.have.reseted.0.kdr: "Visszaállítottad a(z) {0} KDR-t"
|
||||
you.have.reseted.kdr.of.all.players: "Visszaállítottad a játékosok KDR-jét"
|
||||
@@ -1,403 +0,0 @@
|
||||
create.command: "创建"
|
||||
list.command: "列表"
|
||||
profile.command: "信息"
|
||||
roster.command: "名单"
|
||||
lookup.command: "详情"
|
||||
leaderboard.command: "排行榜"
|
||||
alliances.command: "联盟"
|
||||
rivalries.command: "敌对"
|
||||
vitals.command: "生命"
|
||||
coords.command: "坐标"
|
||||
stats.command: "统计"
|
||||
ally.command: "联盟"
|
||||
rival.command: "敌对"
|
||||
bb.command: "公告板"
|
||||
cape.command: "披风"
|
||||
modtag.command: "更改标签"
|
||||
toggle.command: "切换"
|
||||
invite.command: "邀请"
|
||||
kick.command: "移除"
|
||||
bank.command: "银行"
|
||||
trust.command: "信任"
|
||||
untrust.command: "取消信任"
|
||||
promote.command: "提升"
|
||||
demote.command: "降级"
|
||||
clanff.command: "帮派友军伤害"
|
||||
ff.command: "友军伤害"
|
||||
resign.command: "离开"
|
||||
disband.command: "解散"
|
||||
verify.command: "验证"
|
||||
ban.command: "封禁"
|
||||
unban.command: "解封"
|
||||
reload.command: "重载"
|
||||
globalff.command: "全局友军伤害"
|
||||
kills.command: "击杀"
|
||||
mostkilled.command: "死亡排名"
|
||||
war.command: "战争"
|
||||
home.command: "基地"
|
||||
setrank.command: "设置称号"
|
||||
place.command: "移动"
|
||||
usage.clan.alliances: "使用: /{0} alliances"
|
||||
usage.ally: "使用: /{0} ally add/remove [标签]"
|
||||
usage.ban.unban: "使用: /{0} ban/unban [玩家]"
|
||||
usage.rival: "使用: /{0} rival add/remove [标签]"
|
||||
usage.war: "使用: /{0} war start/end [标签]"
|
||||
usage.cape.url: "使用: /{0} cape [链接]"
|
||||
usage.setrank: "使用: /{0} setrank [玩家] [称号], 称号可以是多个词,可含有颜色代码"
|
||||
usage.clanff: "使用: /{0} clanff allow/block"
|
||||
usage.0.coords: "使用: /{0} coords"
|
||||
usage.create.tag: "使用: /{0} create [标签] [名称]"
|
||||
usage.demote.leader: "使用: /{0} demote [老大]"
|
||||
usage.0.disband: "使用: /{0} disband"
|
||||
usage.0.ff.allow.auto: "使用: /{0} ff allow/auto"
|
||||
usage.0.globalff.allow.auto: "使用: /{0} globalff allow/auto"
|
||||
usage.0.permissions.player: "使用: /{0} permissions [帮派] add/remove [权限]"
|
||||
usage.0.invite.player: "使用: /{0} invite [玩家]"
|
||||
usage.kick.player: "使用: /{0} kick [玩家]"
|
||||
usage.bank: "使用: /{0} bank withdraw/deposit/status [数量]"
|
||||
usage.0.modtag.tag: "使用: /{0} modtag [标签]"
|
||||
usage.list: "使用: /{0} list"
|
||||
usage.lookup.tag: "使用: /{0} lookup [标签]"
|
||||
usage.0.profile.tag: "使用: /{0} profile [标签]"
|
||||
usage.0.promote.member: "使用: /{0} promote <成员>"
|
||||
usage.0.rivalries: "使用: /{0} rivalries"
|
||||
usage.0.roster.tag: "使用: /{0} roster [标签]"
|
||||
usage.0.stats: "使用: /{0} stats"
|
||||
usage.0.trust.player: "使用: /{0} trust [玩家]"
|
||||
usage.0.untrust.player: "使用: /{0} untrust [玩家]"
|
||||
usage.0.verify.tag: "使用: /{0} verify [标签]"
|
||||
usage.0.vitals: "使用: /{0} vitals"
|
||||
usage.0.place: "使用: /{0} place [玩家] [标签]"
|
||||
usage.0.leaderboard: "使用: /{0} leaderboard"
|
||||
0.reload.1.reload.configuration: "/{0} reload{1} - 重载配置"
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire: "/{0} globalff allow/auto {1} - 设置全局友军伤害"
|
||||
0.place: "/{0} place [玩家] [标签]{1} - 将玩家加入帮派"
|
||||
0.ban.unban.player.1.ban.unban.a.player: "/{0} ban/unban [玩家]{1} - 封禁/解封一个玩家"
|
||||
0.hometp.clan.1.tp.home.a.clan: "/{0} home tp [帮派]{1} - 传送至帮派基地"
|
||||
0.disband.tag.1.disband.a.clan: "/{0} disband [标签]{1} - 解禁帮派"
|
||||
0.verify.tag.1.verify.an.unverified.clan: "/{0} verify [标签]{1} - 验证一个帮派"
|
||||
0.verify.1.purchase.verification.of.your.clan: "/{0} verify{1} - 付费验证你的帮派"
|
||||
0.list.1.lists.all.clans: "/{0} list{1} - 列出所有帮派"
|
||||
0.profile.1.view.your.clan.s.profile: "/{0} profile{1} - 查看你的帮派的信息"
|
||||
0.profile.tag.1.view.a.clan.s.profile: "/{0} profile [标签]{1} - 查看帮派信息"
|
||||
0.lookup.1.lookup.your.info: "/{0} lookup{1} - Lookup your info"
|
||||
0.lookup.player.1.lookup.a.player.s.info: "/{0} lookup [玩家]{1} - 查看玩家信息"
|
||||
0.leaderboard.1.view.leaderboard: "/{0} leaderboard{1} - 查看排行榜"
|
||||
0.alliances.1.view.all.clan.alliances: "/{0} alliances{1} - 查看帮派联盟"
|
||||
0.rivalries.1.view.all.clan.rivalries: "/{0} rivalries{1} - 查看帮派敌对"
|
||||
0.roster.1.view.your.clan.s.member.list: "/{0} roster{1} - 查看你的帮派的成员列表"
|
||||
0.roster.tag.1.view.a.clan.s.member.list: "/{0} roster [标签]{1} - 查看帮派的成员列表"
|
||||
0.vitals.1.view.your.clan.member.s.vitals: "/{0} vitals{1} - 查看你的帮派玩家的生命"
|
||||
0.coords.1.view.your.clan.member.s.coordinates: "/{0} coords{1} - 查看你的帮派玩家的坐标"
|
||||
0.stats.1.view.your.clan.member.s.stats: "/{0} stats{1} - 查看你的帮派玩家的统计"
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan: "/{0} ally add/remove [标签]{1} - 添加/移除一个联盟帮派"
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan: "/{0} rival add/remove [标签]{1} - 添加/移除一个敌对帮派"
|
||||
0.bb.1.display.bulletin.board: "/{0} bb{1} - 显示公告板"
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board: "/{0} bb [msg]{1} - 添加信息到公告板"
|
||||
0.modtag.tag.1.modify.the.clan.s.tag: "/{0} modtag [标签]{1} - 更改帮派标签"
|
||||
0.cape.url.1.change.your.clan.s.cape: "/{0} cape [url]{1} - 更改帮派披风"
|
||||
0.invite.player.1.invite.a.player: "/{0} invite [玩家]{1} - 邀请玩家"
|
||||
0.kick.player.1.kick.a.player.from.the.clan: "/{0} kick [玩家]{1} - 将玩家踢出帮派"
|
||||
0.trust.untrust.player.1.set.trust.level1: "/{0} trust [玩家]{1} - 设置成员为信任"
|
||||
0.trust.untrust.player.1.set.trust.level2: "/{0} untrust [玩家]{1} - 取消成员信任"
|
||||
0.promote.member.1.promote.a.member.to.leader: "/{0} promote [member]{1} - 提升一个成员为老大"
|
||||
0.demote.leader.1.demote.a.leader.to.member: "/{0} demote [leader]{1} - 降级一个老大为成员"
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire: "/{0} clanff allow/block{1} - 切换帮派的友军伤害"
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire: "/{0} ff allow/auto{1} - 切换个人的友军伤害"
|
||||
0.toggle.command: "/{0} toggle [{2}]{1} - 切换个人设置"
|
||||
0.resign.1.resign.from.the.clan: "/{0} resign{1} - 离开目前的帮派"
|
||||
0.disband.1.disband.your.clan: "/{0} disband{1} - 解散你的帮派"
|
||||
0.trust.setrank: "/{0} setrank [玩家] [rank]{1} - 给成员称号"
|
||||
0.create.tag.name.1.purchase.a.new.clan: "/{0} create [标签] [name]{1} - 购买新的帮派"
|
||||
0.create.tag.name.1.create.a.new.clan: "/{0} create [标签] [name]{1} - 创建新的帮派"
|
||||
0.kills: "/{0} kills{1} - 查看你的击杀量"
|
||||
0.killsplayer: "/{0} kills [玩家]{1} - 查看玩家的击杀量"
|
||||
0.mostkilled: "/{0} mostkilled{1} - 查看全服死亡排名"
|
||||
home-menu: "/{0} home{1} - 传送至帮派基地"
|
||||
home-set-menu: "/{0} home set{1} - 设置帮派基地"
|
||||
home-clear-menu: "/{0} home clear{1} - 清除帮派基地"
|
||||
example.clan.modtag.4kfo.4l: "示例: /clan modtag &4帅"
|
||||
example.clan.create: "示例: /clan create &4大帅比"
|
||||
clan: "帮派"
|
||||
allies: "联盟"
|
||||
alliances: "联盟"
|
||||
coords: "坐标"
|
||||
name: "名称"
|
||||
distance: "距离"
|
||||
coords.upper: "坐标"
|
||||
world: "世界"
|
||||
kdr: "KD"
|
||||
members: "成员"
|
||||
clans.lower: "帮派"
|
||||
rival: "敌对"
|
||||
civilian: "平民"
|
||||
neutral: "中立"
|
||||
free.agent: "Free Agent"
|
||||
days: "天"
|
||||
rivals: "敌对"
|
||||
rivalries: "敌对"
|
||||
online: "在线"
|
||||
player: "玩家"
|
||||
seen: "上线"
|
||||
leader: "老大"
|
||||
roster: "名单"
|
||||
trusted: "信任"
|
||||
untrusted: "失信"
|
||||
deaths: "死亡"
|
||||
weights: "权重"
|
||||
stats: "统计"
|
||||
health: "生命"
|
||||
armor: "护甲"
|
||||
weapons: "武器"
|
||||
food: "食物"
|
||||
vitals: "生命"
|
||||
verified: "已验证"
|
||||
unverified: "未验证"
|
||||
profile: "信息"
|
||||
civilian.abbreviation: "平民"
|
||||
rank: "称号"
|
||||
leaders: "老大"
|
||||
none: "无"
|
||||
today: "今天"
|
||||
kills: "击杀"
|
||||
mostkilled: "最多死亡"
|
||||
killcount: "击杀数"
|
||||
attacker: "攻击者"
|
||||
victim: "死者"
|
||||
kill.death.ratio: "KD 比值"
|
||||
nokillsfound: "无击杀"
|
||||
version.loaded: "[{0}] 版本 {1} 已加载"
|
||||
promoted.to.leader: "{0} 被提升为老大"
|
||||
denied.demotion: "{0} 拒绝了对 {1} 的降级. 未达成共识."
|
||||
membership.invitation: "{0} 拒绝了邀请"
|
||||
joined.the.clan: "{0} 加入了帮派"
|
||||
signed.off.request.cancelled: "{0} 已经下线. {1} 请求取消."
|
||||
clan.deletion: "{0} 拒绝了帮派删除. 未达成共识."
|
||||
has.been.disbanded: "帮派 {0} 已经解散"
|
||||
denied.the.promotion: "{0} 拒绝了对 {1} 的提升. 未达成共识."
|
||||
demoted.back.to.member: "{0} 被降级为普通成员"
|
||||
peace.agreement.denied: "和 {0} 的和平请求被拒绝"
|
||||
denied.to.make.peace: "{0} 拒绝了与 {1} 和好"
|
||||
broken.the.rivalry: "{0} 停止与 {1} 的敌对"
|
||||
broken.the.rivalry.with: "{0} 停止了与 {1} 的敌对"
|
||||
the.alliance.was.denied: "与 {0} 的联盟被拒绝"
|
||||
denied.an.alliance: "{0} 拒绝了 {1} 的联盟"
|
||||
accepted.an.alliance: "{0} 接受了 {1} 的联盟"
|
||||
created.an.alliance: "{0} 建立了与 {1} 的联盟"
|
||||
has.joined: "{0} 已经加入了 {1}"
|
||||
proposing.to.end.the.rivalry: "{0} 正在建议停止与 {1} 的敌对"
|
||||
proposing.an.alliance: "{0} 正在建议与 {1} 联盟"
|
||||
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}"
|
||||
not.sufficient.money: "您的账户没有足够的资金"
|
||||
account.has.been.debited: "你的账户已经被扣除了 {0}"
|
||||
mysql.connection.successful: "MySQL 连接成功"
|
||||
mysql.connection.failed: "MySQL 连接成功"
|
||||
sqlite.connection.successful: "SQLite 连接成功"
|
||||
sqlite.connection.failed: " SQLite 连接失败"
|
||||
purging.player.data: "正在清除玩家数据: {0}"
|
||||
purging.clan: "正在清除帮派: {0}"
|
||||
clan.players: "帮派玩家: {0}"
|
||||
clans: "帮派: {0}"
|
||||
banned: "你被禁止使用帮派命令"
|
||||
nothing.more.to.see: "没有更多"
|
||||
nothing.to.deny: "没有拒绝的事务"
|
||||
no.leader.permissions: "你没有老大权限"
|
||||
you.have.already.voted: "你已经投票了"
|
||||
has.voted.to.deny: "{0} 投了拒绝票"
|
||||
nothing.to.accept: "没有可接受的事务"
|
||||
view.next.page: "输入 /{0} 查看下一页."
|
||||
voted.to.accept: "{0} 投了接受票"
|
||||
bulletin.board.header: "{0}* {1}{2} 公告板"
|
||||
has.been.disbanded.rivalry.ended: "{0} 解散了. 敌对终结了."
|
||||
has.been.disbanded.alliance.ended: "{0} 解散了. 联盟终结了."
|
||||
clan.disbanded: "帮派已解散"
|
||||
1.color.day: "1 {0}天"
|
||||
many.color.days: "{0}{1} 天"
|
||||
does.not.match: "没有匹配的帮派命令"
|
||||
simpleclans.command.failure: "SimpleClans 命令失败: {0}"
|
||||
insufficient.permissions: "权限不足"
|
||||
clan.is.not.verified: "帮派未验证"
|
||||
not.a.member.of.any.clan: "你不是任何帮派的成员"
|
||||
minimum.to.make.alliance: "你的帮派至少要有 {0} 名玩家才能建立联盟"
|
||||
no.clan.matched: "没有匹配的帮派"
|
||||
cannot.ally.with.an.unverified.clan: "你不能和未验证的帮派建立联盟"
|
||||
your.clans.are.not.allies: "你的帮派不是联盟"
|
||||
has.broken.the.alliance: "{0} 停止了与 {1} 的联盟"
|
||||
at.least.one.leader.accept.the.alliance: "至少一个老大在线才能接受联盟"
|
||||
leaders.have.been.asked.for.an.alliance: "{0} 老大请求联盟"
|
||||
your.clans.are.already.allies: "你的帮派已经联盟"
|
||||
your.clan.cannot.create.rivals: "你的帮派不能创建敌对帮派"
|
||||
min.players.rivalries: "你的帮派至少要有 {0} 名玩家才能建立敌对"
|
||||
this.player.is.already.banned: "这个玩家已经被封禁"
|
||||
player.added.to.banned.list: "玩家添加至封禁列表"
|
||||
you.banned: "你被禁止使用帮派命令"
|
||||
cape.must.be.png: "披风链接必须指向一个 PNG 图片"
|
||||
url.error: "URL 返回了一个错误. 请检查是否正确."
|
||||
changed.the.clan.cape: "{0} 更改了帮派披风"
|
||||
clan.wide.friendly.fire.blocked: "帮派友军伤害已经禁止"
|
||||
clan.wide.friendly.fire.is.allowed: "帮派友军伤害已经启用"
|
||||
only.trusted.players.can.access.clan.coords: "只有信任的成员能够前往公会基地"
|
||||
you.are.the.only.member.online: "你是唯一在线的成员"
|
||||
your.clan.tag.cannot.be.longer.than.characters: "你的帮派的标签不能超过 {0} 字符"
|
||||
your.clan.tag.must.be.longer.than.characters: "你的帮派的标签必须超过 {0} 字符"
|
||||
your.tag.cannot.contain.the.following.colors: "帮派的标签不能含有以下颜色: {0}"
|
||||
your.clan.name.cannot.be.longer.than.characters: "你的帮派的名称不能超过 {0} 字符"
|
||||
your.clan.name.must.be.longer.than.characters: "你的帮派的名称必须超过 {0} 字符"
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes: "帮派的标签只能含有字母、数字和颜色代码
|
||||
your.clan.name.cannot.contain.color.codes: "帮派的名称不能含有颜色"
|
||||
that.tag.name.is.disallowed: "这个标签名不被允许"
|
||||
you.must.first.resign: "你必须先离开 {0}"
|
||||
clan.with.this.tag.already.exists: "此标签的帮派已经存在"
|
||||
get.your.clan.verified.to.access.advanced.features: "验证你的帮派以使用高级功能"
|
||||
clan.created: "帮派 {0} 创建了"
|
||||
leaders.must.be.online.to.vote.on.demotion: "除了此降级的老大以外的所有老大必须全部在线才能降级"
|
||||
demotion.vote.has.been.requested.from.all.leaders: "所有老大都要求降级"
|
||||
player.is.not.a.leader.of.your.clan: "这个玩家不是你的帮派的老大"
|
||||
clan.has.been.disbanded: "帮派 {0} 已经解散了"
|
||||
clan.disband.vote.has.been.requested.from.all.leaders: "所有老大都要求解散帮派"
|
||||
friendy.fire.is.now.managed.by.your.clan: "友军伤害现在由您的帮派管理"
|
||||
personal.friendly.fire.is.set.to.allowed: "个人的友军伤害已经开启"
|
||||
global.friendy.fire.is.now.managed.by.each.clan: "全局的友军伤害现在由各个帮派管理"
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan: "全局的友军伤害已经由各个帮派管理了"
|
||||
global.friendly.fire.is.set.to.allowed: "全局的友军伤害已经启用"
|
||||
global.friendly.fire.is.already.being.allowed: "全局的友军伤害已经启用了"
|
||||
no.player.matched: "没有匹配的玩家"
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans: "玩家没有加入此帮派的权限"
|
||||
you.cannot.invite.yourself: "你不能邀请你自己"
|
||||
this.player.is.banned.from.using.clan.commands: "此玩家被禁止使用此命令"
|
||||
the.player.is.already.member.of.another.clan: "此玩家已经是其他帮派的成员了"
|
||||
has.been.asked.to.join: "{0} 已经被请求加入 {1} 了"
|
||||
you.cannot.kick.yourself: "你不能踢出你自己"
|
||||
the.player.is.not.a.member.of.your.clan: "此玩家不是你的帮派的成员"
|
||||
you.cannot.kick.another.leader: "你不能踢出另一个老大"
|
||||
has.been.kicked.by: "{0} 已经被 {1} 踢出了"
|
||||
no.clans.have.been.created: "没有帮派被创建"
|
||||
total.clans: "总帮派:"
|
||||
legend: "Legend:"
|
||||
kill.type.civilian: "击杀种类: {0}平民"
|
||||
no.player.data.found: "没有找到玩家数据"
|
||||
kill.type.0: "击杀种类: {0}"
|
||||
s.player.info: "{0} 的玩家信息"
|
||||
clan.0: "帮派: {0}"
|
||||
status.0: "状态: {0}"
|
||||
rank.0: "称号: {0}"
|
||||
kdr.0: "KD: {0}"
|
||||
deaths.0: "死亡: {0}"
|
||||
join.date.0: "加入日期: {0}"
|
||||
last.seen.0: "最后上线: {0}"
|
||||
past.clans.0: "曾经的帮派: {0}"
|
||||
inactive.0: "不活跃: {0}"
|
||||
kill.totals: "总击杀:"
|
||||
clan.commands: "帮派命令"
|
||||
you.can.only.modify.the.color.and.case.of.the.tag: "你只能更改标签的颜色和大小写"
|
||||
tag.changed.to.0: "标签更改为 {0}"
|
||||
name.0: "名称: {0}"
|
||||
leaders.0: "老大: {0}"
|
||||
members.online.0: "在线成员: {0}"
|
||||
allies.0: "联盟: {0}"
|
||||
rivals.0: "敌对: {0}"
|
||||
founded.0: "成立: {0}"
|
||||
the.member.to.be.promoted.must.be.online: "提升的成员必须在线"
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan: "玩家没有做老大的权限"
|
||||
you.cannot.promote.yourself: "你不能提升你自己"
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion: "所有老大必须在线投票此提升"
|
||||
the.player.is.already.a.leader: "玩家已经是老大了"
|
||||
configuration.reloaded: "配置已重载 by 754503921"
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan: "最后一位老大不能离职,你必须指定另一个老大或者解散此帮派"
|
||||
0.has.resigned: "{0} 已经离职"
|
||||
only.trusted.players.can.access.clan.stats: "只有信任的成员能够查看统计"
|
||||
you.cannot.trust.yourself: "你不能信任你自己"
|
||||
leaders.are.already.trusted: "老大已经被信任"
|
||||
this.player.is.already.trusted: "此玩家已经被信任"
|
||||
has.been.given.trusted.status.by: "{0} 已经被 {1} 信任了"
|
||||
this.player.is.not.banned: "此玩家未被封禁"
|
||||
player.removed.from.the.banned.list: "玩家从封禁名单中移除"
|
||||
you.have.been.unbanned.from.clan.commands: "你被使用帮派命令解禁了"
|
||||
you.cannot.untrust.yourself: "你不能不信任你自己"
|
||||
leaders.cannot.be.untrusted: "老大不能被取消信任"
|
||||
this.player.is.already.untrusted: "此玩家已经不被信任了"
|
||||
has.been.given.untrusted.status.by: "{0} 已经被 {1} 不信任了"
|
||||
the.clan.does.not.exist: "此帮派不存在"
|
||||
the.clan.is.already.verified: "此帮派已经验证了"
|
||||
the.clan.has.been.verified: "此帮派已经验证"
|
||||
clan.0.has.been.verified: "帮派 {0} 已经被验证!"
|
||||
only.trusted.players.can.access.clan.vitals: "只有信任的成员能够查看帮派生命"
|
||||
total.clan.players.0: "总帮派玩家: {0}"
|
||||
proposing.war: "{0} 正在请求与 {1} 的战争"
|
||||
you.can.only.start.war.with.rivals: "你只能和敌对帮派展开战争"
|
||||
leaders.have.been.asked.to.accept.the.war.request: "{0} 老大已经被请求接受战争请求"
|
||||
leaders.asked.to.end.rivalry: "{0} 老大已经被请求接受停战请求"
|
||||
proposing.to.end.the.war: "{0} 正在请求与 {1} 停战"
|
||||
clans.already.at.war: "你的帮派已经处于战争中了"
|
||||
clans.not.at.war: "你的帮派没有处于战争中"
|
||||
you.are.at.war: "{0} 现在与 {1} 开战"
|
||||
denied.war.req: "{0} 拒绝了 {1} 发送的开战请求"
|
||||
you.are.no.longer.at.war: "{0} 不再与 {1} 战争了"
|
||||
end.war.denied: "停战请求被 {0} 拒绝了"
|
||||
denied.war.end: "{0} 拒绝了 {1} 的停战请求"
|
||||
0.war: "/{0} war{1} start/end [标签] - 开始或停止一场战争"
|
||||
has.initiated.a.rivalry: "{0} 已经将 {1} 设置为敌对"
|
||||
start: "开始"
|
||||
end: "停止"
|
||||
add: "添加"
|
||||
remove: "移除"
|
||||
allow: "允许"
|
||||
block: "阻止"
|
||||
auto: "自动"
|
||||
war: "战争"
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow: "{0}S=剑{1}, {2}B=弓{3}, {4}#=箭"
|
||||
weapon.S: "S"
|
||||
weapon.B: "B"
|
||||
weapon.A: "A"
|
||||
materials: "材料"
|
||||
armor.h: "H"
|
||||
armor.c: "C"
|
||||
armor.l: "L"
|
||||
armor.B: "B"
|
||||
diamond: "钻石"
|
||||
gold: "金"
|
||||
wood: "木"
|
||||
server.announce: "服务器公告"
|
||||
clan.announce: "帮派公告"
|
||||
leader.announce: "老大公告"
|
||||
hunger: "饥饿"
|
||||
stone: "石"
|
||||
iron: "铁"
|
||||
the.clan.cannot.be.rivaled: "这个帮派不能敌对"
|
||||
capeoff: "披风已关闭"
|
||||
capeon: "披风已开启"
|
||||
bboff: "公告板已关闭"
|
||||
bbon: "公告板已开启"
|
||||
tagoff: "标签已关闭"
|
||||
tagon: "标签已开启"
|
||||
home.base.only.once: "基地只能设置一次"
|
||||
now.at.homebase: "你现在在 {0} 的基地"
|
||||
hombase.set: "帮派基地设置为: {0}"
|
||||
hombase.cleared: "帮派基地已清除"
|
||||
hombase.mod.set: "{0} 的基地设置为:"
|
||||
hombase.not.set: "基地未设置"
|
||||
rival.limit.reached: "你达到了敌对数量上限. 你不能再和其他帮派敌对了."
|
||||
you.moved.teleport.cancelled: "你移动了,传送请求取消"
|
||||
waiting.for.teleport.stand.still.for.0.seconds: "等待传送于 {0} 秒内开始"
|
||||
no.teleport: "你不被允许传送至该位置"
|
||||
on: "开"
|
||||
off: "关"
|
||||
leave: "离开"
|
||||
join: "加入"
|
||||
mute: "禁言"
|
||||
player.rank.changed: "称号被设置为"
|
||||
your.clans.are.already.rivals: "你的帮派已经是敌对了"
|
||||
player.got.money: "你因为击杀 {1} 而获得了基于 KD: {2} 的 {0}"
|
||||
cleared.bb: "清空了公告板"
|
||||
clan.balance: "帮派经济: {0}"
|
||||
bb.clan.deposit: "{0} $ 已存入"
|
||||
player.clan.deposit: "你存入了 {0}"
|
||||
bb.clan.withdraw: "{0} $ 被取出"
|
||||
player.clan.withdraw: "你取出了 {0}"
|
||||
clan.bank.not.enough.money: "你的帮派银行资金不足"
|
||||
your.clans.are.not.rivals: "你的帮派不是敌对"
|
||||
the.clan.members.reached.limit: "帮派成员达到上限"
|
||||
@@ -1,417 +0,0 @@
|
||||
create.command: "create"
|
||||
list.command: "list"
|
||||
profile.command: "profile"
|
||||
roster.command: "roster"
|
||||
lookup.command: "lookup"
|
||||
leaderboard.command: "leaderboard"
|
||||
alliances.command: "alliances"
|
||||
rivalries.command: "rivalries"
|
||||
vitals.command: "vitals"
|
||||
coords.command: "coords"
|
||||
stats.command: "stats"
|
||||
ally.command: "ally"
|
||||
rival.command: "rival"
|
||||
bb.command: "bb"
|
||||
cape.command: "cape"
|
||||
modtag.command: "modtag"
|
||||
toggle.command: "toggle"
|
||||
invite.command: "invite"
|
||||
kick.command: "kick"
|
||||
bank.command: "bank"
|
||||
trust.command: "trust"
|
||||
untrust.command: "untrust"
|
||||
promote.command: "promote"
|
||||
demote.command: "demote"
|
||||
clanff.command: "clanff"
|
||||
ff.command: "ff"
|
||||
resign.command: "resign"
|
||||
disband.command: "disband"
|
||||
verify.command: "verify"
|
||||
ban.command: "ban"
|
||||
unban.command: "unban"
|
||||
reload.command: "reload"
|
||||
globalff.command: "globalff"
|
||||
kills.command: "kills"
|
||||
mostkilled.command: "mostkilled"
|
||||
war.command: "war"
|
||||
home.command: "home"
|
||||
setrank.command: "setrank"
|
||||
place.command: "place"
|
||||
resetkdr.command: "resetkdr"
|
||||
usage.resetkdr: "Usage: /{0} resetkdr [all/player]"
|
||||
usage.clan.alliances: "Usage: /{0} alliances"
|
||||
usage.ally: "Usage: /{0} ally add/remove [tag]"
|
||||
usage.ban.unban: "Usage: /{0} ban/unban [player]"
|
||||
usage.rival: "Usage: /{0} rival add/remove [tag]"
|
||||
usage.war: "Usage: /{0} war start/end [tag]"
|
||||
usage.cape.url: "Usage: /{0} cape [url]"
|
||||
usage.setrank: "Usage: /{0} setrank [player] [rank], rank can be multiple worlds and contain &f color codes"
|
||||
usage.clanff: "Usage: /{0} clanff allow/block"
|
||||
usage.0.coords: "Usage: /{0} coords"
|
||||
usage.create.tag: "Usage: /{0} create [tag] [name]"
|
||||
usage.demote.leader: "Usage: /{0} demote [leader]"
|
||||
usage.0.disband: "Usage: /{0} disband"
|
||||
usage.0.ff.allow.auto: "Usage: /{0} ff allow/auto"
|
||||
usage.0.globalff.allow.auto: "Usage: /{0} globalff allow/auto"
|
||||
usage.0.permissions.player: "Usage: /{0} permissions [clan] add/remove [permission]"
|
||||
usage.0.invite.player: "Usage: /{0} invite [player]"
|
||||
usage.kick.player: "Usage: /{0} kick [player]"
|
||||
usage.bank: "Usage: /{0} bank withdraw/deposit/status [amount]"
|
||||
usage.0.modtag.tag: "Usage: /{0} modtag [tag]"
|
||||
usage.list: "Usage: /{0} list"
|
||||
usage.lookup.tag: "Usage: /{0} lookup [tag]"
|
||||
usage.0.profile.tag: "Usage: /{0} profile [tag]"
|
||||
usage.0.promote.member: "Usage: /{0} promote <member>"
|
||||
usage.0.rivalries: "Usage: /{0} rivalries"
|
||||
usage.0.roster.tag: "Usage: /{0} roster [tag]"
|
||||
usage.0.stats: "Usage: /{0} stats"
|
||||
usage.0.trust.player: "Usage: /{0} trust [player]"
|
||||
usage.0.untrust.player: "Usage: /{0} untrust [player]"
|
||||
usage.0.verify.tag: "Usage: /{0} verify [tag]"
|
||||
usage.0.vitals: "Usage: /{0} vitals"
|
||||
usage.0.place: "Usage: /{0} place [player] [tag]"
|
||||
usage.0.leaderboard: "Usage: /{0} leaderboard"
|
||||
0.reload.1.reload.configuration: "/{0} reload{1} - Reload configuration"
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire: "/{0} globalff allow/auto {1} - Set global friendly fire"
|
||||
0.place: "/{0} place [player] [tag]{1} - Place a player in a clan"
|
||||
0.ban.unban.player.1.ban.unban.a.player: "/{0} ban/unban [player]{1} - Ban/unban a player"
|
||||
0.hometp.clan.1.tp.home.a.clan: "/{0} home tp [clan]{1} - Teleport to all clans homes"
|
||||
0.disband.tag.1.disband.a.clan: "/{0} disband [tag]{1} - Disband a clan"
|
||||
0.resetkdr.1.resets.kdr: "/{0} resetkdr player/all{1} - Reset KDR of all players or just of one"
|
||||
0.resetkdr.1.resets.your.kdr: "/{0} resetkdr{1} - Reset your KDR"
|
||||
0.verify.tag.1.verify.an.unverified.clan: "/{0} verify [tag]{1} - Verify an unverified clan"
|
||||
0.verify.1.purchase.verification.of.your.clan: "/{0} verify{1} - Purchase verification of your clan"
|
||||
0.list.1.lists.all.clans: "/{0} list{1} - Lists all clans"
|
||||
0.profile.1.view.your.clan.s.profile: "/{0} profile{1} - View your clan''s profile"
|
||||
0.profile.tag.1.view.a.clan.s.profile: "/{0} profile [tag]{1} - View a clan''s profile"
|
||||
0.lookup.1.lookup.your.info: "/{0} lookup{1} - Lookup your info"
|
||||
0.lookup.player.1.lookup.a.player.s.info: "/{0} lookup [player]{1} - Lookup a player''s info"
|
||||
0.leaderboard.1.view.leaderboard: "/{0} leaderboard{1} - View leaderboard"
|
||||
0.alliances.1.view.all.clan.alliances: "/{0} alliances{1} - View all clan alliances"
|
||||
0.rivalries.1.view.all.clan.rivalries: "/{0} rivalries{1} - View all clan rivalries"
|
||||
0.roster.1.view.your.clan.s.member.list: "/{0} roster{1} - View your clan''s member list"
|
||||
0.roster.tag.1.view.a.clan.s.member.list: "/{0} roster [tag]{1} - View a clan''s member list"
|
||||
0.vitals.1.view.your.clan.member.s.vitals: "/{0} vitals{1} - View your clan member''s vitals"
|
||||
0.coords.1.view.your.clan.member.s.coordinates: "/{0} coords{1} - View your clan member''s coordinates"
|
||||
0.stats.1.view.your.clan.member.s.stats: "/{0} stats{1} - View your clan member''s stats"
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan: "/{0} ally add/remove [tag]{1} - Add/remove an ally clan"
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan: "/{0} rival add/remove [tag]{1} - Add/remove a rival clan"
|
||||
0.bb.1.display.bulletin.board: "/{0} bb{1} - Display bulletin board"
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board: "/{0} bb [msg]{1} - Add a message to the bulletin board"
|
||||
0.modtag.tag.1.modify.the.clan.s.tag: "/{0} modtag [tag]{1} - Modify the clan''s tag"
|
||||
0.cape.url.1.change.your.clan.s.cape: "/{0} cape [url]{1} - Change your clan''s cape"
|
||||
0.invite.player.1.invite.a.player: "/{0} invite [player]{1} - Invite a player"
|
||||
0.kick.player.1.kick.a.player.from.the.clan: "/{0} kick [player]{1} - Kick a player from the clan"
|
||||
0.trust.untrust.player.1.set.trust.level1: "/{0} trust [player]{1} - Set member as trusted"
|
||||
0.trust.untrust.player.1.set.trust.level2: "/{0} untrust [player]{1} - Set member as untrusted"
|
||||
0.promote.member.1.promote.a.member.to.leader: "/{0} promote [member]{1} - Promote a member to leader"
|
||||
0.demote.leader.1.demote.a.leader.to.member: "/{0} demote [leader]{1} - Demote a leader to member"
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire: "/{0} clanff allow/block{1} - Toggle clan''s friendly fire"
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire: "/{0} ff allow/auto{1} - Toggle personal friendly fire"
|
||||
0.toggle.command: "/{0} toggle [{2}]{1} - Toggle personal settings"
|
||||
0.resign.1.resign.from.the.clan: "/{0} resign{1} - Resign from the clan"
|
||||
0.disband.1.disband.your.clan: "/{0} disband{1} - Disband your clan"
|
||||
0.trust.setrank: "/{0} setrank [player] [rank]{1} - Give a player a rank"
|
||||
0.create.tag.name.1.purchase.a.new.clan: "/{0} create [tag] [name]{1} - Purchase a new clan"
|
||||
0.create.tag.name.1.create.a.new.clan: "/{0} create [tag] [name]{1} - Create a new clan"
|
||||
0.kills: "/{0} kills{1} - View your kill counts"
|
||||
0.killsplayer: "/{0} kills [player]{1} - View a player''s kill counts"
|
||||
0.mostkilled: "/{0} mostkilled{1} - View serverwide most killed counts"
|
||||
home-menu: "/{0} home{1} - Teleport to clan home-base"
|
||||
home-set-menu: "/{0} home set{1} - Set the clan''s home base"
|
||||
home-clear-menu: "/{0} home clear{1} - Clear the clan''s home base"
|
||||
home-regroup-menu: "/{0} home regroup [me]{1} - Regroup all members to clan home-base or to you"
|
||||
example.clan.modtag.4kfo.4l: "Example: /clan modtag &4K&fo&4L"
|
||||
example.clan.create: "Example: /clan create &4Kol Knights of the Labyrinth"
|
||||
clan: "Clan"
|
||||
allies: "Allies"
|
||||
alliances: "alliances"
|
||||
coords: "coords"
|
||||
name: "Name"
|
||||
distance: "Distance"
|
||||
coords.upper: "Coords"
|
||||
world: "World"
|
||||
kdr: "KDR"
|
||||
members: "Members"
|
||||
clans.lower: "clans"
|
||||
rival: "Rival"
|
||||
civilian: "Civilian"
|
||||
neutral: "Neutral"
|
||||
free.agent: "Free Agent"
|
||||
days: "days"
|
||||
rivals: "Rivals"
|
||||
rivalries: "rivalries"
|
||||
online: "Online"
|
||||
player: "Player"
|
||||
seen: "Seen"
|
||||
leader: "leader"
|
||||
roster: "roster"
|
||||
trusted: "trusted"
|
||||
untrusted: "untrusted"
|
||||
deaths: "Deaths"
|
||||
weights: "Weights"
|
||||
stats: "stats"
|
||||
health: "Health"
|
||||
armor: "Armor"
|
||||
weapons: "Weapons"
|
||||
food: "Food"
|
||||
vitals: "vitals"
|
||||
verified: "Verified"
|
||||
unverified: "Unverified"
|
||||
profile: "profile"
|
||||
civilian.abbreviation: "Civ"
|
||||
rank: "Rank"
|
||||
leaders: "Leaders"
|
||||
none: "None"
|
||||
today: "Today"
|
||||
kills: "Kills"
|
||||
mostkilled: "Most Killed"
|
||||
killcount: "Kill Count"
|
||||
attacker: "Attacker"
|
||||
victim: "Victim"
|
||||
kill.death.ratio: "Kill/Death Ratio"
|
||||
nokillsfound: "No Kills Found"
|
||||
version.loaded: "[{0}] Version {1} loaded"
|
||||
promoted.to.leader: "{0} has been promoted to leader"
|
||||
denied.demotion: "{0} denied the demotion of {1}. Consensus failed."
|
||||
membership.invitation: "{0} has denied the membership invitation"
|
||||
joined.the.clan: "{0} has joined the clan"
|
||||
signed.off.request.cancelled: "{0} has signed off. {1} request cancelled."
|
||||
clan.deletion: "{0} denied the clan deletion. Consensus failed."
|
||||
has.been.disbanded: "Clan {0} has been disbanded"
|
||||
denied.the.promotion: "{0} denied the promotion of {1}. Consensus failed."
|
||||
demoted.back.to.member: "{0} has been demoted back to member"
|
||||
peace.agreement.denied: "The peace agreement with {0} was denied"
|
||||
denied.to.make.peace: "{0} has denied to make peace with {1}"
|
||||
broken.the.rivalry: "{0} has broken the rivalry with {1}"
|
||||
broken.the.rivalry.with: "{0} has broken the rivalry with {1}"
|
||||
the.alliance.was.denied: "The alliance with {0} was denied"
|
||||
denied.an.alliance: "{0} has denied an alliance with {1}"
|
||||
accepted.an.alliance: "{0} has accepted an alliance with {1}"
|
||||
created.an.alliance: "{0} has created an alliance with {1}"
|
||||
has.joined: "{0} has joined {1}"
|
||||
proposing.to.end.the.rivalry: "{0} is proposing to end the rivalry with {1}"
|
||||
proposing.an.alliance: "{0} is proposing an alliance with {1}"
|
||||
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}"
|
||||
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"
|
||||
mysql.connection.failed: "MySQL Connection failed"
|
||||
sqlite.connection.successful: "SQLite Connection successful"
|
||||
sqlite.connection.failed: " SQLite Connection failed"
|
||||
purging.player.data: "purging player''s data: {0}"
|
||||
purging.clan: "Purging clan: {0}"
|
||||
clan.players: "Clan players: {0}"
|
||||
clans: "Clans: {0}"
|
||||
banned: "You are banned from using clan commands"
|
||||
nothing.more.to.see: "Nothing more to see"
|
||||
nothing.to.deny: "Nothing to deny"
|
||||
no.leader.permissions: "You do not have leader permissions"
|
||||
you.have.already.voted: "You have already voted"
|
||||
has.voted.to.deny: "{0} has voted to deny"
|
||||
nothing.to.accept: "Nothing to accept"
|
||||
view.next.page: "Type /{0} to view next page."
|
||||
voted.to.accept: "{0} voted to accept"
|
||||
bulletin.board.header: "{0}* {1}{2} bulletin board"
|
||||
has.been.disbanded.rivalry.ended: "{0} has been disbanded. Rivalry has ended."
|
||||
has.been.disbanded.alliance.ended: "{0} has been disbanded. Alliance has ended."
|
||||
clan.disbanded: "Clan Disbanded"
|
||||
1.color.day: "1 {0}day"
|
||||
many.color.days: "{0}{1} days"
|
||||
does.not.match: "Does not match a clan command"
|
||||
simpleclans.command.failure: "SimpleClans command failure: {0}"
|
||||
insufficient.permissions: "Insufficient permissions"
|
||||
clan.is.not.verified: "Clan is not verified"
|
||||
not.a.member.of.any.clan: "You are not a member of any clan"
|
||||
minimum.to.make.alliance: "Your clan must have at least {0} players in order to make alliances"
|
||||
no.clan.matched: "No clan matched"
|
||||
cannot.ally.with.an.unverified.clan: "You cannot ally with an unverified clan"
|
||||
your.clans.are.not.allies: "Your clans are not allies"
|
||||
has.broken.the.alliance: "{0} has broken the alliance with {1}"
|
||||
at.least.one.leader.accept.the.alliance: "At least one leader of the allied must be online to accept the alliance"
|
||||
leaders.have.been.asked.for.an.alliance: "{0} leaders have been asked for an alliance"
|
||||
your.clans.are.already.allies: "Your clans are already allies"
|
||||
your.clan.cannot.create.rivals: "Your clan cannot create rivals"
|
||||
min.players.rivalries: "Your clan must have at least {0} players in order to make rivalries"
|
||||
this.player.is.already.banned: "This player is already banned"
|
||||
player.added.to.banned.list: "Player added to banned list"
|
||||
you.banned: "You have been banned from clan commands"
|
||||
cape.must.be.png: "The cape url must point to a png image"
|
||||
url.error: "The URL is retuning an error. Please verify that it is working."
|
||||
changed.the.clan.cape: "{0} has changed the clan''s cape"
|
||||
clan.wide.friendly.fire.blocked: "Clan-wide friendly-fire blocked"
|
||||
clan.wide.friendly.fire.is.allowed: "Clan-wide friendly-fire is allowed"
|
||||
only.trusted.players.can.access.clan.coords: "Only trusted players can access clan coords"
|
||||
you.are.the.only.member.online: "You are the only member online"
|
||||
your.clan.tag.cannot.be.longer.than.characters: "Your clan''s tag cannot be longer than {0} characters"
|
||||
your.clan.tag.must.be.longer.than.characters: "Your clan''s tag must be longer than {0} characters"
|
||||
your.tag.cannot.contain.the.following.colors: "Your tag cannot contain the following colors: {0}"
|
||||
your.tag.cannot.contain.color.codes: "Your tag cannot contain color codes"
|
||||
your.clan.name.cannot.be.longer.than.characters: "Your clan''s name cannot be longer than {0} characters"
|
||||
your.clan.name.must.be.longer.than.characters: "Your clan''s name must be longer than {0} characters"
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes: "Your clan''s tag can only contain letters, numbers, and color codes"
|
||||
your.clan.name.cannot.contain.color.codes: "Your clan''s name cannot contain color codes"
|
||||
that.tag.name.is.disallowed: "That tag name is disallowed"
|
||||
you.must.first.resign: "You must first resign from {0}"
|
||||
clan.with.this.tag.already.exists: "A clan with this tag already exists"
|
||||
get.your.clan.verified.to.access.advanced.features: "Get your clan verified to access advanced features"
|
||||
clan.created: "Clan {0} created"
|
||||
leaders.must.be.online.to.vote.on.demotion: "All leaders other than the demoted must be online to vote on this demotion"
|
||||
demotion.vote.has.been.requested.from.all.leaders: "Demotion vote has been requested from all leaders"
|
||||
player.is.not.a.leader.of.your.clan: "The player is not a leader of your clan"
|
||||
clan.has.been.disbanded: "Clan {0} has been disbanded"
|
||||
clan.disband.vote.has.been.requested.from.all.leaders: "Clan disband vote has been requested from all leaders"
|
||||
friendy.fire.is.now.managed.by.your.clan: "Friendy-fire is now managed by your clan"
|
||||
personal.friendly.fire.is.set.to.allowed: "Personal friendly-fire is set to allowed"
|
||||
global.friendy.fire.is.now.managed.by.each.clan: "Global friendy-fire is now managed by each clan"
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan: "Global friendy-fire is already being managed by each clan"
|
||||
global.friendly.fire.is.set.to.allowed: "Global friendly-fire is set to allowed"
|
||||
global.friendly.fire.is.already.being.allowed: "Global friendly-fire is already being allowed"
|
||||
no.player.matched: "No player matched"
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans: "The player doesn''t not have the permissions to join clans"
|
||||
you.cannot.invite.yourself: "You cannot invite yourself"
|
||||
this.player.is.banned.from.using.clan.commands: "This player is banned from using clan commands"
|
||||
the.player.is.already.member.of.another.clan: "The player is already member of another clan"
|
||||
has.been.asked.to.join: "{0} has been asked to join {1}"
|
||||
you.cannot.kick.yourself: "You cannot kick yourself"
|
||||
the.player.is.not.a.member.of.your.clan: "The player is not a member of your clan"
|
||||
you.cannot.kick.another.leader: "You cannot kick another leader"
|
||||
has.been.kicked.by: "{0} has been kicked by {1}"
|
||||
no.clans.have.been.created: "No clans have been created"
|
||||
total.clans: "Total clans:"
|
||||
legend: "Legend:"
|
||||
kill.type.civilian: "Kill Type: {0}Civilian"
|
||||
no.player.data.found: "No player data found"
|
||||
kill.type.0: "Kill Type: {0}"
|
||||
s.player.info: "{0}''s player info"
|
||||
clan.0: "Clan: {0}"
|
||||
status.0: "Status: {0}"
|
||||
rank.0: "Rank: {0}"
|
||||
kdr.0: "KDR: {0}"
|
||||
deaths.0: "Deaths: {0}"
|
||||
join.date.0: "Join Date: {0}"
|
||||
last.seen.0: "Last Seen: {0}"
|
||||
past.clans.0: "Past Clans: {0}"
|
||||
inactive.0: "Inactive: {0}"
|
||||
kill.totals: "Kill Totals:"
|
||||
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}"
|
||||
name.0: "Name: {0}"
|
||||
leaders.0: "Leaders: {0}"
|
||||
members.online.0: "Members Online: {0}"
|
||||
allies.0: "Allies: {0}"
|
||||
rivals.0: "Rivals: {0}"
|
||||
founded.0: "Founded: {0}"
|
||||
the.member.to.be.promoted.must.be.online: "The member to be promoted must be online"
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan: "The player does not have the permissions to lead a clan"
|
||||
you.cannot.promote.yourself: "You cannot promote yourself"
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion: "All leaders must be online to vote on this promotion"
|
||||
the.player.is.already.a.leader: "The player is already a leader"
|
||||
configuration.reloaded: "Configuration reloaded"
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan: "Last leader cannot resign.You must appoint another leader or disband the clan"
|
||||
0.has.resigned: "{0} has resigned"
|
||||
only.trusted.players.can.access.clan.stats: "Only trusted players can access clan stats"
|
||||
you.cannot.trust.yourself: "You cannot trust yourself"
|
||||
leaders.are.already.trusted: "Leaders are already trusted"
|
||||
this.player.is.already.trusted: "This player is already trusted"
|
||||
has.been.given.trusted.status.by: "{0} has been given trusted status by {1}"
|
||||
this.player.is.not.banned: "This player is not banned"
|
||||
player.removed.from.the.banned.list: "Player removed from the banned list"
|
||||
you.have.been.unbanned.from.clan.commands: "You have been unbanned from clan commands"
|
||||
you.cannot.untrust.yourself: "You cannot untrust yourself"
|
||||
leaders.cannot.be.untrusted: "Leaders cannot be untrusted"
|
||||
this.player.is.already.untrusted: "This player is already untrusted"
|
||||
has.been.given.untrusted.status.by: "{0} has been given untrusted status by {1}"
|
||||
the.clan.does.not.exist: "The clan does not exist"
|
||||
the.clan.is.already.verified: "The clan is already verified"
|
||||
the.clan.has.been.verified: "The clan has been verified"
|
||||
clan.0.has.been.verified: "Clan {0} has been verified!"
|
||||
only.trusted.players.can.access.clan.vitals: "Only trusted players can access clan vitals"
|
||||
total.clan.players.0: "Total clan players: {0}"
|
||||
proposing.war: "{0} is proposing to start a war with {1}"
|
||||
you.can.only.start.war.with.rivals: "You can only start war with rivals"
|
||||
leaders.have.been.asked.to.accept.the.war.request: "{0} leaders have been asked to accept the war request"
|
||||
leaders.asked.to.end.rivalry: "{0} leaders have been asked to end the war"
|
||||
proposing.to.end.the.war: "{0} is proposing to end the war with {1}"
|
||||
clans.already.at.war: "Your clans are already in war"
|
||||
clans.not.at.war: "Your clans are not at war"
|
||||
you.are.at.war: "{0} is now at war with {1}"
|
||||
denied.war.req: "{0} denied the war request sent by {1}"
|
||||
you.are.no.longer.at.war: "{0} is no longer at war with {1}"
|
||||
end.war.denied: "Request to end the war has been denied by {0}"
|
||||
denied.war.end: "{0} denied {1}''s request to end the war"
|
||||
0.war: "/{0} war{1} start/end [tag] - Start or end a war"
|
||||
has.initiated.a.rivalry: "{0} has initiated a rivalry with {1}"
|
||||
start: "start"
|
||||
end: "end"
|
||||
add: "add"
|
||||
remove: "remove"
|
||||
allow: "allow"
|
||||
block: "block"
|
||||
auto: "auto"
|
||||
war: "war"
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow: "{0}S=Sword{1}, {2}B=Bow{3}, {4}#=Arrows"
|
||||
weapon.S: "S"
|
||||
weapon.B: "B"
|
||||
weapon.A: "A"
|
||||
materials: "Materials"
|
||||
armor.h: "H"
|
||||
armor.c: "C"
|
||||
armor.l: "L"
|
||||
armor.B: "B"
|
||||
diamond: "diamond"
|
||||
gold: "gold"
|
||||
wood: "wood"
|
||||
server.announce: "Server Announce"
|
||||
clan.announce: "Clan Announce"
|
||||
leader.announce: "Leader Announce"
|
||||
hunger: "Hunger"
|
||||
stone: "Stone"
|
||||
iron: "Iron"
|
||||
the.clan.cannot.be.rivaled: "The clan cannot be rivaled"
|
||||
capeoff: "Cape toggled off"
|
||||
capeon: "Cape toggled on"
|
||||
bboff: "BB toggled off"
|
||||
bbon: "BB toggled on"
|
||||
tagoff: "Tag toggled off"
|
||||
tagon: "Tag toggled on"
|
||||
depositon: "Deposit toggled on"
|
||||
depositoff: "Deposit toggled off"
|
||||
withdrawon: "Withdraw toggled on"
|
||||
withdrawoff: "Withdraw toggled off"
|
||||
home.base.only.once: "Home base can only be set once"
|
||||
now.at.homebase: "You are now at {0}''s home base"
|
||||
hombase.set: "Clan home-base set to: {0}"
|
||||
hombase.cleared: "Clan home-base cleared"
|
||||
hombase.mod.set: "{0}''s home-base set to:"
|
||||
hombase.not.set: "Home-base not set"
|
||||
rival.limit.reached: "You have reached the rival limit. You cannot rival any more clans."
|
||||
you.moved.teleport.cancelled: "You moved, teleport cancelled"
|
||||
waiting.for.teleport.stand.still.for.0.seconds: "Waiting for teleport, stand still for {0} seconds"
|
||||
no.teleport: "You are not allowed to teleport to that location"
|
||||
on: "on"
|
||||
off: "off"
|
||||
leave: "leave"
|
||||
join: "join"
|
||||
mute: "mute"
|
||||
player.rank.changed: "Rank has been set"
|
||||
your.clans.are.already.rivals: "Your clans are already rivals"
|
||||
player.got.money: "You got {0} for killing {1} based on you KDR: {2}"
|
||||
cleared.bb: "Cleared the bulletin board"
|
||||
clan.balance: "Clan-Balance: {0}"
|
||||
bb.clan.deposit: "{0} $ were deposited"
|
||||
player.clan.deposit: "You deposited {0}"
|
||||
bb.clan.withdraw: "{0} $ were withdrawn"
|
||||
player.clan.withdraw: "You withdraw {0}"
|
||||
clan.bank.not.enough.money: "Your clans bank has not enough money"
|
||||
your.clans.are.not.rivals: "Your clans are not rivals"
|
||||
you.cannot.rival.your.own.clan: "You cannot rival your own clan"
|
||||
the.clan.members.reached.limit: "Your clan members reached limit"
|
||||
you.have.reseted.your.kdr: "You have reseted your KDR"
|
||||
you.have.reseted.0.kdr: "You have reseted {0}''s KDR"
|
||||
you.have.reseted.kdr.of.all.players: "You have reseted the KDR of all players"
|
||||
@@ -0,0 +1,506 @@
|
||||
description.command=description
|
||||
create.command=create
|
||||
list.command=list
|
||||
profile.command=profile
|
||||
roster.command=roster
|
||||
lookup.command=lookup
|
||||
leaderboard.command=leaderboard
|
||||
alliances.command=alliances
|
||||
rivalries.command=rivalries
|
||||
vitals.command=vitals
|
||||
coords.command=coords
|
||||
stats.command=stats
|
||||
ally.command=ally
|
||||
rival.command=rival
|
||||
bb.command=bb
|
||||
cape.command=cape
|
||||
modtag.command=modtag
|
||||
toggle.command=toggle
|
||||
invite.command=invite
|
||||
kick.command=kick
|
||||
bank.command=bank
|
||||
fee.command=fee
|
||||
purge.command=purge
|
||||
trust.command=trust
|
||||
untrust.command=untrust
|
||||
promote.command=promote
|
||||
demote.command=demote
|
||||
clanff.command=clanff
|
||||
ff.command=ff
|
||||
resign.command=resign
|
||||
disband.command=disband
|
||||
verify.command=verify
|
||||
ban.command=ban
|
||||
unban.command=unban
|
||||
reload.command=reload
|
||||
globalff.command=globalff
|
||||
kills.command=kills
|
||||
mostkilled.command=mostkilled
|
||||
war.command=war
|
||||
home.command=home
|
||||
setrank.command=setrank
|
||||
place.command=place
|
||||
resetkdr.command=resetkdr
|
||||
usage.description=Usage: /{0} description [description]
|
||||
usage.resetkdr=Usage: /{0} resetkdr [all/player]
|
||||
usage.clan.alliances=Usage: /{0} alliances
|
||||
usage.ally=Usage: /{0} ally add/remove [tag]
|
||||
usage.ban.unban=Usage: /{0} ban/unban [player]
|
||||
usage.rival=Usage: /{0} rival add/remove [tag]
|
||||
usage.war=Usage: /{0} war start/end [tag]
|
||||
usage.cape.url=Usage: /{0} cape [url]
|
||||
usage.setrank=Usage: /{0} setrank [player] [rank], rank can be multiple words and contain &f color codes
|
||||
usage.clanff=Usage: /{0} clanff allow/block
|
||||
usage.0.coords=Usage: /{0} coords
|
||||
usage.create.tag=Usage: /{0} create [tag] [name]
|
||||
usage.demote.leader=Usage: /{0} demote [leader]
|
||||
usage.0.disband=Usage: /{0} disband
|
||||
usage.0.ff.allow.auto=Usage: /{0} ff allow/auto
|
||||
usage.0.globalff.allow.auto=Usage: /{0} globalff allow/auto
|
||||
usage.0.permissions.player=Usage: /{0} permissions [clan] add/remove [permission]
|
||||
usage.0.invite.player=Usage: /{0} invite [player]
|
||||
usage.kick.player=Usage: /{0} kick [player]
|
||||
usage.bank=Usage: /{0} bank withdraw/deposit/status [amount]
|
||||
usage.fee=Usage: /{0} fee check/set [amount]
|
||||
usage.purge=Usage: /{0} purge [player]
|
||||
usage.0.modtag.tag=Usage: /{0} modtag [tag]
|
||||
usage.list=Usage: /{0} list [name/size/kdr/founded/active] [asc/desc]
|
||||
usage.lookup.tag=Usage: /{0} lookup [tag]
|
||||
usage.0.profile.tag=Usage: /{0} profile [tag]
|
||||
usage.0.promote.member=Usage: /{0} promote <member>
|
||||
usage.0.rivalries=Usage: /{0} rivalries
|
||||
usage.0.roster.tag=Usage: /{0} roster [tag]
|
||||
usage.0.stats=Usage: /{0} stats
|
||||
usage.0.trust.player=Usage: /{0} trust [player]
|
||||
usage.0.untrust.player=Usage: /{0} untrust [player]
|
||||
usage.0.verify.tag=Usage: /{0} verify [tag]
|
||||
usage.0.vitals=Usage: /{0} vitals
|
||||
usage.0.place=Usage: /{0} place [player] [tag]
|
||||
usage.0.leaderboard=Usage: /{0} leaderboard
|
||||
0.reload.1.reload.configuration=/{0} reload{1} - Reload configuration
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire=/{0} globalff allow/auto {1} - Set global friendly fire
|
||||
0.place=/{0} place [player] [tag]{1} - Place a player in a clan
|
||||
0.ban.unban.player.1.ban.unban.a.player=/{0} ban/unban [player]{1} - Ban/unban a player
|
||||
0.hometp.clan.1.tp.home.a.clan=/{0} home tp [clan]{1} - Teleport to all clans homes
|
||||
0.disband.tag.1.disband.a.clan=/{0} disband [tag]{1} - Disband a clan
|
||||
0.resetkdr.1.resets.kdr=/{0} resetkdr player/all{1} - Reset KDR of all players or just of one
|
||||
0.resetkdr.1.resets.your.kdr=/{0} resetkdr{1} - Reset your KDR
|
||||
0.purge.player.1.purge.a.player=/{0} purge [player]{1} - Purge a player
|
||||
0.verify.tag.1.verify.an.unverified.clan=/{0} verify [tag]{1} - Verify an unverified clan
|
||||
0.verify.1.purchase.verification.of.your.clan=/{0} verify{1} - Purchase verification of your clan
|
||||
0.list.1.lists.all.clans=/{0} list [order by] [asc/desc]{1} - Lists all clans - (order by: name/size/kdr/founded/active)
|
||||
0.profile.1.view.your.clan.s.profile=/{0} profile{1} - View your clan''s profile
|
||||
0.profile.tag.1.view.a.clan.s.profile=/{0} profile [tag]{1} - View a clan''s profile
|
||||
0.lookup.1.lookup.your.info=/{0} lookup{1} - Lookup your info
|
||||
0.lookup.player.1.lookup.a.player.s.info=/{0} lookup [player]{1} - Lookup a player''s info
|
||||
0.leaderboard.1.view.leaderboard=/{0} leaderboard{1} - View leaderboard
|
||||
0.alliances.1.view.all.clan.alliances=/{0} alliances{1} - View all clan alliances
|
||||
0.rivalries.1.view.all.clan.rivalries=/{0} rivalries{1} - View all clan rivalries
|
||||
0.roster.1.view.your.clan.s.member.list=/{0} roster{1} - View your clan''s member list
|
||||
0.roster.tag.1.view.a.clan.s.member.list=/{0} roster [tag]{1} - View a clan''s member list
|
||||
0.vitals.1.view.your.clan.member.s.vitals=/{0} vitals{1} - View your clan member''s vitals
|
||||
0.coords.1.view.your.clan.member.s.coordinates=/{0} coords{1} - View your clan member''s coordinates
|
||||
0.stats.1.view.your.clan.member.s.stats=/{0} stats{1} - View your clan member''s stats
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan=/{0} ally add/remove [tag]{1} - Add/remove an ally clan
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan=/{0} rival add/remove [tag]{1} - Add/remove a rival clan
|
||||
0.bb.1.display.bulletin.board=/{0} bb{1} - Display bulletin board
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board=/{0} bb [msg]{1} - Add a message to the bulletin board
|
||||
0.modtag.tag.1.modify.the.clan.s.tag=/{0} modtag [tag]{1} - Modify the clan''s tag
|
||||
0.description.description.1.modify.the.clan.s.description=/{0} description [description]{1} - Modify the clan''s description
|
||||
0.cape.url.1.change.your.clan.s.cape=/{0} cape [url]{1} - Change your clan''s cape
|
||||
0.invite.player.1.invite.a.player=/{0} invite [player]{1} - Invite a player
|
||||
0.kick.player.1.kick.a.player.from.the.clan=/{0} kick [player]{1} - Kick a player from the clan
|
||||
0.trust.untrust.player.1.set.trust.level1=/{0} trust [player]{1} - Set member as trusted
|
||||
0.trust.untrust.player.1.set.trust.level2=/{0} untrust [player]{1} - Set member as untrusted
|
||||
0.promote.member.1.promote.a.member.to.leader=/{0} promote [member]{1} - Promote a member to leader
|
||||
0.demote.leader.1.demote.a.leader.to.member=/{0} demote [leader]{1} - Demote a leader to member
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire=/{0} clanff allow/block{1} - Toggle clan''s friendly fire
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire=/{0} ff allow/auto{1} - Toggle personal friendly fire
|
||||
0.toggle.command=/{0} toggle [{2}]{1} - Toggle personal settings
|
||||
0.resign.1.resign.from.the.clan=/{0} resign{1} - Resign from the clan
|
||||
0.disband.1.disband.your.clan=/{0} disband{1} - Disband your clan
|
||||
0.trust.setrank=/{0} setrank [player] [rank]{1} - Give a player a rank
|
||||
0.create.tag.name.1.purchase.a.new.clan=/{0} create [tag] [name]{1} - Purchase a new clan
|
||||
0.create.tag.name.1.create.a.new.clan=/{0} create [tag] [name]{1} - Create a new clan
|
||||
0.kills=/{0} kills{1} - View your kill counts
|
||||
0.killsplayer=/{0} kills [player]{1} - View a player''s kill counts
|
||||
0.fee.check=/{0} fee check {1}- Check if the fee is enabled and how much is it
|
||||
0.fee.set=/{0} fee set [amount]{1} - Set the clan's member fee
|
||||
0.mostkilled=/{0} mostkilled{1} - View serverwide most killed counts
|
||||
home-menu=/{0} home{1} - Teleport to clan home-base
|
||||
home-set-menu=/{0} home set{1} - Set the clan''s home base
|
||||
home-clear-menu=/{0} home clear{1} - Clear the clan''s home base
|
||||
home-regroup-menu=/{0} home regroup [me]{1} - Regroup all members to clan home-base or to you
|
||||
example.clan.modtag.4kfo.4l=Example: /clan modtag &4K&fo&4L
|
||||
example.clan.create=Example: /clan create &4Kol Knights of the Labyrinth
|
||||
clan=Clan
|
||||
allies=Allies
|
||||
alliances=alliances
|
||||
coords=coords
|
||||
name=Name
|
||||
distance=Distance
|
||||
coords.upper=Coords
|
||||
world=World
|
||||
kdr=KDR
|
||||
members=Members
|
||||
clans.lower=clans
|
||||
rival=Rival
|
||||
civilian=Civilian
|
||||
neutral=Neutral
|
||||
free.agent=Free Agent
|
||||
days=days
|
||||
rivals=Rivals
|
||||
rivalries=rivalries
|
||||
online=Online
|
||||
player=Player
|
||||
seen=Seen
|
||||
leader=leader
|
||||
roster=roster
|
||||
trusted=trusted
|
||||
untrusted=untrusted
|
||||
deaths=Deaths
|
||||
weights=Weights
|
||||
stats=stats
|
||||
health=Health
|
||||
armor=Armor
|
||||
weapons=Weapons
|
||||
food=Food
|
||||
vitals=vitals
|
||||
verified=Verified
|
||||
unverified=Unverified
|
||||
profile=profile
|
||||
civilian.abbreviation=Civ
|
||||
rank=Rank
|
||||
leaders=Leaders
|
||||
none=None
|
||||
today=Today
|
||||
kills=Kills
|
||||
mostkilled=Most Killed
|
||||
killcount=Kill Count
|
||||
attacker=Attacker
|
||||
victim=Victim
|
||||
kill.death.ratio=Kill/Death Ratio
|
||||
nokillsfound=No Kills Found
|
||||
version.loaded=[{0}] Version {1} loaded
|
||||
promoted.to.leader={0} has been promoted to leader
|
||||
denied.demotion={0} denied the demotion of {1}. Consensus failed.
|
||||
membership.invitation={0} has denied the membership invitation
|
||||
joined.the.clan={0} has joined the clan
|
||||
signed.off.request.cancelled={0} has signed off. {1} request cancelled.
|
||||
clan.deletion={0} denied the clan deletion. Consensus failed.
|
||||
has.been.disbanded=Clan {0} has been disbanded
|
||||
denied.the.promotion={0} denied the promotion of {1}. Consensus failed.
|
||||
demoted.back.to.member={0} has been demoted back to member
|
||||
peace.agreement.denied=The peace agreement with {0} was denied
|
||||
denied.to.make.peace={0} has denied to make peace with {1}
|
||||
broken.the.rivalry={0} has broken the rivalry with {1}
|
||||
broken.the.rivalry.with={0} has broken the rivalry with {1}
|
||||
the.alliance.was.denied=The alliance with {0} was denied
|
||||
denied.an.alliance={0} has denied an alliance with {1}
|
||||
accepted.an.alliance={0} has accepted an alliance with {1}
|
||||
created.an.alliance={0} has created an alliance with {1}
|
||||
has.joined={0} has joined {1}
|
||||
proposing.to.end.the.rivalry={0} is proposing to end the rivalry with {1}
|
||||
proposing.an.alliance={0} is proposing an alliance with {1}
|
||||
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}
|
||||
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
|
||||
mysql.connection.failed=MySQL Connection failed
|
||||
sqlite.connection.successful=SQLite Connection successful
|
||||
sqlite.connection.failed= SQLite Connection failed
|
||||
purging.player.data=purging player''s data: {0}
|
||||
purging.clan=Purging clan: {0}
|
||||
clan.players=Clan players: {0}
|
||||
clans=Clans: {0}
|
||||
banned=You are banned from using clan commands
|
||||
nothing.more.to.see=Nothing more to see
|
||||
nothing.to.deny=Nothing to deny
|
||||
no.leader.permissions=You do not have leader permissions
|
||||
you.have.already.voted=You have already voted
|
||||
has.voted.to.deny={0} has voted to deny
|
||||
nothing.to.accept=Nothing to accept
|
||||
view.next.page=Type /{0} to view next page.
|
||||
voted.to.accept={0} voted to accept
|
||||
bulletin.board.header={0}* {1}{2} bulletin board
|
||||
has.been.disbanded.rivalry.ended={0} has been disbanded. Rivalry has ended.
|
||||
has.been.disbanded.alliance.ended={0} has been disbanded. Alliance has ended.
|
||||
clan.disbanded=Clan Disbanded
|
||||
1.color.day=1 {0}day
|
||||
many.color.days={0}{1} days
|
||||
does.not.match=Does not match a clan command
|
||||
simpleclans.command.failure=SimpleClans command failure: {0}
|
||||
insufficient.permissions=Insufficient permissions
|
||||
clan.is.not.verified=Clan is not verified
|
||||
not.a.member.of.any.clan=You are not a member of any clan
|
||||
minimum.to.make.alliance=Your clan must have at least {0} players in order to make alliances
|
||||
no.clan.matched=No clan matched
|
||||
cannot.ally.with.an.unverified.clan=You cannot ally with an unverified clan
|
||||
your.clans.are.not.allies=Your clans are not allies
|
||||
has.broken.the.alliance={0} has broken the alliance with {1}
|
||||
at.least.one.leader.accept.the.alliance=At least one leader of the allied must be online to accept the alliance
|
||||
leaders.have.been.asked.for.an.alliance={0} leaders have been asked for an alliance
|
||||
your.clans.are.already.allies=Your clans are already allies
|
||||
your.clan.cannot.create.rivals=Your clan cannot create rivals
|
||||
min.players.rivalries=Your clan must have at least {0} players in order to make rivalries
|
||||
this.player.is.already.banned=This player is already banned
|
||||
player.added.to.banned.list=Player added to banned list
|
||||
you.banned=You have been banned from clan commands
|
||||
cape.must.be.png=The cape url must point to a png image
|
||||
url.error=The URL is retuning an error. Please verify that it is working.
|
||||
changed.the.clan.cape={0} has changed the clan''s cape
|
||||
clan.wide.friendly.fire.blocked=Clan-wide friendly-fire blocked
|
||||
clan.wide.friendly.fire.is.allowed=Clan-wide friendly-fire is allowed
|
||||
only.trusted.players.can.access.clan.coords=Only trusted players can access clan coords
|
||||
you.are.the.only.member.online=You are the only member online
|
||||
your.clan.tag.cannot.be.longer.than.characters=Your clan''s tag cannot be longer than {0} characters
|
||||
your.clan.tag.must.be.longer.than.characters=Your clan''s tag must be longer than {0} characters
|
||||
your.tag.cannot.contain.the.following.colors=Your tag cannot contain the following colors: {0}
|
||||
your.tag.cannot.contain.color.codes=Your tag cannot contain color codes
|
||||
you.cannot.set.colored.ranks=You cannot set colored ranks
|
||||
your.clan.name.cannot.be.longer.than.characters=Your clan''s name cannot be longer than {0} characters
|
||||
your.clan.name.must.be.longer.than.characters=Your clan''s name must be longer than {0} characters
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=Your clan''s tag can only contain letters, numbers, and color codes
|
||||
your.clan.name.cannot.contain.color.codes=Your clan''s name cannot contain color codes
|
||||
that.tag.name.is.disallowed=That tag name is disallowed
|
||||
you.must.first.resign=You must first resign from {0}
|
||||
clan.with.this.tag.already.exists=A clan with this tag already exists
|
||||
get.your.clan.verified.to.access.advanced.features=Get your clan verified to access advanced features
|
||||
clan.created=Clan {0} created
|
||||
not.enough.leaders.online.to.vote.on.demotion=There aren''t enough leaders online to vote on this demotion
|
||||
leaders.must.be.online.to.vote.on.demotion=All leaders other than the demoted must be online to vote on this demotion
|
||||
demotion.vote.has.been.requested.from.all.leaders=Demotion vote has been requested from all leaders
|
||||
player.is.not.a.leader.of.your.clan=The player is not a leader of your clan
|
||||
clan.has.been.disbanded=Clan {0} has been disbanded
|
||||
clan.disband.vote.has.been.requested.from.all.leaders=Clan disband vote has been requested from all leaders
|
||||
friendy.fire.is.now.managed.by.your.clan=Friendy-fire is now managed by your clan
|
||||
personal.friendly.fire.is.set.to.allowed=Personal friendly-fire is set to allowed
|
||||
global.friendy.fire.is.now.managed.by.each.clan=Global friendy-fire is now managed by each clan
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan=Global friendy-fire is already being managed by each clan
|
||||
global.friendly.fire.is.set.to.allowed=Global friendly-fire is set to allowed
|
||||
global.friendly.fire.is.already.being.allowed=Global friendly-fire is already being allowed
|
||||
no.player.matched=No player matched
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans=The player doesn''t not have the permissions to join clans
|
||||
you.cannot.invite.yourself=You cannot invite yourself
|
||||
this.player.is.banned.from.using.clan.commands=This player is banned from using clan commands
|
||||
the.player.is.already.member.of.another.clan=The player is already member of another clan
|
||||
has.been.asked.to.join={0} has been asked to join {1}
|
||||
you.cannot.kick.yourself=You cannot kick yourself
|
||||
the.player.is.not.a.member.of.your.clan=The player is not a member of your clan
|
||||
you.cannot.kick.another.leader=You cannot kick another leader
|
||||
has.been.kicked.by={0} has been kicked by {1}
|
||||
no.clans.have.been.created=No clans have been created
|
||||
total.clans=Total clans:
|
||||
legend=Legend:
|
||||
kill.type.civilian=Kill Type: {0}Civilian
|
||||
no.player.data.found=No player data found
|
||||
kill.type.0=Kill Type: {0}
|
||||
s.player.info={0}''s player info
|
||||
clan.0=Clan: {0}
|
||||
status.0=Status: {0}
|
||||
rank.0=Rank: {0}
|
||||
kdr.0=KDR: {0}
|
||||
deaths.0=Deaths: {0}
|
||||
fee.0.value.1=Fee: {0}, {1} $
|
||||
join.date.0=Join Date: {0}
|
||||
last.seen.0=Last Seen: {0}
|
||||
past.clans.0=Past Clans: {0}
|
||||
inactive.0=Inactive: {0}
|
||||
kill.totals=Kill Totals:
|
||||
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}
|
||||
name.0=Name: {0}
|
||||
description.0=Description: {0}
|
||||
leaders.0=Leaders: {0}
|
||||
members.online.0=Members Online: {0}
|
||||
allies.0=Allies: {0}
|
||||
rivals.0=Rivals: {0}
|
||||
founded.0=Founded: {0}
|
||||
the.member.to.be.promoted.must.be.online=The member to be promoted must be online
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan=The player does not have the permissions to lead a clan
|
||||
you.cannot.promote.yourself=You cannot promote yourself
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion=All leaders must be online to vote on this promotion
|
||||
the.player.is.already.a.leader=The player is already a leader
|
||||
configuration.reloaded=Configuration reloaded
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan=Last leader cannot resign.You must appoint another leader or disband the clan
|
||||
0.has.resigned={0} has resigned
|
||||
only.trusted.players.can.access.clan.stats=Only trusted players can access clan stats
|
||||
you.cannot.trust.yourself=You cannot trust yourself
|
||||
leaders.are.already.trusted=Leaders are already trusted
|
||||
this.player.is.already.trusted=This player is already trusted
|
||||
has.been.given.trusted.status.by={0} has been given trusted status by {1}
|
||||
this.player.is.not.banned=This player is not banned
|
||||
player.removed.from.the.banned.list=Player removed from the banned list
|
||||
you.have.been.unbanned.from.clan.commands=You have been unbanned from clan commands
|
||||
you.cannot.untrust.yourself=You cannot untrust yourself
|
||||
leaders.cannot.be.untrusted=Leaders cannot be untrusted
|
||||
this.player.is.already.untrusted=This player is already untrusted
|
||||
has.been.given.untrusted.status.by={0} has been given untrusted status by {1}
|
||||
the.clan.does.not.exist=The clan does not exist
|
||||
the.clan.is.already.verified=The clan is already verified
|
||||
the.clan.has.been.verified=The clan has been verified
|
||||
clan.0.has.been.verified=Clan {0} has been verified!
|
||||
only.trusted.players.can.access.clan.vitals=Only trusted players can access clan vitals
|
||||
total.clan.players.0=Total clan players: {0}
|
||||
proposing.war={0} is proposing to start a war with {1}
|
||||
you.can.only.start.war.with.rivals=You can only start war with rivals
|
||||
leaders.have.been.asked.to.accept.the.war.request={0} leaders have been asked to accept the war request
|
||||
leaders.asked.to.end.rivalry={0} leaders have been asked to end the war
|
||||
proposing.to.end.the.war={0} is proposing to end the war with {1}
|
||||
clans.already.at.war=Your clans are already in war
|
||||
clans.not.at.war=Your clans are not at war
|
||||
you.are.at.war={0} is now at war with {1}
|
||||
denied.war.req={0} denied the war request sent by {1}
|
||||
you.are.no.longer.at.war={0} is no longer at war with {1}
|
||||
end.war.denied=Request to end the war has been denied by {0}
|
||||
denied.war.end={0} denied {1}''s request to end the war
|
||||
0.war=/{0} war{1} start/end [tag] - Start or end a war
|
||||
has.initiated.a.rivalry={0} has initiated a rivalry with {1}
|
||||
start=start
|
||||
end=end
|
||||
add=add
|
||||
remove=remove
|
||||
allow=allow
|
||||
block=block
|
||||
auto=auto
|
||||
war=war
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow={0}S=Sword{1}, {2}B=Bow{3}, {4}A=Arrows
|
||||
weapon.S=S
|
||||
weapon.B=B
|
||||
weapon.A=A
|
||||
materials=Materials
|
||||
armor.h=H
|
||||
armor.c=C
|
||||
armor.l=L
|
||||
armor.B=B
|
||||
diamond=diamond
|
||||
gold=gold
|
||||
wood=wood
|
||||
server.announce=Server Announce
|
||||
clan.announce=Clan Announce
|
||||
leader.announce=Leader Announce
|
||||
hunger=Hunger
|
||||
stone=stone
|
||||
iron=iron
|
||||
the.clan.cannot.be.rivaled=The clan cannot be rivaled
|
||||
capeoff=Cape toggled off
|
||||
capeon=Cape toggled on
|
||||
bboff=BB toggled off
|
||||
bbon=BB toggled on
|
||||
tagoff=Tag toggled off
|
||||
tagon=Tag toggled on
|
||||
depositon=Deposit toggled on
|
||||
depositoff=Deposit toggled off
|
||||
withdrawon=Withdraw toggled on
|
||||
withdrawoff=Withdraw toggled off
|
||||
feeoff=Fee toggled off
|
||||
feeon=Fee toggled on
|
||||
home.base.only.once=Home base can only be set once
|
||||
now.at.homebase=You are now at {0}''s home base
|
||||
hombase.set=Clan home-base set to: {0}
|
||||
hombase.cleared=Clan home-base cleared
|
||||
hombase.mod.set={0}''s home-base set to:
|
||||
hombase.not.set=Home-base not set
|
||||
rival.limit.reached=You have reached the rival limit. You cannot rival any more clans.
|
||||
you.moved.teleport.cancelled=You moved, teleport cancelled
|
||||
waiting.for.teleport.stand.still.for.0.seconds=Waiting for teleport, stand still for {0} seconds
|
||||
no.teleport=You are not allowed to teleport to that location
|
||||
on=on
|
||||
off=off
|
||||
leave=leave
|
||||
join=join
|
||||
mute=mute
|
||||
player.rank.changed=Rank has been set
|
||||
your.clans.are.already.rivals=Your clans are already rivals
|
||||
player.got.money=You got {0} for killing {1} based on you KDR: {2}
|
||||
cleared.bb=Cleared the bulletin board
|
||||
clan.balance=Clan-Balance: {0}
|
||||
bb.fee.player.kicked={0} was kicked for not paying the fee
|
||||
bb.fee.set={0} $ is the fee
|
||||
bb.clan.deposit={0} $ were deposited
|
||||
player.clan.deposit=You deposited {0}
|
||||
bb.clan.withdraw={0} $ were withdrawn
|
||||
player.clan.withdraw=You withdraw {0}
|
||||
clan.bank.not.enough.money=Your clans bank has not enough money
|
||||
your.clans.are.not.rivals=Your clans are not rivals
|
||||
you.cannot.rival.your.own.clan=You cannot rival your own clan
|
||||
the.clan.members.reached.limit=Your clan members reached limit
|
||||
you.have.reseted.your.kdr=You have reseted your KDR
|
||||
you.have.reseted.0.kdr=You have reseted {0}''s KDR
|
||||
you.have.reseted.kdr.of.all.players=You have reseted the KDR of all players
|
||||
resign.yes=Yes
|
||||
resign.no=No
|
||||
resign.confirmation=Are you sure you want to resign? {0}
|
||||
resign.success=You have successfully resigned from your clan
|
||||
player.is.not.a.leader.of.any.clan=The player is not a leader of any clan
|
||||
you.cannot.demote.the.last.leader=You cannot demote the last leader
|
||||
player.successfully.demoted=The player was successfully demoted
|
||||
bb.ago= ago
|
||||
bb.moments=moments
|
||||
bb.seconds= seconds
|
||||
bb.minutes= minutes
|
||||
bb.one.minute=1 minute
|
||||
bb.hours= hours
|
||||
bb.one.hour=1 hour
|
||||
bb.days= days
|
||||
bb.one.day=1 day
|
||||
the.fee.is.0.and.its.current.value.is.1=The fee is {0} and the its current value is {1} $
|
||||
fee.enabled=enabled
|
||||
fee.disabled=disabled
|
||||
fee.set=The fee was successfully set
|
||||
max.fee.allowed.is.0=Max fee allowed is {0}
|
||||
fee.collected={0} $ were withdrawn for the clan fee
|
||||
invalid.fee=The value you inserted is not valid
|
||||
player.purged=The player was successfully purged
|
||||
upkeep.collected={0} $ were withdrawn for the upkeep
|
||||
balance.is.not.enough.for.upkeep=The clan balance is not enough for paying the upkeep ({0} $), deposit the amount to avoid being disbanded
|
||||
your.clan.description.must.be.longer.than=Your clan description must be longer than {0} characters
|
||||
your.clan.description.cannot.be.longer.than=Your clan description cannot be longer than {0} characters
|
||||
description.changed=You have successfully changed your clan's description
|
||||
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.0.permissions=Rank {0}''s permissions:
|
||||
available.rank.permissions=Available permissions for ranks:
|
||||
rank.already.exists=Rank already exists
|
||||
rank.0.does.not.exist=Rank {0} doesn''t exist
|
||||
rank.created=Rank created
|
||||
invalid.permission={0} is not a valid permission! Use one of these: {1}
|
||||
permission.0.added.to.rank.1=Permission {0} added to rank {1}
|
||||
permission.0.removed.from.rank.1=Permission {0} removed from rank {1}
|
||||
rank.0.deleted=Rank {0} deleted
|
||||
usage.0.rank.create=Usage: /{0} rank create [name]
|
||||
usage.0.rank.setdisplayname=Usage: /{0} rank setdisplayname [rank] [displayname], displayname can be multiple worls and contain color codes
|
||||
usage.0.rank.delete=Usage: /{0} rank delete [rank]
|
||||
usage.0.rank.permissions=Usage: /{0} rank permissions [rank] [add/remove] [permission]
|
||||
usage.0.rank.assign=Usage: /{0} rank assign [player] [rank]
|
||||
usage.0.rank.unassign=Usage: /{0} rank unassign [player]
|
||||
usage.0.rank=Usage: /{0} rank [create/assign/unassign/delete/list/setdisplayname/permissions]
|
||||
clans.ranks=Clan's ranks:
|
||||
ranks.list.item={0}# {1} ({2})
|
||||
no.ranks=No ranks were created
|
||||
rank.no.permissions=This rank doesn't have any permission
|
||||
player.unassigned.from.rank=Player unassigned from rank
|
||||
rank.command=rank
|
||||
0.rank.create.rank.1.create.rank=/{0} rank create [rank]{1} - Create a rank
|
||||
0.rank.assign.rank.player.1.assign.rank.to.player=/{0} rank assign [rank] [player]{1} - Assign rank to a member
|
||||
0.rank.unassign.player.1.unassign.player.from.rank=/{0} rank unassign [player]{1} - Unassign a member from a rank
|
||||
0.rank.delete.rank.1.delete.rank=/{0} rank delete [rank]{1} - Delete a rank
|
||||
0.rank.list.1.list.ranks=/{0} rank list{1} - List the ranks
|
||||
0.rank.setdisplayname.rank.displayname.1.set.rank.displayname=/{0} rank setdisplayname [rank] [displayname]{1} - Set a rank displayname
|
||||
0.rank.permissions.1.list.available.permissions=/{0} rank permissions{1} - List the available permissions
|
||||
0.rank.permissions.rank.1.list.rank.permissions=/{0} rank permissions [rank]{1} - List the permissions of the rank
|
||||
0.rank.permissions.rank.add.permission.1.add.a.permission.to.rank=/{0} rank permissions [rank] add [permission]{1} - Add a permission to the rank
|
||||
0.rank.permissions.rank.remove.permission.1.remove.a.permission.from.rank=/{0} rank permissions [rank] remove [permission]{1} - Remove a permission from the rank
|
||||
you.must.be.0.or.have.the.permission.1.to.use.this=You must be {0} or your leader must give your rank the permission {1} to use this
|
||||
deposit.not.allowed=Deposit is not allowed
|
||||
withdraw.not.allowed=Withdraw is not allowed
|
||||
resign.request.cancelled=Resign request cancelled
|
||||
promotion.vote.has.been.requested.from.all.leaders=Promotion vote has been requested from all leaders
|
||||
0.message.1.send.a.message.to.clan.chat=/{0} [message]{1} - Send a message to your clan's chat
|
||||
@@ -0,0 +1,505 @@
|
||||
description.command=description
|
||||
create.command=create
|
||||
list.command=list
|
||||
profile.command=profile
|
||||
roster.command=roster
|
||||
lookup.command=lookup
|
||||
leaderboard.command=leaderboard
|
||||
alliances.command=alliances
|
||||
rivalries.command=rivalries
|
||||
vitals.command=vitals
|
||||
coords.command=coords
|
||||
stats.command=stats
|
||||
ally.command=ally
|
||||
rival.command=rival
|
||||
bb.command=bb
|
||||
cape.command=cape
|
||||
modtag.command=modtag
|
||||
toggle.command=toggle
|
||||
invite.command=invite
|
||||
kick.command=kick
|
||||
bank.command=bank
|
||||
fee.command=fee
|
||||
purge.command=purge
|
||||
trust.command=trust
|
||||
untrust.command=untrust
|
||||
promote.command=promote
|
||||
demote.command=demote
|
||||
clanff.command=clanff
|
||||
ff.command=ff
|
||||
resign.command=resign
|
||||
disband.command=disband
|
||||
verify.command=verify
|
||||
ban.command=ban
|
||||
unban.command=unban
|
||||
reload.command=reload
|
||||
globalff.command=globalff
|
||||
kills.command=kills
|
||||
mostkilled.command=mostkilled
|
||||
war.command=war
|
||||
home.command=home
|
||||
setrank.command=setrank
|
||||
place.command=place
|
||||
resetkdr.command=resetkdr
|
||||
usage.description=Uso: /{0} description [description]
|
||||
usage.resetkdr=Uso: /{0} resetkdr [all/player]
|
||||
usage.clan.alliances=Uso: /{0} alliances
|
||||
usage.ally=Uso: /{0} ally add/remove [tag]
|
||||
usage.ban.unban=Uso: /{0} ban/unban [player]
|
||||
usage.rival=Uso: /{0} rival add/remove [tag]
|
||||
usage.war=Uso: /{0} war start/end [tag]
|
||||
usage.cape.url=Uso: /{0} cape [url]
|
||||
usage.setrank=Uso: /{0} setrank [player] [rank], el rango puede tener varias palabras y usar el formato &f de codigo de colores
|
||||
usage.clanff=Uso: /{0} clanff allow/block
|
||||
usage.0.coords=Uso: /{0} coords
|
||||
usage.create.tag=Uso: /{0} create [tag] [name]
|
||||
usage.demote.leader=Uso: /{0} demote [leader]
|
||||
usage.0.disband=Uso: /{0} disband
|
||||
usage.0.ff.allow.auto=Uso: /{0} ff allow/auto
|
||||
usage.0.globalff.allow.auto=Uso: /{0} globalff allow/auto
|
||||
usage.0.permissions.player=Uso: /{0} permissions [clan] add/remove [permission]
|
||||
usage.0.invite.player=Uso: /{0} invite [player]
|
||||
usage.kick.player=Uso: /{0} kick [player]
|
||||
usage.bank=Uso: /{0} bank withdraw/deposit/status [amount]
|
||||
usage.fee=Uso: /{0} fee check/set [amount]
|
||||
usage.purge=Uso: /{0} purge [player]
|
||||
usage.0.modtag.tag=Uso: /{0} modtag [tag]
|
||||
usage.list=Uso: /{0} list [name/size/kdr/founded/active] [asc/desc]
|
||||
usage.lookup.tag=Uso: /{0} lookup [tag]
|
||||
usage.0.profile.tag=Uso: /{0} profile [tag]
|
||||
usage.0.promote.member=Uso: /{0} promote <member>
|
||||
usage.0.rivalries=Uso: /{0} rivalries
|
||||
usage.0.roster.tag=Uso: /{0} roster [tag]
|
||||
usage.0.stats=Uso: /{0} stats
|
||||
usage.0.trust.player=Uso: /{0} trust [player]
|
||||
usage.0.untrust.player=Uso: /{0} untrust [player]
|
||||
usage.0.verify.tag=Uso: /{0} verify [tag]
|
||||
usage.0.vitals=Uso: /{0} vitals
|
||||
usage.0.place=Uso: /{0} place [player] [tag]
|
||||
usage.0.leaderboard=Uso: /{0} leaderboard
|
||||
0.reload.1.reload.configuration=/{0} reload{1} - Reinicia la configuracion
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire=/{0} globalff allow/auto {1} - Activa el daño entre amigos global
|
||||
0.place=/{0} place [player] [tag]{1} - Pon a un jugador en un clan
|
||||
0.ban.unban.player.1.ban.unban.a.player=/{0} ban/unban [player]{1} - Banea o desbanea a un jugador
|
||||
0.hometp.clan.1.tp.home.a.clan=/{0} home tp [clan]{1} - Teletransportate a la casa de un clan
|
||||
0.disband.tag.1.disband.a.clan=/{0} disband [tag]{1} - Disuelve un clan
|
||||
0.resetkdr.1.resets.kdr=/{0} resetkdr player/all{1} - Reinicia el KDR de todos los jugadores o de solo uno
|
||||
0.resetkdr.1.resets.your.kdr=/{0} resetkdr{1} - Reinicia tu KDR
|
||||
0.purge.player.1.purge.a.player=/{0} purge [player]{1} - Purga a un jugador
|
||||
0.verify.tag.1.verify.an.unverified.clan=/{0} verify [tag]{1} - Verifica un clan no verificado
|
||||
0.verify.1.purchase.verification.of.your.clan=/{0} verify{1} - Compra la verificacion de tu clan
|
||||
0.list.1.lists.all.clans=/{0} list [order by] [asc/desc]{1} - Lista todos los clanes - (ordenado por: nombre/tamaño/kdr/fundado/activo)
|
||||
0.profile.1.view.your.clan.s.profile=/{0} profile{1} - Mira el perfil de tu clan
|
||||
0.profile.tag.1.view.a.clan.s.profile=/{0} profile [tag]{1} - Mira el perfil de un clan
|
||||
0.lookup.1.lookup.your.info=/{0} lookup{1} - Mira tu informacion
|
||||
0.lookup.player.1.lookup.a.player.s.info=/{0} lookup [player]{1} - Mira la informacion de un jugador
|
||||
0.leaderboard.1.view.leaderboard=/{0} leaderboard{1} - Mira el top de clanes
|
||||
0.alliances.1.view.all.clan.alliances=/{0} alliances{1} - Mira todas las alianzas de los clanes
|
||||
0.rivalries.1.view.all.clan.rivalries=/{0} rivalries{1} - Mira todas las rivaldiades de los clanes
|
||||
0.roster.1.view.your.clan.s.member.list=/{0} roster{1} - Mira la lista de miembros de tu clan
|
||||
0.roster.tag.1.view.a.clan.s.member.list=/{0} roster [tag]{1} - Mira la lista de miembros de un clan
|
||||
0.vitals.1.view.your.clan.member.s.vitals=/{0} vitals{1} - Mira los signos vitales de los miembros de tu clan
|
||||
0.coords.1.view.your.clan.member.s.coordinates=/{0} coords{1} - Mira las coordenadas de los miembros de tu clan
|
||||
0.stats.1.view.your.clan.member.s.stats=/{0} stats{1} - Mira las estadisticas de los miembros de tu clan
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan=/{0} ally add/remove [tag]{1} - Agrega/quita un clan aliado
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan=/{0} rival add/remove [tag]{1} - Agrega/quita un clan rival
|
||||
0.bb.1.display.bulletin.board=/{0} bb{1} - Muestra el tablon de anuncios
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board=/{0} bb [msg]{1} - Agrega un mensaje al tablon de anuncios
|
||||
0.modtag.tag.1.modify.the.clan.s.tag=/{0} modtag [tag]{1} - Modifica el tag del clan
|
||||
0.description.description.1.modify.the.clan.s.description=/{0} description [description]{1} - Modifica la descripcion del clan
|
||||
0.cape.url.1.change.your.clan.s.cape=/{0} cape [url]{1} - Cambia la capa de tu clan
|
||||
0.invite.player.1.invite.a.player=/{0} invite [player]{1} - Invita a un jugador
|
||||
0.kick.player.1.kick.a.player.from.the.clan=/{0} kick [player]{1} - Echa a un jugador del clan
|
||||
0.trust.untrust.player.1.set.trust.level1=/{0} trust [player]{1} - Pon a un miembro como confiable
|
||||
0.trust.untrust.player.1.set.trust.level2=/{0} untrust [player]{1} - Pon a un miembro como no confiable
|
||||
0.promote.member.1.promote.a.member.to.leader=/{0} promote [member]{1} - Promueve a un miembro a lider
|
||||
0.demote.leader.1.demote.a.leader.to.member=/{0} demote [leader]{1} - Degrada a un lider a miembro
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire=/{0} clanff allow/block{1} - Maneja el fuego amigo del clan
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire=/{0} ff allow/auto{1} - Maneja tu fuego amigo personal
|
||||
0.toggle.command=/{0} toggle [{2}]{1} - Maneja configuraciones personales
|
||||
0.resign.1.resign.from.the.clan=/{0} resign{1} - Abandona tu clan
|
||||
0.disband.1.disband.your.clan=/{0} disband{1} - Disuelve tu clan
|
||||
0.trust.setrank=/{0} setrank [player] [rank]{1} - Ponle a un jugador un rango
|
||||
0.create.tag.name.1.purchase.a.new.clan=/{0} create [tag] [name]{1} - Compra un nuevo clan
|
||||
0.create.tag.name.1.create.a.new.clan=/{0} create [tag] [name]{1} - Crea un nuevo clan
|
||||
0.kills=/{0} kills{1} - Mira tu cantidad de asesinatos
|
||||
0.killsplayer=/{0} kills [player]{1} - Mira la cantidad de asesinatos de un jugador
|
||||
0.fee.check=/{0} fee check {1}- Revisa si la cuota esta habilitada y de cuanto es
|
||||
0.fee.set=/{0} fee set [amount]{1} - Pon la cuota de los miembros del clan
|
||||
0.mostkilled=/{0} mostkilled{1} - Mira la mayor cantidad de asesinatos del server
|
||||
home-menu=/{0} home{1} - Telertransportate a la casa del clan
|
||||
home-set-menu=/{0} home set{1} - Fija la casa del clan
|
||||
home-clear-menu=/{0} home clear{1} - Remueve la casa del clan
|
||||
home-regroup-menu=/{0} home regroup [me]{1} - Reagrupa a todos los miembros del clan en la casa o en tu ubicacion
|
||||
example.clan.modtag.4kfo.4l=Ejemplo: /clan modtag &4K&fo&4L
|
||||
example.clan.create=Ejemplo: /clan create &4Kol Knights of the Labyrinth
|
||||
clan=Clan
|
||||
allies=Aliados
|
||||
alliances=alianzas
|
||||
coords=coordenadas
|
||||
name=Nombre
|
||||
distance=Distancia
|
||||
coords.upper=Coordenadas
|
||||
world=Mundo
|
||||
kdr=KDR
|
||||
members=Miembros
|
||||
clans.lower=clanes
|
||||
rival=Rival
|
||||
civilian=Civil
|
||||
neutral=Neutral
|
||||
free.agent=Agente Libre
|
||||
days=dias
|
||||
rivals=Rivales
|
||||
rivalries=rivalidades
|
||||
online=Conectado
|
||||
player=Jugador
|
||||
seen=Visto
|
||||
leader=lider
|
||||
roster=lista
|
||||
trusted=confiado
|
||||
untrusted=no confiado
|
||||
deaths=Muertes
|
||||
weights=Cargas
|
||||
stats=estadisticas
|
||||
health=Vida
|
||||
armor=Armadura
|
||||
weapons=Armas
|
||||
food=Comida
|
||||
vitals=vitalidad
|
||||
verified=Verificado
|
||||
unverified=No Verificado
|
||||
profile=perfil
|
||||
civilian.abbreviation=Civ
|
||||
rank=Rango
|
||||
leaders=Lideres
|
||||
none=Ninguno
|
||||
today=Hoy
|
||||
kills=Asesinatos
|
||||
mostkilled=Mayor Asesinatos
|
||||
killcount=Cantidad Asesinatos
|
||||
attacker=Atacante
|
||||
victim=Victima
|
||||
kill.death.ratio=Proporcion Asesinatos/Muertes
|
||||
nokillsfound=No se han encontrado asesinatos
|
||||
version.loaded=[{0}] Version {1} cargada
|
||||
promoted.to.leader={0} ha sido promovido a lider
|
||||
denied.demotion={0} se ha denegado la degradacion de {1}. Consenso fallido.
|
||||
membership.invitation={0} ha denegado la invitacion a miembro
|
||||
joined.the.clan={0} se ha unido al clan
|
||||
signed.off.request.cancelled={0} ha terminado. {1} pedido cancelado.
|
||||
clan.deletion={0} denego la eliminacion del clan. Consenso fallido.
|
||||
has.been.disbanded=El clan {0} ha sido disuelto
|
||||
denied.the.promotion={0} denego promover a {1}. Consenso fallido.
|
||||
demoted.back.to.member={0} ha sido degradado a miembro
|
||||
peace.agreement.denied=El acuerdo de paz con {0} fue denegado
|
||||
denied.to.make.peace={0} ha denegado hacer paz con {1}
|
||||
broken.the.rivalry={0} ha roto la rivalidad con {1}
|
||||
broken.the.rivalry.with={0} ha roto la rivalidad con {1}
|
||||
the.alliance.was.denied=La alianza con {0} fue denegada
|
||||
denied.an.alliance={0} ha denegado la alianza con {1}
|
||||
accepted.an.alliance={0} ha aceptado la alianza con {1}
|
||||
created.an.alliance={0} ha creado una alianza con {1}
|
||||
has.joined={0} se ha unido a {1}
|
||||
proposing.to.end.the.rivalry={0} propone terminar la rivalidad con {1}
|
||||
proposing.an.alliance={0} propone una alianza con {1}
|
||||
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}
|
||||
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
|
||||
mysql.connection.failed=MySQL Connection failed
|
||||
sqlite.connection.successful=SQLite Connection successful
|
||||
sqlite.connection.failed= SQLite Connection failed
|
||||
purging.player.data=purgando informacion de: {0}
|
||||
purging.clan=Purgando clan: {0}
|
||||
clan.players=Jugadores del clan: {0}
|
||||
clans=Clanes: {0}
|
||||
banned=Fuiste baneado de usar comandos de clanes
|
||||
nothing.more.to.see=Nada mas que ver
|
||||
nothing.to.deny=Nada que denegar
|
||||
no.leader.permissions=No tienes permisos de lider
|
||||
you.have.already.voted=Ya has votado
|
||||
has.voted.to.deny={0} ha votado denegar
|
||||
nothing.to.accept=Nada que aceptar
|
||||
view.next.page=Escribe /{0} para ver la pagina siguiente.
|
||||
voted.to.accept={0} ha votado aceptar
|
||||
bulletin.board.header={0}* {1}{2} tablon de anuncios
|
||||
has.been.disbanded.rivalry.ended={0} ha sido disuelto. La rivalidad ha finalizado.
|
||||
has.been.disbanded.alliance.ended={0} ha sido disuelto. La alianza ha finalizado.
|
||||
clan.disbanded=Clan Disuelto
|
||||
1.color.day=1 {0}dia
|
||||
many.color.days={0}{1} dias
|
||||
does.not.match=No es un comando de clanes
|
||||
simpleclans.command.failure=SimpleClans command failure: {0}
|
||||
insufficient.permissions=Permisos insuficientes
|
||||
clan.is.not.verified=El clan no esta verificado
|
||||
not.a.member.of.any.clan=No eres un miembro de ningun clan
|
||||
minimum.to.make.alliance=Tu clan debe tener por lo menos {0} para hacer alianzas
|
||||
no.clan.matched=Ningun clan encontrado
|
||||
cannot.ally.with.an.unverified.clan=No puedes aliarte con un clan no verificado
|
||||
your.clans.are.not.allies=Sus clanes no son aliados
|
||||
has.broken.the.alliance={0} ha roto la alianza con {1}
|
||||
at.least.one.leader.accept.the.alliance=Por lo menos un lider del otro clan debe estar conectado para hacer la alianza
|
||||
leaders.have.been.asked.for.an.alliance=Los lideres de {0} fueron consultados para realizar una alianza
|
||||
your.clans.are.already.allies=Sus clanes ya son aliados
|
||||
your.clan.cannot.create.rivals=Tu clan no puede crear rivales
|
||||
min.players.rivalries=Tu clan debe tener por lo menos {0} para crear una rivalidad
|
||||
this.player.is.already.banned=Este jugador ya esta baneado
|
||||
player.added.to.banned.list=Jugador agregado a la lista de ban
|
||||
you.banned=Fuiste baneado de usar comandos de clanes
|
||||
cape.must.be.png=The cape url must point to a png image
|
||||
url.error=The URL is retuning an error. Please verify that it is working.
|
||||
changed.the.clan.cape={0} ha cambiado la capa del clan
|
||||
clan.wide.friendly.fire.blocked=Fuego amigo para todo el clan bloqueado
|
||||
clan.wide.friendly.fire.is.allowed=Fuego amigo para todo el clan permitido
|
||||
only.trusted.players.can.access.clan.coords=Solo jugadores confiables pueden acceder a las coordenadas
|
||||
you.are.the.only.member.online=Eres el unico miembro conectados
|
||||
your.clan.tag.cannot.be.longer.than.characters=El tag de tu clan no puede ser mas largo que {0} caracteres
|
||||
your.clan.tag.must.be.longer.than.characters=El tag de tu clan debe ser mas largo que {0} caracteres
|
||||
your.tag.cannot.contain.the.following.colors=Tu tag no puede contener los siguientes formatos de colores: {0}
|
||||
your.tag.cannot.contain.color.codes=Tu tag no puede contener formato de colores
|
||||
you.cannot.set.colored.ranks=No puedes poner rangos con color
|
||||
your.clan.name.cannot.be.longer.than.characters=El nombre de tu clan no puede ser mas largo que {0} caracteres
|
||||
your.clan.name.must.be.longer.than.characters=El nombre de tu clan debe ser mas largo que {0} caracteres
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=El tag de tu clan solo puede contener letras, numeros y formato de colores
|
||||
your.clan.name.cannot.contain.color.codes=El nombre de tu clan no puede contener formato de colores
|
||||
that.tag.name.is.disallowed=Ese nombre de tag no esta permitido
|
||||
you.must.first.resign=Primero debes abandonar {0}
|
||||
clan.with.this.tag.already.exists=Un clan con ese tag ya existe
|
||||
get.your.clan.verified.to.access.advanced.features=Verifica tu clan para acceder a funcionalidades avanzadas
|
||||
clan.created=Clan {0} creado
|
||||
not.enough.leaders.online.to.vote.on.demotion=No hay suficientes lideres conectados para votar esta degradacion
|
||||
leaders.must.be.online.to.vote.on.demotion=Todos los lideres sin contar el que se degradara deben estar conectados para votar
|
||||
demotion.vote.has.been.requested.from.all.leaders=Voto para degradar fue solicitado por todos los lideres
|
||||
player.is.not.a.leader.of.your.clan=El jugador no es un lider de tu clan
|
||||
clan.has.been.disbanded=Clan {0} fue disuelto
|
||||
clan.disband.vote.has.been.requested.from.all.leaders=Voto para disolver clan fue solicitado por todos los lideres
|
||||
friendy.fire.is.now.managed.by.your.clan=Fuego amigo es ahora manejado por tu clan
|
||||
personal.friendly.fire.is.set.to.allowed=Fuego amigo personal fue habilitado
|
||||
global.friendy.fire.is.now.managed.by.each.clan=Fuego amigo global es ahora manejado por cada clan
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan=Fuego amigo global ya es manejado por cada clan
|
||||
global.friendly.fire.is.set.to.allowed=Fuego amigo global fue habilitado
|
||||
global.friendly.fire.is.already.being.allowed=Fuego amigo global ya esta habilitado
|
||||
no.player.matched=Ningun jugador encontrado
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans=El jugador no tiene permiso de unirse a clanes
|
||||
you.cannot.invite.yourself=No puedes invitarte a vos mismo
|
||||
this.player.is.banned.from.using.clan.commands=Este jugador fue baneado de usar comandos de clanes
|
||||
the.player.is.already.member.of.another.clan=El jugador es miembro de otro clan
|
||||
has.been.asked.to.join={0} te ha solicitado unirte a {1}
|
||||
you.cannot.kick.yourself=No puedes expulsarte a vos mismo
|
||||
the.player.is.not.a.member.of.your.clan=El jugador no es un miembro de tu clan
|
||||
you.cannot.kick.another.leader=No puedes expulsar a un lider
|
||||
has.been.kicked.by={0} fue expulsado por {1}
|
||||
no.clans.have.been.created=Ningun clan fue creado
|
||||
total.clans=Clanes Totales:
|
||||
legend=Leyenda:
|
||||
kill.type.civilian=Tipo de Asesinato: {0}Civil
|
||||
no.player.data.found=No se encontro informacion de jugador
|
||||
kill.type.0=Tipo de Asesinato: {0}
|
||||
s.player.info={0} informacion de jugador
|
||||
clan.0=Clan: {0}
|
||||
status.0=Estatus: {0}
|
||||
rank.0=Rango: {0}
|
||||
kdr.0=KDR: {0}
|
||||
deaths.0=Muertes: {0}
|
||||
fee.0.value.1=Cuota: {0}, {1} $
|
||||
join.date.0=Fecha de union: {0}
|
||||
last.seen.0=Ultima vez visto: {0}
|
||||
past.clans.0=Clanes anteriores: {0}
|
||||
inactive.0=Inactivo: {0}
|
||||
kill.totals=Asesinatos Totales:
|
||||
clan.commands=comandos de clan
|
||||
you.can.only.modify.the.color.and.case.of.the.tag=Solo se puede modificar el color de la etiqueta
|
||||
tag.changed.to.0=Tag cambiado a {0}
|
||||
name.0=Nombre: {0}
|
||||
description.0=Descripcion: {0}
|
||||
leaders.0=Lideres: {0}
|
||||
members.online.0=Miembros Online: {0}
|
||||
allies.0=Aliados: {0}
|
||||
rivals.0=Rivales: {0}
|
||||
founded.0=Fundado: {0}
|
||||
the.member.to.be.promoted.must.be.online=El miembro a ser promovido debe estar online
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan=El jugador no tiene permiso de ser lider de un clan
|
||||
you.cannot.promote.yourself=No puedes promoverte a ti mismo
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion=Todos los lideres deben estar conectados para votar esta promocion
|
||||
the.player.is.already.a.leader=El jugador ya es un lider
|
||||
configuration.reloaded=Configuracion reiniciada
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan=El ultimo lider no puede abandonar. Debes agregar un nuevo lider o disolver el clan.
|
||||
0.has.resigned={0} ha abandonado
|
||||
only.trusted.players.can.access.clan.stats=Solo jugadores confiables pueden acceder a las estadisticas del clan
|
||||
you.cannot.trust.yourself=No puedes ponerte como confiable a vos mismo
|
||||
leaders.are.already.trusted=Lideres ya son confiables
|
||||
this.player.is.already.trusted=Este jugador ya es confiable
|
||||
has.been.given.trusted.status.by={0} le han dado estatus de confiable por {1}
|
||||
this.player.is.not.banned=Este jugador no esta baneado
|
||||
player.removed.from.the.banned.list=Jugador desbaneado
|
||||
you.have.been.unbanned.from.clan.commands=Fuiste desbaneado de usar comandos de clanes
|
||||
you.cannot.untrust.yourself=No puedes ponerte como no confiable a vos mismo
|
||||
leaders.cannot.be.untrusted=Lideres no pueden ser no confiables
|
||||
this.player.is.already.untrusted=Este jugador ya es no confiable
|
||||
has.been.given.untrusted.status.by={0} le han dado estatus de no confiable por {1}
|
||||
the.clan.does.not.exist=El clan no existe
|
||||
the.clan.is.already.verified=El clan ya esta verificado
|
||||
the.clan.has.been.verified=El clan fue verificado
|
||||
clan.0.has.been.verified=Clan {0} fue verificado!
|
||||
only.trusted.players.can.access.clan.vitals=Solo jugadores confiables pueden ver la vitalidad del clan
|
||||
total.clan.players.0=Total de jugadores del clan: {0}
|
||||
proposing.war={0} esta proponiendo comenzar una guerra con {1}
|
||||
you.can.only.start.war.with.rivals=Solo puedes comenzar una guerra con rivales
|
||||
leaders.have.been.asked.to.accept.the.war.request=Los lideres del clan {0} fueron solicitados de aceptar la solicitud de guerra
|
||||
leaders.asked.to.end.rivalry=Los lideres del clan {0} fueron solicitados de terminar la guerra
|
||||
proposing.to.end.the.war={0} esta proponiendo terminar la guerra con {1}
|
||||
clans.already.at.war=Sus clanes ya estan en guerra
|
||||
clans.not.at.war=Sus clanes no estan en guerra
|
||||
you.are.at.war={0} esta ahora en guerra con {1}
|
||||
denied.war.req={0} denego la solicitud de guerra de {1}
|
||||
you.are.no.longer.at.war={0} no esta mas en guerra con {1}
|
||||
end.war.denied=Solicitud de terminar la guerra fue denegada por {0}
|
||||
denied.war.end={0} denego la solicitud de {1} de terminar con la guerra
|
||||
0.war=/{0} war{1} start/end [tag] - Empezar o terminar una guerra
|
||||
has.initiated.a.rivalry={0} ha iniciado una rivalidad con {1}
|
||||
start=start
|
||||
end=end
|
||||
add=add
|
||||
remove=remove
|
||||
allow=allow
|
||||
block=block
|
||||
auto=auto
|
||||
war=war
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow={0}E=Espada{1}, {2}A=Arco{3}, {4}F=Flechas
|
||||
weapon.S=E
|
||||
weapon.B=A
|
||||
weapon.A=F
|
||||
materials=Materiales
|
||||
armor.h=H
|
||||
armor.c=C
|
||||
armor.l=L
|
||||
armor.B=B
|
||||
diamond=diamante
|
||||
gold=oro
|
||||
wood=madera
|
||||
server.announce=Anuncio del Servidor
|
||||
clan.announce=Anuncio del Clan
|
||||
leader.announce=Anuncio del Lider
|
||||
hunger=Hambre
|
||||
stone=piedra
|
||||
iron=hierro
|
||||
the.clan.cannot.be.rivaled=El clan no puede hacerse rival
|
||||
capeoff=Capa desactivada
|
||||
capeon=Capa activada
|
||||
bboff=Tabla de anuncios desactivada
|
||||
bbon=Tabla de anuncios activada
|
||||
tagoff=Tag desactivada
|
||||
tagon=Tag toggled on
|
||||
depositon=Deposito activado
|
||||
depositoff=Deposito desactivado
|
||||
withdrawon=Retiro activado
|
||||
withdrawoff=Retiro desactivado
|
||||
feeoff=Cuota desactivada
|
||||
feeon=Cuota activada
|
||||
home.base.only.once=La casa del clan solo puede establecerse una vez
|
||||
now.at.homebase=Ahora estas en la casa del clan {0}
|
||||
hombase.set=Casa del clan guardada: {0}
|
||||
hombase.cleared=Casa del clan removida
|
||||
hombase.mod.set=Casa del clan {0} puesta en:
|
||||
hombase.not.set=Casa del clean no puesta
|
||||
rival.limit.reached=Llegaste al limite de rivales. You cannot rival any more clans.
|
||||
you.moved.teleport.cancelled=Te moviste, teletransporte cancelado
|
||||
waiting.for.teleport.stand.still.for.0.seconds=Esperando para teletransportar, quedate quieto por {0} segundos
|
||||
no.teleport=No tienes permisos de teletransportarte alli
|
||||
on=on
|
||||
off=off
|
||||
leave=leave
|
||||
join=join
|
||||
mute=mute
|
||||
player.rank.changed=El rango se ha asignado
|
||||
your.clans.are.already.rivals=Sus clanes ya son rivales
|
||||
player.got.money=Obtuviste {0} por matar a {1} basado en tu KDR: {2}
|
||||
cleared.bb=Has limpieado el tablon de anuncios
|
||||
clan.balance=Balance del Clan: {0}
|
||||
bb.fee.player.kicked={0} fue expulsado por no pagar la cuota
|
||||
bb.fee.set={0} $ es la cuota
|
||||
bb.clan.deposit={0} $ fueron depositados
|
||||
player.clan.deposit=Has depositado {0}
|
||||
bb.clan.withdraw={0} $ fueron retirados
|
||||
player.clan.withdraw=Has retirado {0}
|
||||
clan.bank.not.enough.money=El banco de tu clan no tiene suficientes fondos
|
||||
your.clans.are.not.rivals=Sus clanes no son rivales
|
||||
you.cannot.rival.your.own.clan=No puedes ser rival de tu propio clan
|
||||
the.clan.members.reached.limit=La cantidad de miembros de tu clan llego al limite
|
||||
you.have.reseted.your.kdr=Has reseteado tu KDR
|
||||
you.have.reseted.0.kdr=Has reseteado el KDR de {0}
|
||||
you.have.reseted.kdr.of.all.players=Has reseteado el KDR de todos los jugadores
|
||||
resign.yes=Yes
|
||||
resign.no=No
|
||||
resign.confirmation=Estas seguro que quieres abandonar el clan? {0}
|
||||
resign.success=Has abandonado el clan exitosamente
|
||||
player.is.not.a.leader.of.any.clan=El jugador no es lider de ningun clan
|
||||
you.cannot.demote.the.last.leader=No puedes degradar al ultimo lider
|
||||
player.successfully.demoted=El jugador fue degradado correctamente
|
||||
bb.ago= ago
|
||||
bb.moments=momentos
|
||||
bb.seconds= segundos
|
||||
bb.minutes= minutos
|
||||
bb.one.minute=1 minuto
|
||||
bb.hours= horas
|
||||
bb.one.hour=1 hora
|
||||
bb.days= dias
|
||||
bb.one.day=1 dia
|
||||
the.fee.is.0.and.its.current.value.is.1=La cuota es {0} y su valor actual es {1} $
|
||||
fee.enabled=enabled
|
||||
fee.disabled=disabled
|
||||
fee.set=La cuota fue puesta correctamente
|
||||
max.fee.allowed.is.0=La cuota maxima permitida es {0}
|
||||
fee.collected={0} $ fueron retirados por la cuota del clan
|
||||
invalid.fee=El valor insertado no es valido
|
||||
player.purged=El jugador fue purgado correctamente
|
||||
upkeep.collected={0} $ fueron retirados por el mantenimiento
|
||||
balance.is.not.enough.for.upkeep=Los fondos del clan no son suficientes para pagar el mantenimiento ({0} $), deposita el monto para evitar que se disuelva el clan
|
||||
your.clan.description.must.be.longer.than=La descripcion del clan debe ser mas larga que {0} caracteres
|
||||
your.clan.description.cannot.be.longer.than=La descripcion del clan no debe ser mas larga que {0} caracteres
|
||||
description.changed=Cambiaste la descripcion de tu clan exitosamente
|
||||
no.description=No hay descripcion
|
||||
the.player.must.wait.0.before.joining.your.clan.again=Este jugador debe esperar {0} minuto(s) antes de volver a entrar a tu clan
|
||||
disabled.command=Comando deshabilitado
|
||||
rank.displayname.updated=El nombre de muestra del clan fue actualizado!
|
||||
rank.0.permissions=Permisos del Rango {0}:
|
||||
available.rank.permissions=Permisos habilitados para rangos:
|
||||
rank.already.exists=El rango ya existe
|
||||
rank.0.does.not.exist=El rango {0} no existe
|
||||
rank.created=Rango creado
|
||||
invalid.permission={0} no es un permiso valido! Usa uno de estos: {1}
|
||||
permission.0.added.to.rank.1=Permiso {0} agregado al rango {1}
|
||||
permission.0.removed.from.rank.1=Permiso {0} removido del rango {1}
|
||||
rank.0.deleted=Rango {0} eliminado
|
||||
usage.0.rank.create=Uso: /{0} rank create [name]
|
||||
usage.0.rank.setdisplayname=Uso: /{0} rank setdisplayname [rank] [displayname], el nombre de muetra puede ser varias palabras y tener colores
|
||||
usage.0.rank.delete=Uso: /{0} rank delete [rank]
|
||||
usage.0.rank.permissions=Uso: /{0} rank permissions [rank] [add/remove] [permission]
|
||||
usage.0.rank.assign=Uso: /{0} rank assign [player] [rank]
|
||||
usage.0.rank.unassign=Uso: /{0} rank unassign [player]
|
||||
usage.0.rank=Uso: /{0} rank [create/assign/unassign/delete/list/setdisplayname/permissions]
|
||||
clans.ranks=Rangos del Clan:
|
||||
ranks.list.item={0}# {1} ({2})
|
||||
no.ranks=Ningun rango fue creado
|
||||
rank.no.permissions=Este rango no tiene ningun permiso
|
||||
player.unassigned.from.rank=Jugador desasignado del rango
|
||||
rank.command=rank
|
||||
0.rank.create.rank.1.create.rank=/{0} rank create [rank]{1} - Crea un rango
|
||||
0.rank.assign.rank.player.1.assign.rank.to.player=/{0} rank assign [rank] [player]{1} - Asigna a un miembro un rango
|
||||
0.rank.unassign.player.1.unassign.player.from.rank=/{0} rank unassign [player]{1} - Desasigna a un miembro de un rango
|
||||
0.rank.delete.rank.1.delete.rank=/{0} rank delete [rank]{1} - Elimina un rango
|
||||
0.rank.list.1.list.ranks=/{0} rank list{1} - Lista todos los rangos
|
||||
0.rank.setdisplayname.rank.displayname.1.set.rank.displayname=/{0} rank setdisplayname [rank] [displayname]{1} - Pon el nombre de muestra de un rango
|
||||
0.rank.permissions.1.list.available.permissions=/{0} rank permissions{1} - Lista los permisos disponibles
|
||||
0.rank.permissions.rank.1.list.rank.permissions=/{0} rank permissions [rank]{1} - Lista los permisos de un rango
|
||||
0.rank.permissions.rank.add.permission.1.add.a.permission.to.rank=/{0} rank permissions [rank] add [permission]{1} - Agrega un permiso a un rango
|
||||
0.rank.permissions.rank.remove.permission.1.remove.a.permission.from.rank=/{0} rank permissions [rank] remove [permission]{1} - Quita el permiso de un rango
|
||||
you.must.be.0.or.have.the.permission.1.to.use.this=Debes ser {0} o tu lider debe darle a tu rango el permiso {1} para usar esto
|
||||
deposit.not.allowed=Deposito no permitido
|
||||
withdraw.not.allowed=Retiro no permitido
|
||||
|
||||
#File Translated by xtomyserrax
|
||||
@@ -0,0 +1,428 @@
|
||||
description.command=description
|
||||
create.command=create
|
||||
list.command=list
|
||||
profile.command=profile
|
||||
roster.command=roster
|
||||
lookup.command=lookup
|
||||
leaderboard.command=leaderboard
|
||||
alliances.command=alliances
|
||||
rivalries.command=rivalries
|
||||
vitals.command=vitals
|
||||
coords.command=coords
|
||||
stats.command=stats
|
||||
ally.command=ally
|
||||
rival.command=rival
|
||||
bb.command=bb
|
||||
cape.command=cape
|
||||
modtag.command=modtag
|
||||
toggle.command=toggle
|
||||
invite.command=invite
|
||||
kick.command=kick
|
||||
bank.command=bank
|
||||
fee.command=fee
|
||||
purge.command=purge
|
||||
trust.command=trust
|
||||
untrust.command=untrust
|
||||
promote.command=promote
|
||||
demote.command=demote
|
||||
clanff.command=clanff
|
||||
ff.command=ff
|
||||
resign.command=resign
|
||||
disband.command=disband
|
||||
verify.command=verify
|
||||
ban.command=ban
|
||||
unban.command=unban
|
||||
reload.command=reload
|
||||
globalff.command=globalff
|
||||
kills.command=kills
|
||||
mostkilled.command=mostkilled
|
||||
war.command=war
|
||||
home.command=home
|
||||
setrank.command=setrank
|
||||
place.command=place
|
||||
resetkdr.command=resetkdr
|
||||
usage.resetkdr=Használat: /{0} resetkdr [all/player]
|
||||
usage.clan.alliances=Használat: /{0} alliances
|
||||
usage.ally=Használat: /{0} ally add/remove [címke]
|
||||
usage.ban.unban=Használat: /{0} ban/unban [játékos]
|
||||
usage.rival=Használat: /{0} rival add/remove [címke]
|
||||
usage.war=Használat: /{0} war start/end [címke]
|
||||
usage.cape.url=Használat: /{0} cape [url]
|
||||
usage.setrank=Használat: /{0} setrank [játékos] [rang], rangsor több világot is tartalmazhat és tartalmazhat &f színkódokat
|
||||
usage.clanff=Használat: /{0} clanff allow/block
|
||||
usage.0.coords=Használat: /{0} coords
|
||||
usage.create.tag=Használat: /{0} create [címke] [név]
|
||||
usage.demote.leader=Használat: /{0} demote [vezető]
|
||||
usage.0.disband=Használat: /{0} disband
|
||||
usage.0.ff.allow.auto=Használat: /{0} ff allow/auto
|
||||
usage.0.globalff.allow.auto=Használat: /{0} globalff allow/auto
|
||||
usage.0.permissions.player=Használat: /{0} permissions [klán] add/remove [jog]
|
||||
usage.0.invite.player=Használat: /{0} invite [játékos]
|
||||
usage.kick.player=Használat: /{0} kick [játékos]
|
||||
usage.bank=Használat: /{0} bank withdraw/deposit/status [mennyiség]
|
||||
usage.0.modtag.tag=Használat: /{0} modtag [címke]
|
||||
usage.lookup.tag=Használat: /{0} lookup [címke]
|
||||
usage.0.profile.tag=Használat: /{0} profile [címke]
|
||||
usage.0.promote.member=Használat: /{0} promote <tag>
|
||||
usage.0.rivalries=Használat: /{0} rivalries
|
||||
usage.0.roster.tag=Használat: /{0} roster [címke]
|
||||
usage.0.stats=Használat: /{0} stats
|
||||
usage.0.trust.player=Használat: /{0} trust [játékos]
|
||||
usage.0.untrust.player=Használat: /{0} untrust [játékos]
|
||||
usage.0.verify.tag=Használat: /{0} verify [címke]
|
||||
usage.0.vitals=Használat: /{0} vitals
|
||||
usage.0.place=Használat: /{0} place [player] [címke]
|
||||
usage.0.leaderboard=Használat: /{0} leaderboard
|
||||
0.reload.1.reload.configuration=/{0} reload{1} - Konfiguráció újratöltése
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire=/{0} globalff allow/auto {1} - Beállítsa a globális barátságot
|
||||
0.place=/{0} place [player] [címke]{1} - Berak egy játékost egy klánba
|
||||
0.ban.unban.player.1.ban.unban.a.player=/{0} ban/unban [játékos]{1} - Kitiltja/visszaengedi a játékost
|
||||
0.hometp.clan.1.tp.home.a.clan=/{0} home tp [clan]{1} - Elteleportálja minden klán otthonába
|
||||
0.disband.tag.1.disband.a.clan=/{0} disband [címke]{1} - Eltávolít egy klánt
|
||||
0.resetkdr.1.resets.kdr=/{0} resetkdr player/all{1} - Visszaállítsa az összes játékos KDR-jét vagy csak egy
|
||||
0.resetkdr.1.resets.your.kdr=/{0} resetkdr{1} - Visszaállítja KDR-t
|
||||
0.purge.player.1.purge.a.player=/{0} purge [player]{1} - Purge a player
|
||||
0.verify.tag.1.verify.an.unverified.clan=/{0} verify [címke]{1} - Ellenőrzi az ellenőrzött klánt
|
||||
0.verify.1.purchase.verification.of.your.clan=/{0} verify{1} - A klán megvásárlásának ellenőrzése
|
||||
0.list.1.lists.all.clans=/{0} list [name/size/kdr/founded/active] [asc/desc]{1} - Lists all clans
|
||||
0.profile.1.view.your.clan.s.profile=/{0} profile{1} - Megtekinti a klán profilját
|
||||
0.profile.tag.1.view.a.clan.s.profile=/{0} profile [címke]{1} - Klán profiljának megtekintése
|
||||
0.lookup.1.lookup.your.info=/{0} lookup{1} - Megkeresi az adatait
|
||||
0.lookup.player.1.lookup.a.player.s.info=/{0} lookup [játékos]{1} - Megkeresi a játékos információit
|
||||
0.leaderboard.1.view.leaderboard=/{0} leaderboard{1} - Megnézi a ranglistát
|
||||
0.alliances.1.view.all.clan.alliances=/{0} alliances{1} - Megtekinti az összes klán szövetséget
|
||||
0.rivalries.1.view.all.clan.rivalries=/{0} rivalries{1} - Megtekinti az összes klánversenyt
|
||||
0.roster.1.view.your.clan.s.member.list=/{0} roster{1} - Megtekinti a klán taglistáját
|
||||
0.roster.tag.1.view.a.clan.s.member.list=/{0} roster [címke]{1} - Egy osztály taglista megtekintéset
|
||||
0.vitals.1.view.your.clan.member.s.vitals=/{0} vitals{1} - Megtekinti a klántagod vitálását
|
||||
0.coords.1.view.your.clan.member.s.coordinates=/{0} coords{1} - Megtekinti a klántagod koordinátáit
|
||||
0.stats.1.view.your.clan.member.s.stats=/{0} stats{1} - Megtekinti a klántag statisztikáit
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan=/{0} ally add/remove [címke]{1} - Egy szövetséges klán hozzáadása/eltávolítása
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan=/{0} rival add/remove [címke]{1} - Egy rivális klán hozzáadása/eltávolítása
|
||||
0.bb.1.display.bulletin.board=/{0} bb{1} - Hirdetőtábla megjelenítése
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board=/{0} bb [msg]{1} - Üzenet hozzáadása a hirdetőtáblához
|
||||
0.modtag.tag.1.modify.the.clan.s.tag=/{0} modtag [címke]{1} - Módosítja a klán címkéjét
|
||||
0.cape.url.1.change.your.clan.s.cape=/{0} cape [url]{1} - Megváltoztatja a klánodat
|
||||
0.invite.player.1.invite.a.player=/{0} invite [játékos]{1} - Meghív egy játékost
|
||||
0.kick.player.1.kick.a.player.from.the.clan=/{0} kick [játékos]{1} - Kirúg egy játékost a klánból
|
||||
0.trust.untrust.player.1.set.trust.level1=/{0} trust [játékos]{1} - Beállítja a tagot megbízhatónak
|
||||
0.trust.untrust.player.1.set.trust.level2=/{0} untrust [játékos]{1} - Beállítja a tagot megbízhatatlannak
|
||||
0.promote.member.1.promote.a.member.to.leader=/{0} promote [tag]{1} - Támogat egy tagot vezetőnek
|
||||
0.demote.leader.1.demote.a.leader.to.member=/{0} demote [vezető]{1} - Vezet egy vezetőt a tagnak
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire=/{0} clanff allow/block{1} - Kapcsolja a klán baráti tüzet
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire=/{0} ff allow/auto{1} - Kapcsolja a személyes barátságos tüzet
|
||||
0.toggle.command=/{0} toggle [{2}]{1} - A személyes beállítások módosítása
|
||||
0.resign.1.resign.from.the.clan=/{0} resign{1} - Tiltakozik a klánról
|
||||
0.disband.1.disband.your.clan=/{0} disband{1} - Lehúzza a klánját
|
||||
0.trust.setrank=/{0} setrank [játékos] [rank]{1} - Ad egy rangot a játékosnak
|
||||
0.create.tag.name.1.purchase.a.new.clan=/{0} create [címke] [name]{1} - Vásárol egy új klánt
|
||||
0.create.tag.name.1.create.a.new.clan=/{0} create [címke] [name]{1} - Létrehoz egy új klánt
|
||||
0.kills=/{0} kills{1} - Megnézi az ölésedet
|
||||
0.killsplayer=/{0} kills [játékos]{1} - Megtekinti a játékos ölési számát
|
||||
0.fee.check=/{0} fee check {1}- Check if the fee is enabled and how much is it
|
||||
0.fee.set=/{0} fee set [amount]{1} - Set the clan's member fee
|
||||
0.mostkilled=/{0} mostkilled{1} - Megtekinti a kiszolgálón leggyakoribb ölési számokat
|
||||
home-menu=/{0} home{1} - Teleportálás a klán hazai bázisához
|
||||
home-set-menu=/{0} home set{1} - Beállítsa a klán hazai bázisát
|
||||
home-clear-menu=/{0} home clear{1} - Törli a klán hazai bázisát
|
||||
home-regroup-menu=/{0} home regroup [me]{1} - Áthelyezi az összes tagot a háziasított klán vagy magad számára
|
||||
example.clan.modtag.4kfo.4l=Példa: /clan modtag &4K&fo&4L
|
||||
example.clan.create=Példa: /clan create &4Kol labirintus lovagjai
|
||||
clan=Klán
|
||||
allies=Szövetségesek
|
||||
alliances=szövetségek
|
||||
coords=koordináták
|
||||
name=Név
|
||||
distance=Távolság
|
||||
coords.upper=Koordináták
|
||||
world=Világ
|
||||
kdr=KDR
|
||||
members=Tagok
|
||||
clans.lower=klánok
|
||||
rival=Vetélytárs
|
||||
civilian=Polgári
|
||||
neutral=Semleges
|
||||
free.agent=Szabadúszó
|
||||
days=nap
|
||||
rivals=Versenytárs
|
||||
rivalries=versengés
|
||||
online=Elérhető
|
||||
player=Játékos
|
||||
seen=Látott
|
||||
leader=vezető
|
||||
roster=névsor
|
||||
trusted=megbízható
|
||||
untrusted=megbízhatatlan
|
||||
deaths=Halálok
|
||||
weights=Súlyok
|
||||
stats=stats
|
||||
health=Élet
|
||||
armor=Páncél
|
||||
weapons=Fegyverek
|
||||
food=Étel
|
||||
vitals=nemes szervek
|
||||
verified=ellenőrzött
|
||||
unverified=Nem ellenőrzött
|
||||
profile=profil
|
||||
civilian.abbreviation=Polgár
|
||||
rank=Rang
|
||||
leaders=Vezetők
|
||||
none=Semmi
|
||||
today=Ma
|
||||
kills=Ölések
|
||||
mostkilled=Legtöbbször megölt
|
||||
killcount=Ölés számítás
|
||||
attacker=Támadó
|
||||
victim=Áldozat
|
||||
kill.death.ratio=Ölés/halál arány
|
||||
nokillsfound=Nincs ölések találva
|
||||
version.loaded=[{0}] Verzió {1} betöltve
|
||||
promoted.to.leader={0} vezető szerepet kapott
|
||||
denied.demotion={0} tagadta a lecsökkentését {1}. A konszenzus sikertelen volt.
|
||||
membership.invitation={0} tagadta a tagsági meghívást
|
||||
joined.the.clan={0} csatlakozott a klánhoz
|
||||
signed.off.request.cancelled={0} aláírták. {1} kérés törölve.
|
||||
clan.deletion={0} tagadta a klán törlését. A konszenzus sikertelen volt.
|
||||
has.been.disbanded=A(z) {0} klán feloszlott
|
||||
denied.the.promotion={0} tagadta a {1} promócióját. A konszenzus sikertelen volt.
|
||||
demoted.back.to.member={0} visszatért a taghoz
|
||||
peace.agreement.denied=A(z) {0} kötött békemegállapodást megtagadták
|
||||
denied.to.make.peace={0} tagadta a békét a(z) {1}
|
||||
broken.the.rivalry={0} megszüntette a versenyt {1}
|
||||
broken.the.rivalry.with={0} megszüntette a versenyt {1}
|
||||
the.alliance.was.denied=A(z) {0} szövetség tagadta
|
||||
denied.an.alliance={0} tagadta a szövetséget {1}
|
||||
accepted.an.alliance={0} szövetséget kötött a(z) {1}
|
||||
created.an.alliance={0} szövetséget kötött a(z) {1}
|
||||
has.joined={0} csatlakozott {1}
|
||||
proposing.to.end.the.rivalry={0} azt javasolja, hogy vessen véget a rivalizálás {1}
|
||||
proposing.an.alliance={0} szövetséget javasol {1}
|
||||
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}
|
||||
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
|
||||
mysql.connection.failed=MySQL kapcsolat sikertelen
|
||||
sqlite.connection.successful=SQLite kapcsolat sikeres
|
||||
sqlite.connection.failed= SQLite kapcsolat sikertelen
|
||||
purging.player.data=tisztító játékos adatai: {0}
|
||||
purging.clan=Pusztító klán: {0}
|
||||
clan.players=Klán játékosok: {0}
|
||||
clans=Klánok: {0}
|
||||
banned=Kitiltottad a klánparancsok használatát
|
||||
nothing.more.to.see=Semmi többet látni
|
||||
nothing.to.deny=Semmi tagadni
|
||||
no.leader.permissions=Nincs vezető engedélye
|
||||
you.have.already.voted=Már szavaztál
|
||||
has.voted.to.deny={0} tagadta a szavazást
|
||||
nothing.to.accept=Semmi elfogadni
|
||||
view.next.page=Típus /{0} a következő oldal megtekintéséhez.
|
||||
voted.to.accept={0} elfogadták
|
||||
bulletin.board.header={0}* {1}{2} hirdetőtábla
|
||||
has.been.disbanded.rivalry.ended={0} feloszlott. A rivalizálás véget ért.
|
||||
has.been.disbanded.alliance.ended={0} feloszlott. A Szövetség véget ért.
|
||||
clan.disbanded=A klán megszűnt
|
||||
1.color.day=1 {0}nap
|
||||
many.color.days={0}{1} nap
|
||||
does.not.match=Nem egyezik a klán parancsával
|
||||
simpleclans.command.failure=A SimpleClans parancs sikertelen: {0}
|
||||
insufficient.permissions=Nincs elegendő engedély
|
||||
clan.is.not.verified=A klán nem ellenőrzött
|
||||
not.a.member.of.any.clan=Nem vagy tagja semmilyen klánnak
|
||||
minimum.to.make.alliance=A klánnak legalább {0} játékosnak kell lennie ahhoz, hogy szövetségeket kössön
|
||||
no.clan.matched=Nincsenek klánok
|
||||
cannot.ally.with.an.unverified.clan=Nem tudsz szövetséget kötni egy be nem bizonyított klánnal
|
||||
your.clans.are.not.allies=A klánod nem szövetségesek
|
||||
has.broken.the.alliance={0} megszakította a szövetséget {1}
|
||||
at.least.one.leader.accept.the.alliance=A szövetség legalább egy vezetőjének online kell lennie ahhoz, hogy elfogadja a szövetséget
|
||||
leaders.have.been.asked.for.an.alliance=A(z) {0} vezetők szövetségre szólítottak fel
|
||||
your.clans.are.already.allies=A klánod már szövetségesek
|
||||
your.clan.cannot.create.rivals=A klán nem hozhat létre riválisokat
|
||||
min.players.rivalries=A klánnak legalább {0} játékosnak kell lennie a rivalizálás érdekében
|
||||
this.player.is.already.banned=Ez a játékos már tiltott
|
||||
player.added.to.banned.list=A játékos hozzáadva a tiltott listához
|
||||
you.banned=Kitiltottad a klánparancsokból
|
||||
cape.must.be.png=A cape url-nek egy png képre kell mutatnia
|
||||
url.error=Az URL hibaüzenetet küld. Ellenőrizze, hogy működik-e.
|
||||
changed.the.clan.cape={0} megváltoztatta a klán kupáját
|
||||
clan.wide.friendly.fire.blocked=A klán egész barátságos tűz zárt
|
||||
clan.wide.friendly.fire.is.allowed=A Klánbarát barátságos tűz megengedett
|
||||
only.trusted.players.can.access.clan.coords=Csak a megbízható játékosok férhetnek hozzá a klánokhoz
|
||||
you.are.the.only.member.online=Te vagy az egyetlen tagja online
|
||||
your.clan.tag.cannot.be.longer.than.characters=A klán tagja legfeljebb {0} karakter lehet
|
||||
your.clan.tag.must.be.longer.than.characters=A klán tagjának hosszabbnak kell lennie, mint {0} karakter
|
||||
your.tag.cannot.contain.the.following.colors=A címke nem tartalmazhatja a következő színeket: {0}
|
||||
your.clan.name.cannot.be.longer.than.characters=A klán neve legfeljebb {0} karakter lehet
|
||||
your.tag.cannot.contain.color.codes=A címke nem tartalmazhat színkódokat
|
||||
you.cannot.set.colored.ranks=You cannot set colored ranks
|
||||
your.clan.name.must.be.longer.than.characters=A klán neveinek {0} karakter hosszúnak kell lenniük
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=A klán tagja csak betűket, számokat és színkódokat tartalmazhat
|
||||
your.clan.name.cannot.contain.color.codes=A klán neve nem tartalmazhat színkódokat
|
||||
that.tag.name.is.disallowed=A címke neve elutasítva
|
||||
you.must.first.resign=Először lemondania a {0}
|
||||
clan.with.this.tag.already.exists=Ezzel a címkével már létezik egy klán
|
||||
get.your.clan.verified.to.access.advanced.features=Szerezd meg a klánt, hogy ellenőrizze a speciális funkciók elérését
|
||||
clan.created=A(z) {0} klán létrehozva
|
||||
not.enough.leaders.online.to.vote.on.demotion=There aren''t enough leaders online to vote on this demotion
|
||||
leaders.must.be.online.to.vote.on.demotion=A lefokozástól eltérő összes vezetőnek online kell lennie ahhoz, hogy szavazzon a lefokozásról
|
||||
demotion.vote.has.been.requested.from.all.leaders=Demotion szavazást kértek minden vezetőtől
|
||||
player.is.not.a.leader.of.your.clan=A játékos nem a klán egyik vezetője
|
||||
clan.has.been.disbanded=A(z) {0} klán feloszlott
|
||||
clan.disband.vote.has.been.requested.from.all.leaders=A klán feloszlatásáról szavazást kértek minden vezetőtől
|
||||
friendy.fire.is.now.managed.by.your.clan=A barátságos tüzet most kezeli a klán
|
||||
personal.friendly.fire.is.set.to.allowed=A személyes barátságos tűz megengedett
|
||||
global.friendy.fire.is.now.managed.by.each.clan=A globális barátságos tüzet minden egyes klán kezeli
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan=A globális barátságos tüzeket már kezelik minden egyes klán
|
||||
global.friendly.fire.is.set.to.allowed=A globális barátságos tűz megengedett
|
||||
global.friendly.fire.is.already.being.allowed=A globális barátságos tűz már engedélyezett
|
||||
no.player.matched=Nincs olyan játékos, aki megfelelt
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans=A játékosnak nincs joga a klánokhoz való csatlakozáshoz
|
||||
you.cannot.invite.yourself=Nem hívhatod meg magad
|
||||
this.player.is.banned.from.using.clan.commands=Ez a játékos tiltja a klánparancsok használatát
|
||||
the.player.is.already.member.of.another.clan=A játékos már tagja egy másik klánnak
|
||||
has.been.asked.to.join={0} felkérést kapott, hogy csatlakozzon {1}
|
||||
you.cannot.kick.yourself=Nem tudod magadat kirúgni
|
||||
the.player.is.not.a.member.of.your.clan=A játékos nem tagja a klánnak
|
||||
you.cannot.kick.another.leader=Nem tehetsz meg egy másik vezetőt
|
||||
has.been.kicked.by={0} kirúgva {1} által
|
||||
no.clans.have.been.created=Nem hoztak létre klánokat
|
||||
total.clans=Összes klán:
|
||||
legend=Legenda:
|
||||
kill.type.civilian=Ölés típus: {0} Civil
|
||||
no.player.data.found=Nincsenek játékosadatok
|
||||
kill.type.0=Ölés típus: {0}
|
||||
s.player.info={0} játékos adatai
|
||||
clan.0=Klán: {0}
|
||||
status.0=Állapot: {0}
|
||||
rank.0=Rang: {0}
|
||||
kdr.0=KDR: {0}
|
||||
deaths.0=Halálok: {0}
|
||||
fee.0.value.1=Fee: {0}, {1} $
|
||||
join.date.0=Csatlakozás dátuma: {0}
|
||||
last.seen.0=Utoljára látva: {0}
|
||||
past.clans.0=Múlt klánok: {0}
|
||||
inactive.0=Elérhetetlen(ek): {0}
|
||||
kill.totals=Összes ölés:
|
||||
clan.commands=klán parancsok
|
||||
you.can.only.modify.the.color.and.case.of.the.tag=Csak a címke színét és esetét módosíthatod
|
||||
tag.changed.to.0=A címke megváltoztatva {0}
|
||||
name.0=Név: {0}
|
||||
description.0=Description: {0}
|
||||
leaders.0=Vezetők: {0}
|
||||
members.online.0=Tagok online: {0}
|
||||
allies.0=Szövetségesek: {0}
|
||||
rivals.0=Vetélytárs(ak): {0}
|
||||
founded.0=Alapított: {0}
|
||||
the.member.to.be.promoted.must.be.online=A támogatni kívánt tagnak online-nak kell lennie
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan=A játékosnak nincs joga a klán vezetésére
|
||||
you.cannot.promote.yourself=Nem reklámozhatod magad
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion=Minden vezetőnek online kell szavaznia erről a promócióról
|
||||
the.player.is.already.a.leader=A játékos már vezető szerepet játszik
|
||||
configuration.reloaded=A konfiguráció újratöltve
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan=A legutóbbi vezető nem tud lemondani. Új vezetőt kell kijelölni vagy fel kell oszlatni a klánt
|
||||
0.has.resigned={0} lemondott
|
||||
only.trusted.players.can.access.clan.stats=Csak a megbízható játékosok férhetnek hozzá a klánstatisztikákhoz
|
||||
you.cannot.trust.yourself=Nem bízhatsz magadban
|
||||
leaders.are.already.trusted=A vezetők már megbízhatóak
|
||||
this.player.is.already.trusted=Ez a játékos már megbízható
|
||||
has.been.given.trusted.status.by={0} megbízható állapotot kapott {1} által
|
||||
this.player.is.not.banned=Ez a játékos nem tiltott
|
||||
player.removed.from.the.banned.list=A játékos eltávolítva a tiltott listáról
|
||||
you.have.been.unbanned.from.clan.commands=Vissza engedted a klánparancsoktól
|
||||
you.cannot.untrust.yourself=Nem bízhatsz magadban
|
||||
leaders.cannot.be.untrusted=A vezetők nem lehetnek megbízhatatlanok
|
||||
this.player.is.already.untrusted=Ez a játékos már nem megbízható
|
||||
has.been.given.untrusted.status.by={0} megbízható állapotot kapott {1} által
|
||||
the.clan.does.not.exist=A klán nem létezik
|
||||
the.clan.is.already.verified=A klán már ellenőrzött
|
||||
the.clan.has.been.verified=A klán igazolt
|
||||
clan.0.has.been.verified=A(z) {0} klán ellenőrizve!
|
||||
only.trusted.players.can.access.clan.vitals=Csak a megbízható játékosok férhetnek hozzá a klánéletekhez
|
||||
total.clan.players.0=Összes klán játékos: {0}
|
||||
proposing.war={0} azt javasolja, hogy indítsanak háborút {1} ellen
|
||||
you.can.only.start.war.with.rivals=Csak háborút kezdhet a riválisokkal
|
||||
leaders.have.been.asked.to.accept.the.war.request=A(z) {0} vezetőket felkérték, hogy fogadják el a háborús kérést
|
||||
leaders.asked.to.end.rivalry=A(z) {0} vezetőket felkérték, hogy vessenek véget a háborúnak
|
||||
proposing.to.end.the.war={0} a háború befejezését javasolja {1}
|
||||
clans.already.at.war=A klánod már háborúban van
|
||||
clans.not.at.war=A klánod nincsenek háborúban
|
||||
you.are.at.war={0} most háborúban van {1} ellen
|
||||
denied.war.req={0} megtagadta {1} által küldött háborús kérést
|
||||
you.are.no.longer.at.war={0} már nincs háborúban {1} ellen
|
||||
end.war.denied=A háború befejezésére irányuló kérelmet a(z) {0}
|
||||
denied.war.end={0} tagadta {1} kérését a háború befejezésére
|
||||
0.war=/{0} war{1} start/end [tag] - Háború indítása vagy befejezése
|
||||
has.initiated.a.rivalry={0} rivalizációt indított {1} ellen
|
||||
start=start
|
||||
end=end
|
||||
add=add
|
||||
remove=remove
|
||||
allow=allow
|
||||
block=block
|
||||
auto=auto
|
||||
war=war
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow={0}S=Kard{1}, {2}B=Íj{3}, {4}#=Nyilak
|
||||
weapon.S=S
|
||||
weapon.B=B
|
||||
weapon.A=A
|
||||
materials=Anyagok
|
||||
armor.h=H
|
||||
armor.c=C
|
||||
armor.l=L
|
||||
armor.B=B
|
||||
diamond=diamond
|
||||
gold=gold
|
||||
wood=wood
|
||||
server.announce=Szerver bejelentés
|
||||
clan.announce=Klán bejelentés
|
||||
leader.announce=Vezetői bejelentés
|
||||
hunger=Éhség
|
||||
stone=Kő
|
||||
iron=Vas
|
||||
the.clan.cannot.be.rivaled=A klán nem lehet versengeni
|
||||
capeoff=A köpeny kikapcsolva
|
||||
capeon=A köpeny bekapcsolva
|
||||
bboff=BB kikapcsolva
|
||||
bbon=BB bekapcsolva
|
||||
tagoff=Tag kikapcsolva
|
||||
tagon=Címke bekapcsolva
|
||||
depositon=Letét bekapcsolva
|
||||
depositoff=Letét kikapcsolva
|
||||
withdrawon=Visszavonulás bekapcsolva
|
||||
withdrawoff=Visszavonulás kikapcsolva
|
||||
feeoff=Fee toggled off
|
||||
feeon=Fee toggled on
|
||||
home.base.only.once=A bázis csak egyszer állítható be
|
||||
now.at.homebase=Most a(z) {0} székhelyen tartózkodsz
|
||||
hombase.set=Klán bázis beállítva: {0}
|
||||
hombase.cleared=Klán bázis törölve
|
||||
hombase.mod.set={0} bázisa beállítva:
|
||||
hombase.not.set=Bázis nincs beállítva
|
||||
rival.limit.reached=Elérted a rivális limitet. Nem tehetsz többé klánokkal.
|
||||
you.moved.teleport.cancelled=Elmozdultál, a teleportálás megszakítva
|
||||
waiting.for.teleport.stand.still.for.0.seconds=Várakozás a teleportálásra, állj meg {0} másodpercig
|
||||
no.teleport=Tilos teleportálni erre a helyre
|
||||
on=be
|
||||
off=ki
|
||||
leave=elhagy
|
||||
join=csatlakoz
|
||||
mute=mute
|
||||
player.rank.changed=A rang beállítva
|
||||
your.clans.are.already.rivals=A klánod már riválisok
|
||||
player.got.money=Megkaptad {0} a(z) {1} megöléséért KDR-ed alapján: {2}
|
||||
cleared.bb=Törölte a hirdetőtáblát
|
||||
clan.balance=Klán egyenleg: {0}
|
||||
bb.clan.deposit={0} $ letétbe helyezték
|
||||
player.clan.deposit=Letétbe helyezted {0}
|
||||
bb.clan.withdraw={0} $ visszavonták
|
||||
player.clan.withdraw=Visszavonsz {0}
|
||||
clan.bank.not.enough.money=A klán bankjaidnak nincs elég pénzük
|
||||
your.clans.are.not.rivals=A klánok nem riválisok
|
||||
you.cannot.rival.your.own.clan=Nem tudsz versengeni a saját klánoddal
|
||||
the.clan.members.reached.limit=A klán tagjai elérik a határt
|
||||
you.have.reseted.your.kdr=Visszaállítottad KDR-t
|
||||
you.have.reseted.0.kdr=Visszaállítottad a(z) {0} KDR-t
|
||||
you.have.reseted.kdr.of.all.players=Visszaállítottad a játékosok KDR-jét
|
||||
@@ -0,0 +1,466 @@
|
||||
description.command=descricao
|
||||
create.command=criar
|
||||
list.command=listar
|
||||
profile.command=perfil
|
||||
roster.command=membros
|
||||
lookup.command=detalhes
|
||||
leaderboard.command=ranking
|
||||
alliances.command=aliancas
|
||||
rivalries.command=rivalidades
|
||||
vitals.command=saude
|
||||
coords.command=coordenadas
|
||||
stats.command=estatisticas
|
||||
ally.command=aliado
|
||||
rival.command=rival
|
||||
bb.command=bb
|
||||
cape.command=capa
|
||||
modtag.command=mudartag
|
||||
toggle.command=alternar
|
||||
invite.command=convidar
|
||||
kick.command=expulsar
|
||||
bank.command=banco
|
||||
fee.command=taxa
|
||||
purge.command=apagar
|
||||
trust.command=confiar
|
||||
untrust.command=naoconfiar
|
||||
promote.command=promover
|
||||
demote.command=rebaixar
|
||||
clanff.command=clanff
|
||||
ff.command=ff
|
||||
resign.command=abandonar
|
||||
disband.command=debandar
|
||||
verify.command=verificar
|
||||
ban.command=banir
|
||||
unban.command=desbanir
|
||||
reload.command=recarregar
|
||||
globalff.command=globalff
|
||||
kills.command=mortes
|
||||
mostkilled.command=maismatou
|
||||
war.command=guerra
|
||||
home.command=base
|
||||
setrank.command=definirrank
|
||||
place.command=colocar
|
||||
resetkdr.command=redefinirkdr
|
||||
usage.description=Uso: /{0} descricao [descrição]
|
||||
usage.resetkdr=Uso: /{0} redefinirkdr [all/jogador]
|
||||
usage.clan.alliances=Uso: /{0} aliancas
|
||||
usage.ally=Uso: /{0} aliado adicionar/remover [tag]
|
||||
usage.ban.unban=Uso: /{0} banir/desbanir [jogador]
|
||||
usage.rival=Uso: /{0} rival adicionar/remover [tag]
|
||||
usage.war=Uso: /{0} guerra iniciar/finalizar [tag]
|
||||
usage.cape.url=Uso: /{0} capa [url]
|
||||
usage.setrank=Uso: /{0} definirrank [jogador] [rank], ranks podem ser múltiplas palavras ou conter códigos de cor
|
||||
usage.clanff=Uso: /{0} clanff permitir/bloquear
|
||||
usage.0.coords=Uso: /{0} coordenadas
|
||||
usage.create.tag=Uso: /{0} criar [tag] [nome]
|
||||
usage.demote.leader=Uso: /{0} rebaixar [líder]
|
||||
usage.0.disband=Uso: /{0} debandar
|
||||
usage.0.ff.allow.auto=Uso: /{0} ff permitir/auto
|
||||
usage.0.globalff.allow.auto=Uso: /{0} globalff permitir/auto
|
||||
usage.0.permissions.player=Uso: /{0} permissions [clan] adicionar/remover [permission]
|
||||
usage.0.invite.player=Uso: /{0} convidar [jogador]
|
||||
usage.kick.player=Uso: /{0} expulsar [jogador]
|
||||
usage.bank=Uso: /{0} banco withdraw/deposit/status [quantidade]
|
||||
usage.fee=Uso: /{0} taxa check/set [quantidade]
|
||||
usage.purge=Uso: /{0} apagar [jogador]
|
||||
usage.0.modtag.tag=Uso: /{0} mudartag [tag]
|
||||
usage.list=Uso: /{0} listar
|
||||
usage.lookup.tag=Uso: /{0} detalhes [tag]
|
||||
usage.0.profile.tag=Uso: /{0} perfil [tag]
|
||||
usage.0.promote.member=Uso: /{0} promover <member>
|
||||
usage.0.rivalries=Uso: /{0} rivalidades
|
||||
usage.0.roster.tag=Uso: /{0} membros [tag]
|
||||
usage.0.stats=Uso: /{0} estatisticas
|
||||
usage.0.trust.player=Uso: /{0} confiar [jogador]
|
||||
usage.0.untrust.player=Uso: /{0} naoconfiar [jogador]
|
||||
usage.0.verify.tag=Uso: /{0} verificar [tag]
|
||||
usage.0.vitals=Uso: /{0} saude
|
||||
usage.0.place=Uso: /{0} colocar [jogador] [tag]
|
||||
usage.0.leaderboard=Uso: /{0} ranking
|
||||
0.reload.1.reload.configuration=/{0} recarregar{1} - Recarregar configuração
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire=/{0} globalff permitir/auto {1} - Define o fogo amigo global
|
||||
0.place=/{0} place [jogador] [tag]{1} - Coloca um jogador em um clã
|
||||
0.ban.unban.player.1.ban.unban.a.player=/{0} ban/unban [jogador]{1} - Bane/desbane um jogador
|
||||
0.hometp.clan.1.tp.home.a.clan=/{0} base tp [clan]{1} - Teleporta para a base de um clã
|
||||
0.disband.tag.1.disband.a.clan=/{0} debandar [tag]{1} - Debanda um clã
|
||||
0.resetkdr.1.resets.kdr=/{0} redefinirkdr jogador/all{1} - Redefine o KDR de todos os jogadores ou de apenas um
|
||||
0.resetkdr.1.resets.your.kdr=/{0} redefinirkdr{1} - Redefine o seu KDR
|
||||
0.purge.player.1.purge.a.player=/{0} apagar [jogador]{1} - Apaga os dados de um jogador
|
||||
0.verify.tag.1.verify.an.unverified.clan=/{0} verificar [tag]{1} - Verifica um clã
|
||||
0.verify.1.purchase.verification.of.your.clan=/{0} verificar{1} - Compra a verifição para o seu clã
|
||||
0.list.1.lists.all.clans=/{0} listar [name/size/kdr/founded/active] [asc/desc]{1} - Lista todos os clãs
|
||||
0.profile.1.view.your.clan.s.profile=/{0} perfil{1} - Mostra o perfil do seu clã
|
||||
0.profile.tag.1.view.a.clan.s.profile=/{0} perfil [tag]{1} - Mostra o perfil de um clã
|
||||
0.lookup.1.lookup.your.info=/{0} detalhes{1} - Mostra suas informações
|
||||
0.lookup.player.1.lookup.a.player.s.info=/{0} detalhes [jogador]{1} - Mostra informações sobre um jogador
|
||||
0.leaderboard.1.view.leaderboard=/{0} ranking{1} - Mostra o ranking de jogadores
|
||||
0.alliances.1.view.all.clan.alliances=/{0} aliancas{1} - Mostra todas as alianças do clã
|
||||
0.rivalries.1.view.all.clan.rivalries=/{0} rivalidades{1} - Mostra todas as rivalidades do clã
|
||||
0.roster.1.view.your.clan.s.member.list=/{0} membros{1} - Mostra a lista de membros do seu clã
|
||||
0.roster.tag.1.view.a.clan.s.member.list=/{0} membros [tag]{1} - Mostra a lista de membros de um clã
|
||||
0.vitals.1.view.your.clan.member.s.vitals=/{0} saude{1} - Mostra os sinais vitais dos membros do seu clã
|
||||
0.coords.1.view.your.clan.member.s.coordinates=/{0} coordenadas{1} - Mostra as coordenadas dos membros do seu clã
|
||||
0.stats.1.view.your.clan.member.s.stats=/{0} estatisticas{1} - Mostra as estatísticas dos membros do seu clã
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan=/{0} aliado adicionar/remover [tag]{1} - Adiciona/remove um clã aliado
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan=/{0} rival adicionar/remover [tag]{1} - Adiciona/remove um clã rival
|
||||
0.bb.1.display.bulletin.board=/{0} bb{1} - Mostra o quadro de avisos
|
||||
0.description.description.1.modify.the.clan.s.description=/{0} descricao [descrição]{1} - Modifica a descrição do clã
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board=/{0} bb [msg]{1} - Adiciona uma mensagem para o quadro de avisos
|
||||
0.modtag.tag.1.modify.the.clan.s.tag=/{0} mudartag [tag]{1} - Modifica a tag do seu clã
|
||||
0.cape.url.1.change.your.clan.s.cape=/{0} capa [url]{1} - Muda a capa do seu clã
|
||||
0.invite.player.1.invite.a.player=/{0} convidar [jogador]{1} - Convida um jogador
|
||||
0.kick.player.1.kick.a.player.from.the.clan=/{0} expulsar [jogador]{1} - Expulsa um jogador do clã
|
||||
0.trust.untrust.player.1.set.trust.level1=/{0} confiar [jogador]{1} - Marca um membro como confiável
|
||||
0.trust.untrust.player.1.set.trust.level2=/{0} naoconfiar [jogador]{1} - Marca um membro como não-confiável
|
||||
0.promote.member.1.promote.a.member.to.leader=/{0} promover [membro]{1} - Promove um membro para líder
|
||||
0.demote.leader.1.demote.a.leader.to.member=/{0} rebaixar [líder]{1} - Rebaixa um líder para membro
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire=/{0} clanff permitir/bloquear{1} - Alterna o fogo amigo do clã
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire=/{0} ff permitir/auto{1} - Alterna o fogo amigo pessoal
|
||||
0.toggle.command=/{0} alternar [{2}]{1} - Alterna opções pessoais
|
||||
0.resign.1.resign.from.the.clan=/{0} abandonar{1} - Abandona o seu clã
|
||||
0.disband.1.disband.your.clan=/{0} debandar{1} - Debanda o seu cl
|
||||
0.trust.setrank=/{0} definirrank [jogador] [rank]{1} - Dá um rank a um jogador
|
||||
0.create.tag.name.1.purchase.a.new.clan=/{0} criar [tag] [nome]{1} - Compra um novo clã
|
||||
0.create.tag.name.1.create.a.new.clan=/{0} criar [tag] [nome]{1} - Cria um novo clã
|
||||
0.kills=/{0} mortes{1} - Mostra a sua contagem de mortes
|
||||
0.killsplayer=/{0} mortes [jogador]{1} - Mostra a contagem de mortes de um jogador
|
||||
0.fee.check=/{0} taxa check {1}- Verifica se a taxa está ativada e quanto é
|
||||
0.fee.set=/{0} taxa set [valor]{1} - Define a taxa de membros do clã
|
||||
0.mostkilled=/{0} maismatou{1} - Mostra a contagem de mortes do servidor inteiro
|
||||
home-menu=/{0} base{1} - Teleporta para a base do clã
|
||||
home-set-menu=/{0} base set{1} - Define a base do clã
|
||||
home-clear-menu=/{0} base clear{1} - Apaga a base do clã
|
||||
home-regroup-menu=/{0} base regroup [me]{1} - Reagrupa todos os membros do clã para a base ou para você
|
||||
example.clan.modtag.4kfo.4l=Exemplo: /clan mudartag &4C&fd&4L
|
||||
example.clan.create=Exemplo: /clan criar &4CoL Cavaleiros do Labirinto
|
||||
clan=Clã
|
||||
allies=Aliados
|
||||
alliances=aliancas
|
||||
coords=coordenadas
|
||||
name=Nome
|
||||
distance=Distância
|
||||
coords.upper=Coordenadas
|
||||
world=Mundo
|
||||
kdr=KDR
|
||||
members=Membros
|
||||
clans.lower=clãs
|
||||
rival=Rival
|
||||
civilian=Civil
|
||||
neutral=Neutro
|
||||
free.agent=Agente Livre
|
||||
days=dias
|
||||
rivals=Rivais
|
||||
rivalries=rivalidades
|
||||
online=Online
|
||||
player=Jogador
|
||||
seen=Visto
|
||||
leader=líder
|
||||
roster=membros
|
||||
trusted=confiável
|
||||
untrusted=não-confiável
|
||||
deaths=Morreu
|
||||
weights=Pesos
|
||||
stats=estatísticas
|
||||
health=Vida
|
||||
armor=Armadura
|
||||
weapons=Armas
|
||||
food=Comida
|
||||
vitals=Saúde
|
||||
verified=Verificado
|
||||
unverified=Não verificado
|
||||
profile=perfil
|
||||
civilian.abbreviation=Civ
|
||||
rank=Rank
|
||||
leaders=Líderes
|
||||
none=Nenhum
|
||||
today=Hoje
|
||||
kills=Matou
|
||||
mostkilled=Mais Matou
|
||||
killcount=Contagem de mortes
|
||||
attacker=Agressor
|
||||
victim=Vítima
|
||||
kill.death.ratio=Relação entre Matar e Morrer
|
||||
nokillsfound=Nenhuma morte encontrada
|
||||
version.loaded=[{0}] Versão {1} carregada
|
||||
promoted.to.leader={0} foi promovido para líder
|
||||
denied.demotion={0} negou o rebaixamento de {1}. Não houve consenso.
|
||||
membership.invitation={0} negou o pedido para ser membro
|
||||
joined.the.clan={0} entrou no clã
|
||||
signed.off.request.cancelled={0} saiu. Pedido de {1} cancelado.
|
||||
clan.deletion={0} negou a remoção do clã. Não houve consenso.
|
||||
has.been.disbanded=Clã {0} foi debandado
|
||||
denied.the.promotion={0} negou a promoção de {1}. Não houve consenso.
|
||||
demoted.back.to.member={0} foi rebaixado para membro
|
||||
peace.agreement.denied=O acordo de paz com {0} foi negado
|
||||
denied.to.make.peace={0} negou fazer paz com {1}
|
||||
broken.the.rivalry={0} quebrou a rivalidade com {1}
|
||||
broken.the.rivalry.with={0} quebrou a rivalidade com {1}
|
||||
the.alliance.was.denied=A aliança com {0} foi negada
|
||||
denied.an.alliance={0} negou uma aliança com {1}
|
||||
accepted.an.alliance={0} aceitou uma aliança com {1}
|
||||
created.an.alliance={0} criou uma aliança com {1}
|
||||
has.joined={0} entrou em {1}
|
||||
proposing.to.end.the.rivalry={0} está propondo acabar com a rivalidade com {1}
|
||||
proposing.an.alliance={0} está propondo uma aliança com {1}
|
||||
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}
|
||||
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
|
||||
mysql.connection.failed=Conexão MySQL falhou
|
||||
sqlite.connection.successful=Conexão SQLite bem sucedida
|
||||
sqlite.connection.failed= Conexão SQLite falhou
|
||||
purging.player.data=apagando dados do jogador: {0}
|
||||
purging.clan=Apagando clã: {0}
|
||||
clan.players=Jogadores: {0}
|
||||
clans=Clãs: {0}
|
||||
banned=Você foi banido de usar comandos de clã
|
||||
nothing.more.to.see=Nada mais para ver
|
||||
nothing.to.deny=Nada para negar
|
||||
no.leader.permissions=Você não tem permissões de líder
|
||||
you.have.already.voted=Você já votou
|
||||
has.voted.to.deny={0} votou para negar
|
||||
nothing.to.accept=Nada para aceitar
|
||||
view.next.page=Digite /{0} para ver a próxima página.
|
||||
voted.to.accept={0} votou para aceitar
|
||||
bulletin.board.header={0}* {1}{2} quadro de avisos
|
||||
has.been.disbanded.rivalry.ended={0} foi debandado. A rivalidade terminou.
|
||||
has.been.disbanded.alliance.ended={0} foi debandado. A aliança terminou.
|
||||
clan.disbanded=Clã debandado
|
||||
1.color.day=1 {0}dia
|
||||
many.color.days={0}{1} dias
|
||||
does.not.match=Não é um comando de clã
|
||||
simpleclans.command.failure=Falha no comando do SimpleClans: {0}
|
||||
insufficient.permissions=Permissões insuficientes
|
||||
clan.is.not.verified=Clã não é verificado
|
||||
not.a.member.of.any.clan=Você não é membro de nenhum clã
|
||||
minimum.to.make.alliance=Seu clã deve ter pelo menos {0} membros para fazer alianças
|
||||
no.clan.matched=Nenhum clã encontrado
|
||||
cannot.ally.with.an.unverified.clan=Você não pode fazer aliança com um clã não verificado
|
||||
your.clans.are.not.allies=Seus clãs não são aliados
|
||||
has.broken.the.alliance={0} quebrou a aliança com {1}
|
||||
at.least.one.leader.accept.the.alliance=Pelo menos um líder do outro clã precisa estar online para aceitar a aliança
|
||||
leaders.have.been.asked.for.an.alliance=Um pedido de aliança foi enviado para os líderes de {0}
|
||||
your.clans.are.already.allies=Seus clãs já são aliados
|
||||
your.clan.cannot.create.rivals=Seu clã não pode criar rivais
|
||||
min.players.rivalries=Seu clã deve ter pelo menos {0} membros para fazer rivalidades
|
||||
this.player.is.already.banned=Este jogador já está banido
|
||||
player.added.to.banned.list=Jogador adicionado a lista de banidos
|
||||
you.banned=Você foi banido de comandos de clã
|
||||
cape.must.be.png=A URL da capa deve apontar para uma imagem png
|
||||
url.error=A URL está retornando um erro. Por favor, verifique se está funcionando.
|
||||
changed.the.clan.cape={0} mudou a capa do clã
|
||||
clan.wide.friendly.fire.blocked=Fogo amigo do clã bloqueado
|
||||
clan.wide.friendly.fire.is.allowed=Fogo amigo do clã permitido
|
||||
only.trusted.players.can.access.clan.coords=Apenas jogadores confiáveis podem acessar as coordenadas do clã
|
||||
you.are.the.only.member.online=Você é o único membro online
|
||||
your.clan.tag.cannot.be.longer.than.characters=A tag do seu clã não pode ser maior que {0} caracteres
|
||||
your.clan.tag.must.be.longer.than.characters=A tag do seu clã deve ser maior que {0} caracteres
|
||||
your.tag.cannot.contain.the.following.colors=Sua tag não pode conter as seguintes cores: {0}
|
||||
your.tag.cannot.contain.color.codes=Sua tag não pode conter códigos de cor
|
||||
you.cannot.set.colored.ranks=Você não pode definir ranks coloridos
|
||||
your.clan.name.cannot.be.longer.than.characters=O nome do seu clã não pode ser maior que {0} caracteres
|
||||
your.clan.name.must.be.longer.than.characters=O nome do seu clã deve ser maior que {0} caracteres
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=A tag do seu clã pode conter apenas letras, números e códigos de cor
|
||||
your.clan.name.cannot.contain.color.codes=O nome do seu clã não pode conter códigos de cor
|
||||
that.tag.name.is.disallowed=Essa tag não é permitida
|
||||
you.must.first.resign=Você antes precisa abandonar {0}
|
||||
clan.with.this.tag.already.exists=Um clã com essa tag já existe
|
||||
get.your.clan.verified.to.access.advanced.features=Verifique o seu clã para ter acesso a funções mais avançadas
|
||||
clan.created=Clã {0} criado
|
||||
not.enough.leaders.online.to.vote.on.demotion=Não há líderes suficientes online para votar nesse rebaixamento
|
||||
leaders.must.be.online.to.vote.on.demotion=Todos os líderes, exceto o rebaixado, precisam estar online para votar nesse rebaixamento
|
||||
demotion.vote.has.been.requested.from.all.leaders=Um voto de rebaixamento foi pedido a todos os líderes
|
||||
player.is.not.a.leader.of.your.clan=O jogador não é um líder do seu clã
|
||||
clan.has.been.disbanded=Clã {0} foi debandado
|
||||
clan.disband.vote.has.been.requested.from.all.leaders=Um voto para debandar o clã foi pedido a todos os líderes
|
||||
friendy.fire.is.now.managed.by.your.clan=Fogo amigo é agora gerenciado pelo seu clã
|
||||
personal.friendly.fire.is.set.to.allowed=Fogo amigo pessoal foi definido como permitido
|
||||
global.friendy.fire.is.now.managed.by.each.clan=Fogo amigo global é agora gerenciado por cada clã
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan=Fogo amigo global já está sendo gerenciado por cada clã
|
||||
global.friendly.fire.is.set.to.allowed=Fogo amigo global foi definido como permitido
|
||||
global.friendly.fire.is.already.being.allowed=Fogo amigo global já está permitido
|
||||
no.player.matched=Nenhum jogador encontrado
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans=O jogador não tem permissão para entrar em clãs
|
||||
you.cannot.invite.yourself=Você não pode se convidar
|
||||
this.player.is.banned.from.using.clan.commands=Este jogador foi banido de usar comandos de clãs
|
||||
the.player.is.already.member.of.another.clan=Este jogador já é membro de outro clã
|
||||
has.been.asked.to.join=Um convite foi enviado a {0} para entrar em {1}
|
||||
you.cannot.kick.yourself=Você não pode se expulsar
|
||||
the.player.is.not.a.member.of.your.clan=O jogador não é membro do seu clã
|
||||
you.cannot.kick.another.leader=Você não pode expulsar outro líder
|
||||
has.been.kicked.by={0} foi expulso por {1}
|
||||
no.clans.have.been.created=Nenhum clã foi criado
|
||||
total.clans=Total de clãs:
|
||||
legend=Legenda:
|
||||
kill.type.civilian=Tipo de morte: {0}Civil
|
||||
no.player.data.found=Nenhum dado de jogador encontrado
|
||||
kill.type.0=Tipo de morte: {0}
|
||||
s.player.info=Detalhes de {0}
|
||||
clan.0=Clã: {0}
|
||||
status.0=Status: {0}
|
||||
rank.0=Rank: {0}
|
||||
kdr.0=KDR: {0}
|
||||
deaths.0=Morreu: {0}
|
||||
fee.0.value.1=Taxa: {0}, {1} $
|
||||
join.date.0=Entrou: {0}
|
||||
last.seen.0=Visto por último: {0}
|
||||
past.clans.0=Clãs anteriores: {0}
|
||||
inactive.0=Inativo: {0}
|
||||
kill.totals=Matou:
|
||||
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}
|
||||
name.0=Nome: {0}
|
||||
description.0=Descrição: {0}
|
||||
leaders.0=Líderes: {0}
|
||||
members.online.0=Membros Online: {0}
|
||||
allies.0=Aliados: {0}
|
||||
rivals.0=Rivais: {0}
|
||||
founded.0=Fundado: {0}
|
||||
the.member.to.be.promoted.must.be.online=O membro a ser promovido precisa estar online
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan=O jogador não tem permissões para liderar um clã
|
||||
you.cannot.promote.yourself=Você não pode se promover
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion=Todos os líderes devem estar online para votar nessa promoção
|
||||
the.player.is.already.a.leader=O jogador já é um líder
|
||||
configuration.reloaded=Configuração recarregada
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan=O último líder não pode abandonar. Você deve apontar outro líder ou debandar o clã
|
||||
0.has.resigned={0} abandonou
|
||||
only.trusted.players.can.access.clan.stats=Apenas jogadores confiáveis podem acessar as estatísticas do clã
|
||||
you.cannot.trust.yourself=Você não pode se marcar como confiável
|
||||
leaders.are.already.trusted=Líderes já são confiáveis
|
||||
this.player.is.already.trusted=Este jogador já é confiável
|
||||
has.been.given.trusted.status.by=A {0} foi dado status de confiável por {1}
|
||||
this.player.is.not.banned=Este jogador não está banido
|
||||
player.removed.from.the.banned.list=Jogador removido da lista de banidos
|
||||
you.have.been.unbanned.from.clan.commands=Você foi desbanido de comandos de clã
|
||||
you.cannot.untrust.yourself=Você não pode se marcar como não-confiável
|
||||
leaders.cannot.be.untrusted=Líderes não podem ser não-confiáveis
|
||||
this.player.is.already.untrusted=Este jogador já é não-confiável
|
||||
has.been.given.untrusted.status.by=A {0} foi dado status de não-confiável por {1}
|
||||
the.clan.does.not.exist=O clã não existe
|
||||
the.clan.is.already.verified=O clã já é verificado
|
||||
the.clan.has.been.verified=O clã foi verificado
|
||||
clan.0.has.been.verified=O clã {0} foi verificado!
|
||||
only.trusted.players.can.access.clan.vitals=Apenas jogadores confiáveis podem acessar a saúde do clã
|
||||
total.clan.players.0=Total de jogadores: {0}
|
||||
proposing.war={0} está propondo iniciar uma guerra com {1}
|
||||
you.can.only.start.war.with.rivals=Você pode apenas iniciar guerras com rivais
|
||||
leaders.have.been.asked.to.accept.the.war.request=Um pedido para iniciar uma guerra foi enviado para os líderes de {0}
|
||||
leaders.asked.to.end.rivalry=Um pedido para finalizar a guerra foi enviado para os líderes de {0}
|
||||
proposing.to.end.the.war={0} está propondo o fim da guerra com {1}
|
||||
clans.already.at.war=Seus clãs já estão em guerra
|
||||
clans.not.at.war=Seus clãs não estão em guerra
|
||||
you.are.at.war={0} está agora em guerra com {1}
|
||||
denied.war.req={0} negou o pedido de guerra enviado por {1}
|
||||
you.are.no.longer.at.war={0} não está mais em guerra com {1}
|
||||
end.war.denied=Pedido para finalizar a guerra foi negado por {0}
|
||||
denied.war.end={0} negou o pedido de {1} para finalizar a guerra
|
||||
0.war=/{0} war{1} iniciar/finalizar [tag] - Inicia ou finaliza uma guerra
|
||||
has.initiated.a.rivalry={0} iniciou uma rivalidade com {1}
|
||||
start=iniciar
|
||||
end=finalizar
|
||||
add=adicionar
|
||||
remove=remover
|
||||
allow=permitir
|
||||
block=bloquear
|
||||
auto=auto
|
||||
war=guerra
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow={0}E=Espada{1}, {2}A=Arco{3}, {4}F=Flechas
|
||||
weapon.S=E
|
||||
weapon.B=A
|
||||
weapon.A=F
|
||||
materials=Materiais
|
||||
armor.h=E
|
||||
armor.c=P
|
||||
armor.l=C
|
||||
armor.B=B
|
||||
diamond=Diamante
|
||||
gold=Ouro
|
||||
wood=Madeira
|
||||
server.announce=Anúncio de Servidor
|
||||
clan.announce=Anúncio de Clã
|
||||
leader.announce=Anúncio de Líder
|
||||
hunger=Fome
|
||||
stone=Pedra
|
||||
iron=Ferro
|
||||
the.clan.cannot.be.rivaled=O clã não pdoe ser rivalizado
|
||||
capeoff=Cape ativado
|
||||
capeon=Capa ativada
|
||||
bboff=BB desativado
|
||||
bbon=BB ativado
|
||||
tagoff=Tag desativada
|
||||
tagon=Tag ativada
|
||||
depositon=Depósitos ativados
|
||||
depositoff=Depósitos desativados
|
||||
withdrawon=Saques ativados
|
||||
withdrawoff=Saques desativados
|
||||
feeoff=Taxa ativada
|
||||
feeon=Taxa desativada
|
||||
home.base.only.once=A base só pode ser definida uma vez
|
||||
now.at.homebase=Você está agora na base do clã {0}
|
||||
hombase.set=Base do clã definida para: {0}
|
||||
hombase.cleared=Base do clã apagad
|
||||
hombase.mod.set=Base de {0} definida para:
|
||||
hombase.not.set=Base não definida
|
||||
rival.limit.reached=Você atingiu o máximo de rivais. Você não pode rivalizar com mais clãs.
|
||||
you.moved.teleport.cancelled=Você se mexeu, teleporte cancelado
|
||||
waiting.for.teleport.stand.still.for.0.seconds=Aguardando teleporte, fique parado por {0} segundos
|
||||
no.teleport=Você não têm permissão para teleportar para aquela localização
|
||||
on=ligar
|
||||
off=desligar
|
||||
leave=sair
|
||||
join=entrar
|
||||
mute=silenciar
|
||||
player.rank.changed=O rank foi definido
|
||||
your.clans.are.already.rivals=Seus clãs já são rivais
|
||||
player.got.money=Você ganhou {0} por matar {1} baseado no seu KDR: {2}
|
||||
cleared.bb=Você limpou o quadro de avisos
|
||||
clan.balance=Saldo do clã: {0}
|
||||
bb.fee.player.kicked={0} foi expulso por não pagar a taxa
|
||||
bb.fee.set=A taxa é {0} $
|
||||
bb.clan.deposit={0} $ foram depositados
|
||||
player.clan.deposit=Você depositou {0}
|
||||
bb.clan.withdraw={0} $ foram sacados
|
||||
player.clan.withdraw=Você sacou {0}
|
||||
clan.bank.not.enough.money=O banco do seu clã não tem saldo suficiente
|
||||
your.clans.are.not.rivals=Seus clãs não são rivais
|
||||
you.cannot.rival.your.own.clan=Você não pode fazer rivalidade com seu próprio clã
|
||||
the.clan.members.reached.limit=Seu clã atingiu o limite de membros
|
||||
you.have.reseted.your.kdr=Você redefiniu o seu KDR
|
||||
you.have.reseted.0.kdr=Você redefiniu o KDR de {0}
|
||||
you.have.reseted.kdr.of.all.players=Você redefiniu o KDR de todos os jogadores
|
||||
resign.yes=Sim
|
||||
resign.no=Não
|
||||
resign.confirmation=Tem certeza de que quer abandonar o clã? {0}
|
||||
resign.success=Você abandonou seu clã com sucesso
|
||||
player.is.not.a.leader.of.any.clan=O jogador não é líder de nenhum clã
|
||||
you.cannot.demote.the.last.leader=Você não pode rebaixar o último líder
|
||||
player.successfully.demoted=O jogador foi rebaixado com sucesso
|
||||
bb.ago= atrás
|
||||
bb.moments=momentos
|
||||
bb.seconds= segundos
|
||||
bb.minutes= minutos
|
||||
bb.one.minute=1 minuto
|
||||
bb.hours= horas
|
||||
bb.one.hour=1 hora
|
||||
bb.days= dias
|
||||
bb.one.day=1 dia
|
||||
the.fee.is.0.and.its.current.value.is.1=A taxa está {0} e seu valor atual é {1} $
|
||||
fee.enabled=ativada
|
||||
fee.disabled=desativada
|
||||
fee.set=A taxa foi definida com sucesso
|
||||
max.fee.allowed.is.0=A taxa máxima permitida é {0}
|
||||
fee.collected={0} $ foram sacados para a taxa do clã
|
||||
invalid.fee=O valor que você inseriu não é válido
|
||||
player.purged=Os dados do jogador foram apagados com sucesso
|
||||
upkeep.collected={0} $ foram sacados para a taxa de manutenção
|
||||
balance.is.not.enough.for.upkeep=O saldo do clã não é suficiente para pagar a taxa de manutenção ({0} $), deposite a quantidade para evitar que seu clã seja debandado
|
||||
your.clan.description.must.be.longer.than=A descrição do seu clã deve ser mais longa que {0} caracteres
|
||||
your.clan.description.cannot.be.longer.than=A descrição do seu clã não pode ser mais longa que {0} caracteres
|
||||
description.changed=Você mudou com sucesso a descrição do seu clã
|
||||
no.description=Sem descrição
|
||||
the.player.must.wait.0.before.joining.your.clan.again=Este jogador deve esperar {0} minuto(s) antes de poder entrar no seu clã de novo
|
||||
@@ -0,0 +1,405 @@
|
||||
create.command=创建
|
||||
list.command=列表
|
||||
profile.command=信息
|
||||
roster.command=名单
|
||||
lookup.command=详情
|
||||
leaderboard.command=排行榜
|
||||
alliances.command=联盟
|
||||
rivalries.command=敌对
|
||||
vitals.command=生命
|
||||
coords.command=坐标
|
||||
stats.command=统计
|
||||
ally.command=联盟
|
||||
rival.command=敌对
|
||||
bb.command=公告板
|
||||
cape.command=披风
|
||||
modtag.command=更改标签
|
||||
toggle.command=切换
|
||||
invite.command=邀请
|
||||
kick.command=移除
|
||||
bank.command=银行
|
||||
fee.command=fee
|
||||
purge.command=purge
|
||||
trust.command=信任
|
||||
untrust.command=取消信任
|
||||
promote.command=提升
|
||||
demote.command=降级
|
||||
clanff.command=帮派友军伤害
|
||||
ff.command=友军伤害
|
||||
resign.command=离开
|
||||
disband.command=解散
|
||||
verify.command=验证
|
||||
ban.command=封禁
|
||||
unban.command=解封
|
||||
reload.command=重载
|
||||
globalff.command=全局友军伤害
|
||||
kills.command=击杀
|
||||
mostkilled.command=死亡排名
|
||||
war.command=战争
|
||||
home.command=基地
|
||||
setrank.command=设置称号
|
||||
place.command=移动
|
||||
usage.clan.alliances=使用: /{0} alliances
|
||||
usage.ally=使用: /{0} ally add/remove [标签]
|
||||
usage.ban.unban=使用: /{0} ban/unban [玩家]
|
||||
usage.rival=使用: /{0} rival add/remove [标签]
|
||||
usage.war=使用: /{0} war start/end [标签]
|
||||
usage.cape.url=使用: /{0} cape [链接]
|
||||
usage.setrank=使用: /{0} setrank [玩家] [称号], 称号可以是多个词,可含有颜色代码
|
||||
usage.clanff=使用: /{0} clanff allow/block
|
||||
usage.0.coords=使用: /{0} coords
|
||||
usage.create.tag=使用: /{0} create [标签] [名称]
|
||||
usage.demote.leader=使用: /{0} demote [老大]
|
||||
usage.0.disband=使用: /{0} disband
|
||||
usage.0.ff.allow.auto=使用: /{0} ff allow/auto
|
||||
usage.0.globalff.allow.auto=使用: /{0} globalff allow/auto
|
||||
usage.0.permissions.player=使用: /{0} permissions [帮派] add/remove [权限]
|
||||
usage.0.invite.player=使用: /{0} invite [玩家]
|
||||
usage.kick.player=使用: /{0} kick [玩家]
|
||||
usage.bank=使用: /{0} bank withdraw/deposit/status [数量]
|
||||
usage.0.modtag.tag=使用: /{0} modtag [标签]
|
||||
usage.lookup.tag=使用: /{0} lookup [标签]
|
||||
usage.0.profile.tag=使用: /{0} profile [标签]
|
||||
usage.0.promote.member=使用: /{0} promote <成员>
|
||||
usage.0.rivalries=使用: /{0} rivalries
|
||||
usage.0.roster.tag=使用: /{0} roster [标签]
|
||||
usage.0.stats=使用: /{0} stats
|
||||
usage.0.trust.player=使用: /{0} trust [玩家]
|
||||
usage.0.untrust.player=使用: /{0} untrust [玩家]
|
||||
usage.0.verify.tag=使用: /{0} verify [标签]
|
||||
usage.0.vitals=使用: /{0} vitals
|
||||
usage.0.place=使用: /{0} place [玩家] [标签]
|
||||
usage.0.leaderboard=使用: /{0} leaderboard
|
||||
0.reload.1.reload.configuration=/{0} reload{1} - 重载配置
|
||||
0.globalff.allow.auto.1.set.global.friendly.fire=/{0} globalff allow/auto {1} - 设置全局友军伤害
|
||||
0.place=/{0} place [玩家] [标签]{1} - 将玩家加入帮派
|
||||
0.ban.unban.player.1.ban.unban.a.player=/{0} ban/unban [玩家]{1} - 封禁/解封一个玩家
|
||||
0.hometp.clan.1.tp.home.a.clan=/{0} home tp [帮派]{1} - 传送至帮派基地
|
||||
0.disband.tag.1.disband.a.clan=/{0} disband [标签]{1} - 解禁帮派
|
||||
0.verify.tag.1.verify.an.unverified.clan=/{0} verify [标签]{1} - 验证一个帮派
|
||||
0.verify.1.purchase.verification.of.your.clan=/{0} verify{1} - 付费验证你的帮派
|
||||
0.profile.1.view.your.clan.s.profile=/{0} profile{1} - 查看你的帮派的信息
|
||||
0.profile.tag.1.view.a.clan.s.profile=/{0} profile [标签]{1} - 查看帮派信息
|
||||
0.lookup.1.lookup.your.info=/{0} lookup{1} - Lookup your info
|
||||
0.lookup.player.1.lookup.a.player.s.info=/{0} lookup [玩家]{1} - 查看玩家信息
|
||||
0.leaderboard.1.view.leaderboard=/{0} leaderboard{1} - 查看排行榜
|
||||
0.alliances.1.view.all.clan.alliances=/{0} alliances{1} - 查看帮派联盟
|
||||
0.rivalries.1.view.all.clan.rivalries=/{0} rivalries{1} - 查看帮派敌对
|
||||
0.roster.1.view.your.clan.s.member.list=/{0} roster{1} - 查看你的帮派的成员列表
|
||||
0.roster.tag.1.view.a.clan.s.member.list=/{0} roster [标签]{1} - 查看帮派的成员列表
|
||||
0.vitals.1.view.your.clan.member.s.vitals=/{0} vitals{1} - 查看你的帮派玩家的生命
|
||||
0.coords.1.view.your.clan.member.s.coordinates=/{0} coords{1} - 查看你的帮派玩家的坐标
|
||||
0.stats.1.view.your.clan.member.s.stats=/{0} stats{1} - 查看你的帮派玩家的统计
|
||||
0.ally.add.remove.tag.1.add.remove.an.ally.clan=/{0} ally add/remove [标签]{1} - 添加/移除一个联盟帮派
|
||||
0.rival.add.remove.tag.1.add.remove.a.rival.clan=/{0} rival add/remove [标签]{1} - 添加/移除一个敌对帮派
|
||||
0.bb.1.display.bulletin.board=/{0} bb{1} - 显示公告板
|
||||
0.bb.msg.1.add.a.message.to.the.bulletin.board=/{0} bb [msg]{1} - 添加信息到公告板
|
||||
0.modtag.tag.1.modify.the.clan.s.tag=/{0} modtag [标签]{1} - 更改帮派标签
|
||||
0.cape.url.1.change.your.clan.s.cape=/{0} cape [url]{1} - 更改帮派披风
|
||||
0.invite.player.1.invite.a.player=/{0} invite [玩家]{1} - 邀请玩家
|
||||
0.kick.player.1.kick.a.player.from.the.clan=/{0} kick [玩家]{1} - 将玩家踢出帮派
|
||||
0.trust.untrust.player.1.set.trust.level1=/{0} trust [玩家]{1} - 设置成员为信任
|
||||
0.trust.untrust.player.1.set.trust.level2=/{0} untrust [玩家]{1} - 取消成员信任
|
||||
0.promote.member.1.promote.a.member.to.leader=/{0} promote [member]{1} - 提升一个成员为老大
|
||||
0.demote.leader.1.demote.a.leader.to.member=/{0} demote [leader]{1} - 降级一个老大为成员
|
||||
0.clanff.allow.block.1.toggle.clan.s.friendly.fire=/{0} clanff allow/block{1} - 切换帮派的友军伤害
|
||||
0.ff.allow.auto.1.toggle.personal.friendly.fire=/{0} ff allow/auto{1} - 切换个人的友军伤害
|
||||
0.toggle.command=/{0} toggle [{2}]{1} - 切换个人设置
|
||||
0.resign.1.resign.from.the.clan=/{0} resign{1} - 离开目前的帮派
|
||||
0.disband.1.disband.your.clan=/{0} disband{1} - 解散你的帮派
|
||||
0.trust.setrank=/{0} setrank [玩家] [rank]{1} - 给成员称号
|
||||
0.create.tag.name.1.purchase.a.new.clan=/{0} create [标签] [name]{1} - 购买新的帮派
|
||||
0.create.tag.name.1.create.a.new.clan=/{0} create [标签] [name]{1} - 创建新的帮派
|
||||
0.kills=/{0} kills{1} - 查看你的击杀量
|
||||
0.killsplayer=/{0} kills [玩家]{1} - 查看玩家的击杀量
|
||||
0.mostkilled=/{0} mostkilled{1} - 查看全服死亡排名
|
||||
home-menu=/{0} home{1} - 传送至帮派基地
|
||||
home-set-menu=/{0} home set{1} - 设置帮派基地
|
||||
home-clear-menu=/{0} home clear{1} - 清除帮派基地
|
||||
example.clan.modtag.4kfo.4l=示例: /clan modtag &4帅
|
||||
example.clan.create=示例: /clan create &4大帅比
|
||||
clan=帮派
|
||||
allies=联盟
|
||||
alliances=联盟
|
||||
coords=坐标
|
||||
name=名称
|
||||
distance=距离
|
||||
coords.upper=坐标
|
||||
world=世界
|
||||
kdr=KD
|
||||
members=成员
|
||||
clans.lower=帮派
|
||||
rival=敌对
|
||||
civilian=平民
|
||||
neutral=中立
|
||||
free.agent=Free Agent
|
||||
days=天
|
||||
rivals=敌对
|
||||
rivalries=敌对
|
||||
online=在线
|
||||
player=玩家
|
||||
seen=上线
|
||||
leader=老大
|
||||
roster=名单
|
||||
trusted=信任
|
||||
untrusted=失信
|
||||
deaths=死亡
|
||||
weights=权重
|
||||
stats=统计
|
||||
health=生命
|
||||
armor=护甲
|
||||
weapons=武器
|
||||
food=食物
|
||||
vitals=生命
|
||||
verified=已验证
|
||||
unverified=未验证
|
||||
profile=信息
|
||||
civilian.abbreviation=平民
|
||||
rank=称号
|
||||
leaders=老大
|
||||
none=无
|
||||
today=今天
|
||||
kills=击杀
|
||||
mostkilled=最多死亡
|
||||
killcount=击杀数
|
||||
attacker=攻击者
|
||||
victim=死者
|
||||
kill.death.ratio=KD 比值
|
||||
nokillsfound=无击杀
|
||||
version.loaded=[{0}] 版本 {1} 已加载
|
||||
promoted.to.leader={0} 被提升为老大
|
||||
denied.demotion={0} 拒绝了对 {1} 的降级. 未达成共识.
|
||||
membership.invitation={0} 拒绝了邀请
|
||||
joined.the.clan={0} 加入了帮派
|
||||
signed.off.request.cancelled={0} 已经下线. {1} 请求取消.
|
||||
clan.deletion={0} 拒绝了帮派删除. 未达成共识.
|
||||
has.been.disbanded=帮派 {0} 已经解散
|
||||
denied.the.promotion={0} 拒绝了对 {1} 的提升. 未达成共识.
|
||||
demoted.back.to.member={0} 被降级为普通成员
|
||||
peace.agreement.denied=和 {0} 的和平请求被拒绝
|
||||
denied.to.make.peace={0} 拒绝了与 {1} 和好
|
||||
broken.the.rivalry={0} 停止与 {1} 的敌对
|
||||
broken.the.rivalry.with={0} 停止了与 {1} 的敌对
|
||||
the.alliance.was.denied=与 {0} 的联盟被拒绝
|
||||
denied.an.alliance={0} 拒绝了 {1} 的联盟
|
||||
accepted.an.alliance={0} 接受了 {1} 的联盟
|
||||
created.an.alliance={0} 建立了与 {1} 的联盟
|
||||
has.joined={0} 已经加入了 {1}
|
||||
proposing.to.end.the.rivalry={0} 正在建议停止与 {1} 的敌对
|
||||
proposing.an.alliance={0} 正在建议与 {1} 联盟
|
||||
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}
|
||||
not.sufficient.money=您的账户没有足够的资金
|
||||
account.has.been.debited=你的账户已经被扣除了 {0}
|
||||
mysql.connection.successful=MySQL 连接成功
|
||||
mysql.connection.failed=MySQL 连接成功
|
||||
sqlite.connection.successful=SQLite 连接成功
|
||||
sqlite.connection.failed= SQLite 连接失败
|
||||
purging.player.data=正在清除玩家数据: {0}
|
||||
purging.clan=正在清除帮派: {0}
|
||||
clan.players=帮派玩家: {0}
|
||||
clans=帮派: {0}
|
||||
banned=你被禁止使用帮派命令
|
||||
nothing.more.to.see=没有更多
|
||||
nothing.to.deny=没有拒绝的事务
|
||||
no.leader.permissions=你没有老大权限
|
||||
you.have.already.voted=你已经投票了
|
||||
has.voted.to.deny={0} 投了拒绝票
|
||||
nothing.to.accept=没有可接受的事务
|
||||
view.next.page=输入 /{0} 查看下一页.
|
||||
voted.to.accept={0} 投了接受票
|
||||
bulletin.board.header={0}* {1}{2} 公告板
|
||||
has.been.disbanded.rivalry.ended={0} 解散了. 敌对终结了.
|
||||
has.been.disbanded.alliance.ended={0} 解散了. 联盟终结了.
|
||||
clan.disbanded=帮派已解散
|
||||
1.color.day=1 {0}天
|
||||
many.color.days={0}{1} 天
|
||||
does.not.match=没有匹配的帮派命令
|
||||
simpleclans.command.failure=SimpleClans 命令失败: {0}
|
||||
insufficient.permissions=权限不足
|
||||
clan.is.not.verified=帮派未验证
|
||||
not.a.member.of.any.clan=你不是任何帮派的成员
|
||||
minimum.to.make.alliance=你的帮派至少要有 {0} 名玩家才能建立联盟
|
||||
no.clan.matched=没有匹配的帮派
|
||||
cannot.ally.with.an.unverified.clan=你不能和未验证的帮派建立联盟
|
||||
your.clans.are.not.allies=你的帮派不是联盟
|
||||
has.broken.the.alliance={0} 停止了与 {1} 的联盟
|
||||
at.least.one.leader.accept.the.alliance=至少一个老大在线才能接受联盟
|
||||
leaders.have.been.asked.for.an.alliance={0} 老大请求联盟
|
||||
your.clans.are.already.allies=你的帮派已经联盟
|
||||
your.clan.cannot.create.rivals=你的帮派不能创建敌对帮派
|
||||
min.players.rivalries=你的帮派至少要有 {0} 名玩家才能建立敌对
|
||||
this.player.is.already.banned=这个玩家已经被封禁
|
||||
player.added.to.banned.list=玩家添加至封禁列表
|
||||
you.banned=你被禁止使用帮派命令
|
||||
cape.must.be.png=披风链接必须指向一个 PNG 图片
|
||||
url.error=URL 返回了一个错误. 请检查是否正确.
|
||||
changed.the.clan.cape={0} 更改了帮派披风
|
||||
clan.wide.friendly.fire.blocked=帮派友军伤害已经禁止
|
||||
clan.wide.friendly.fire.is.allowed=帮派友军伤害已经启用
|
||||
only.trusted.players.can.access.clan.coords=只有信任的成员能够前往公会基地
|
||||
you.are.the.only.member.online=你是唯一在线的成员
|
||||
your.clan.tag.cannot.be.longer.than.characters=你的帮派的标签不能超过 {0} 字符
|
||||
your.clan.tag.must.be.longer.than.characters=你的帮派的标签必须超过 {0} 字符
|
||||
your.tag.cannot.contain.the.following.colors=帮派的标签不能含有以下颜色: {0}
|
||||
your.clan.name.cannot.be.longer.than.characters=你的帮派的名称不能超过 {0} 字符
|
||||
your.clan.name.must.be.longer.than.characters=你的帮派的名称必须超过 {0} 字符
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=帮派的标签只能含有字母、数字和颜色代码
|
||||
your.clan.name.cannot.contain.color.codes=帮派的名称不能含有颜色
|
||||
that.tag.name.is.disallowed=这个标签名不被允许
|
||||
you.must.first.resign=你必须先离开 {0}
|
||||
clan.with.this.tag.already.exists=此标签的帮派已经存在
|
||||
get.your.clan.verified.to.access.advanced.features=验证你的帮派以使用高级功能
|
||||
clan.created=帮派 {0} 创建了
|
||||
leaders.must.be.online.to.vote.on.demotion=除了此降级的老大以外的所有老大必须全部在线才能降级
|
||||
demotion.vote.has.been.requested.from.all.leaders=所有老大都要求降级
|
||||
player.is.not.a.leader.of.your.clan=这个玩家不是你的帮派的老大
|
||||
clan.has.been.disbanded=帮派 {0} 已经解散了
|
||||
clan.disband.vote.has.been.requested.from.all.leaders=所有老大都要求解散帮派
|
||||
friendy.fire.is.now.managed.by.your.clan=友军伤害现在由您的帮派管理
|
||||
personal.friendly.fire.is.set.to.allowed=个人的友军伤害已经开启
|
||||
global.friendy.fire.is.now.managed.by.each.clan=全局的友军伤害现在由各个帮派管理
|
||||
global.friendy.fire.is.already.being.managed.by.each.clan=全局的友军伤害已经由各个帮派管理了
|
||||
global.friendly.fire.is.set.to.allowed=全局的友军伤害已经启用
|
||||
global.friendly.fire.is.already.being.allowed=全局的友军伤害已经启用了
|
||||
no.player.matched=没有匹配的玩家
|
||||
the.player.doesn.t.not.have.the.permissions.to.join.clans=玩家没有加入此帮派的权限
|
||||
you.cannot.invite.yourself=你不能邀请你自己
|
||||
this.player.is.banned.from.using.clan.commands=此玩家被禁止使用此命令
|
||||
the.player.is.already.member.of.another.clan=此玩家已经是其他帮派的成员了
|
||||
has.been.asked.to.join={0} 已经被请求加入 {1} 了
|
||||
you.cannot.kick.yourself=你不能踢出你自己
|
||||
the.player.is.not.a.member.of.your.clan=此玩家不是你的帮派的成员
|
||||
you.cannot.kick.another.leader=你不能踢出另一个老大
|
||||
has.been.kicked.by={0} 已经被 {1} 踢出了
|
||||
no.clans.have.been.created=没有帮派被创建
|
||||
total.clans=总帮派:
|
||||
legend=Legend:
|
||||
kill.type.civilian=击杀种类: {0}平民
|
||||
no.player.data.found=没有找到玩家数据
|
||||
kill.type.0=击杀种类: {0}
|
||||
s.player.info={0} 的玩家信息
|
||||
clan.0=帮派: {0}
|
||||
status.0=状态: {0}
|
||||
rank.0=称号: {0}
|
||||
kdr.0=KD: {0}
|
||||
deaths.0=死亡: {0}
|
||||
join.date.0=加入日期: {0}
|
||||
fee.0.value.1=Fee: {0}, {1} $
|
||||
last.seen.0=最后上线: {0}
|
||||
past.clans.0=曾经的帮派: {0}
|
||||
inactive.0=不活跃: {0}
|
||||
kill.totals=总击杀:
|
||||
clan.commands=帮派命令
|
||||
you.can.only.modify.the.color.and.case.of.the.tag=你只能更改标签的颜色和大小写
|
||||
tag.changed.to.0=标签更改为 {0}
|
||||
name.0=名称: {0}
|
||||
description.0=Description: {0}
|
||||
leaders.0=老大: {0}
|
||||
members.online.0=在线成员: {0}
|
||||
allies.0=联盟: {0}
|
||||
rivals.0=敌对: {0}
|
||||
founded.0=成立: {0}
|
||||
the.member.to.be.promoted.must.be.online=提升的成员必须在线
|
||||
the.player.does.not.have.the.permissions.to.lead.a.clan=玩家没有做老大的权限
|
||||
you.cannot.promote.yourself=你不能提升你自己
|
||||
all.leaders.must.be.online.to.vote.on.this.promotion=所有老大必须在线投票此提升
|
||||
the.player.is.already.a.leader=玩家已经是老大了
|
||||
configuration.reloaded=配置已重载 by 754503921
|
||||
last.leader.cannot.resign.you.must.appoint.another.leader.or.disband.the.clan=最后一位老大不能离职,你必须指定另一个老大或者解散此帮派
|
||||
0.has.resigned={0} 已经离职
|
||||
only.trusted.players.can.access.clan.stats=只有信任的成员能够查看统计
|
||||
you.cannot.trust.yourself=你不能信任你自己
|
||||
leaders.are.already.trusted=老大已经被信任
|
||||
this.player.is.already.trusted=此玩家已经被信任
|
||||
has.been.given.trusted.status.by={0} 已经被 {1} 信任了
|
||||
this.player.is.not.banned=此玩家未被封禁
|
||||
player.removed.from.the.banned.list=玩家从封禁名单中移除
|
||||
you.have.been.unbanned.from.clan.commands=你被使用帮派命令解禁了
|
||||
you.cannot.untrust.yourself=你不能不信任你自己
|
||||
leaders.cannot.be.untrusted=老大不能被取消信任
|
||||
this.player.is.already.untrusted=此玩家已经不被信任了
|
||||
has.been.given.untrusted.status.by={0} 已经被 {1} 不信任了
|
||||
the.clan.does.not.exist=此帮派不存在
|
||||
the.clan.is.already.verified=此帮派已经验证了
|
||||
the.clan.has.been.verified=此帮派已经验证
|
||||
clan.0.has.been.verified=帮派 {0} 已经被验证!
|
||||
only.trusted.players.can.access.clan.vitals=只有信任的成员能够查看帮派生命
|
||||
total.clan.players.0=总帮派玩家: {0}
|
||||
proposing.war={0} 正在请求与 {1} 的战争
|
||||
you.can.only.start.war.with.rivals=你只能和敌对帮派展开战争
|
||||
leaders.have.been.asked.to.accept.the.war.request={0} 老大已经被请求接受战争请求
|
||||
leaders.asked.to.end.rivalry={0} 老大已经被请求接受停战请求
|
||||
proposing.to.end.the.war={0} 正在请求与 {1} 停战
|
||||
clans.already.at.war=你的帮派已经处于战争中了
|
||||
clans.not.at.war=你的帮派没有处于战争中
|
||||
you.are.at.war={0} 现在与 {1} 开战
|
||||
denied.war.req={0} 拒绝了 {1} 发送的开战请求
|
||||
you.are.no.longer.at.war={0} 不再与 {1} 战争了
|
||||
end.war.denied=停战请求被 {0} 拒绝了
|
||||
denied.war.end={0} 拒绝了 {1} 的停战请求
|
||||
0.war=/{0} war{1} start/end [标签] - 开始或停止一场战争
|
||||
has.initiated.a.rivalry={0} 已经将 {1} 设置为敌对
|
||||
start=开始
|
||||
end=停止
|
||||
add=添加
|
||||
remove=移除
|
||||
allow=允许
|
||||
block=阻止
|
||||
auto=自动
|
||||
war=战争
|
||||
0.s.sword.1.2.b.bow.3.4.a.arrow={0}S=剑{1}, {2}B=弓{3}, {4}#=箭
|
||||
weapon.S=S
|
||||
weapon.B=B
|
||||
weapon.A=A
|
||||
materials=材料
|
||||
armor.h=H
|
||||
armor.c=C
|
||||
armor.l=L
|
||||
armor.B=B
|
||||
diamond=钻石
|
||||
gold=金
|
||||
wood=木
|
||||
server.announce=服务器公告
|
||||
clan.announce=帮派公告
|
||||
leader.announce=老大公告
|
||||
hunger=饥饿
|
||||
stone=石
|
||||
iron=铁
|
||||
the.clan.cannot.be.rivaled=这个帮派不能敌对
|
||||
capeoff=披风已关闭
|
||||
capeon=披风已开启
|
||||
bboff=公告板已关闭
|
||||
bbon=公告板已开启
|
||||
tagoff=标签已关闭
|
||||
tagon=标签已开启
|
||||
home.base.only.once=基地只能设置一次
|
||||
now.at.homebase=你现在在 {0} 的基地
|
||||
hombase.set=帮派基地设置为: {0}
|
||||
hombase.cleared=帮派基地已清除
|
||||
hombase.mod.set={0} 的基地设置为:
|
||||
hombase.not.set=基地未设置
|
||||
rival.limit.reached=你达到了敌对数量上限. 你不能再和其他帮派敌对了.
|
||||
you.moved.teleport.cancelled=你移动了,传送请求取消
|
||||
waiting.for.teleport.stand.still.for.0.seconds=等待传送于 {0} 秒内开始
|
||||
no.teleport=你不被允许传送至该位置
|
||||
on=开
|
||||
off=关
|
||||
leave=离开
|
||||
join=加入
|
||||
mute=禁言
|
||||
player.rank.changed=称号被设置为
|
||||
your.clans.are.already.rivals=你的帮派已经是敌对了
|
||||
player.got.money=你因为击杀 {1} 而获得了基于 KD: {2} 的 {0}
|
||||
cleared.bb=清空了公告板
|
||||
clan.balance=帮派经济: {0}
|
||||
bb.clan.deposit={0} $ 已存入
|
||||
player.clan.deposit=你存入了 {0}
|
||||
bb.clan.withdraw={0} $ 被取出
|
||||
player.clan.withdraw=你取出了 {0}
|
||||
clan.bank.not.enough.money=你的帮派银行资金不足
|
||||
your.clans.are.not.rivals=你的帮派不是敌对
|
||||
the.clan.members.reached.limit=帮派成员达到上限
|
||||
+265
-208
@@ -1,208 +1,265 @@
|
||||
name: SimpleClans
|
||||
main: net.sacredlabyrinth.phaed.simpleclans.SimpleClans
|
||||
version: ${project.version}
|
||||
softdepend: [VanishNoPacket, Permissions, PermissionsBukkit, Vault, PermissionsEx, mChat, mChatSuite]
|
||||
permissions:
|
||||
simpleclans.admin.permissions:
|
||||
description: Can grant clans permissions
|
||||
simpleclans.admin.reload:
|
||||
description: Can reload configuration
|
||||
simpleclans.admin.all-seeing-eye:
|
||||
description: Can see all clan chats
|
||||
simpleclans.admin.resetkdr:
|
||||
description: Can reset player kdr (of all or just one)
|
||||
simpleclans.mod.verify:
|
||||
description: Can verify simpleclans
|
||||
simpleclans.mod.ban:
|
||||
description: Can ban players from the entire plugin
|
||||
simpleclans.mod.disband:
|
||||
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:
|
||||
description: Can bypass restrictions
|
||||
simpleclans.mod.nopvpinwar:
|
||||
description: Can bypass pvp in wars
|
||||
simpleclans.anyone.list:
|
||||
description: Can list simpleclans
|
||||
simpleclans.anyone.profile:
|
||||
description: Can view a clan's profile
|
||||
simpleclans.anyone.roster:
|
||||
description: Can veiw a clan's member list
|
||||
simpleclans.anyone.lookup:
|
||||
description: Can lookup a player's info
|
||||
simpleclans.anyone.leaderboard:
|
||||
description: Can view the leaderboard
|
||||
simpleclans.anyone.alliances:
|
||||
description: Can view alliances by clan
|
||||
simpleclans.anyone.rivalries:
|
||||
description: Can view rivalries by clan
|
||||
simpleclans.member.profile:
|
||||
description: Can view his own clan's profile
|
||||
simpleclans.member.roster:
|
||||
description: Can view his own clan's member list
|
||||
simpleclans.member.lookup:
|
||||
description: Can view his own player info
|
||||
simpleclans.member.vitals:
|
||||
description: Can view his clan's vitals
|
||||
simpleclans.member.coords:
|
||||
description: Can view his clan's coords
|
||||
simpleclans.member.stats:
|
||||
description: Can view his simpleclans stats
|
||||
simpleclans.member.bb:
|
||||
description: Can view his clan's bulletin board
|
||||
simpleclans.member.bb-add:
|
||||
description: Can add to his clan's bulletin board
|
||||
simpleclans.member.bb-toggle:
|
||||
description: Can toggle bb on/off
|
||||
simpleclans.member.ff:
|
||||
description: Can toggle his own friendly fire
|
||||
simpleclans.member.resign:
|
||||
description: Can resign from his clan
|
||||
simpleclans.member.ally:
|
||||
description: Can use ally chat
|
||||
simpleclans.member.chat:
|
||||
description: Can use clan chat
|
||||
simpleclans.member.can-join:
|
||||
description: Can join clans
|
||||
simpleclans.member.home:
|
||||
description: Can tp to home base
|
||||
simpleclans.member.resetkdr:
|
||||
description: Can reset his kdr
|
||||
simpleclans.leader.create:
|
||||
description: Can create simpleclans
|
||||
simpleclans.leader.verify:
|
||||
description: Can verify his clan
|
||||
simpleclans.leader.home-set:
|
||||
description: Can set home base
|
||||
simpleclans.leader.home-regroup:
|
||||
description: Can tp entire clan to homebase
|
||||
simpleclans.leader.ally:
|
||||
description: Can ally his clan with other simpleclans
|
||||
simpleclans.leader.rival:
|
||||
description: Can start a rivalry with another clan
|
||||
simpleclans.leader.modtag:
|
||||
description: Can modify his clan's tag
|
||||
simpleclans.leader.cape:
|
||||
description: Can set his clan's cape url
|
||||
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:
|
||||
description: Can hide his own clan tag
|
||||
simpleclans.mod.mostkilled:
|
||||
description: Can view his and other's clans mostkilled
|
||||
simpleclans.mod.keep-items:
|
||||
description: Can keep items when teleporting home
|
||||
simpleclans.mod.place:
|
||||
description: Can manually place players in clans
|
||||
simpleclans.leader.invite:
|
||||
description: Can invite players into his clan
|
||||
simpleclans.leader.kick:
|
||||
description: Can kick players form his tea,
|
||||
simpleclans.leader.promote:
|
||||
description: Can promote players to clan leaders
|
||||
simpleclans.leader.promotable:
|
||||
description: Can be promoted to clan leader
|
||||
simpleclans.leader.demote:
|
||||
description: Can demote clan leaders to normal players
|
||||
simpleclans.leader.ff:
|
||||
description: Can toggle his clan's friendly fire
|
||||
simpleclans.leader.disband:
|
||||
description: Can disband his own clan
|
||||
simpleclans.leader.settrust:
|
||||
description: Can set trust levels for members
|
||||
simpleclans.leader.war:
|
||||
description: Can start wars
|
||||
simpleclans.leader.setrank:
|
||||
description: Can set ranks
|
||||
simpleclans.leader.coloredtag:
|
||||
description: Can use color codes in tags
|
||||
simpleclans.member.bank:
|
||||
description: Can use banks
|
||||
simpleclans.admin.*:
|
||||
description: Permissions for admins
|
||||
default: op
|
||||
children:
|
||||
simpleclans.admin.reload: true
|
||||
simpleclans.admin.all-seeing-eye: true
|
||||
simpleclans.admin.resetkdr: true
|
||||
simpleclans.mod.*:
|
||||
description: Permissions for moderators
|
||||
default: op
|
||||
children:
|
||||
simpleclans.mod.verify: true
|
||||
simpleclans.mod.ban: true
|
||||
simpleclans.mod.disband: true
|
||||
simpleclans.mod.globalff: true
|
||||
simpleclans.mod.bypass: true
|
||||
simpleclans.mod.home: true
|
||||
simpleclans.mod.mostkilled: true
|
||||
simpleclans.mod.keep-items: true
|
||||
simpleclans.mod.nopvpinwar: true
|
||||
simpleclans.mod.place: true
|
||||
simpleclans.anyone.*:
|
||||
description: Permissions for anyone
|
||||
default: false
|
||||
children:
|
||||
simpleclans.anyone.list: true
|
||||
simpleclans.anyone.profile: true
|
||||
simpleclans.anyone.roster: true
|
||||
simpleclans.anyone.lookup: true
|
||||
simpleclans.anyone.leaderboard: true
|
||||
simpleclans.anyone.alliances: true
|
||||
simpleclans.anyone.rivalries: true
|
||||
simpleclans.member.*:
|
||||
description: Permissions for those who can be clan members
|
||||
default: false
|
||||
children:
|
||||
simpleclans.member.can-join: true
|
||||
simpleclans.member.profile: true
|
||||
simpleclans.member.roster: true
|
||||
simpleclans.member.lookup: true
|
||||
simpleclans.member.vitals: true
|
||||
simpleclans.member.coords: true
|
||||
simpleclans.member.stats: true
|
||||
simpleclans.member.bb: true
|
||||
simpleclans.member.bb-add: true
|
||||
simpleclans.member.bb-toggle: true
|
||||
simpleclans.member.cape-toggle: true
|
||||
simpleclans.member.tag-toggle: true
|
||||
simpleclans.member.ff: true
|
||||
simpleclans.member.resign: true
|
||||
simpleclans.member.ally: true
|
||||
simpleclans.member.chat: true
|
||||
simpleclans.member.home: true
|
||||
simpleclans.member.kills: true
|
||||
simpleclans.member.bank: true
|
||||
simpleclans.member.resetkdr: true
|
||||
simpleclans.leader.*:
|
||||
description: Permissions for those who can be clan leaders
|
||||
default: false
|
||||
children:
|
||||
simpleclans.leader.create: true
|
||||
simpleclans.leader.verify: true
|
||||
simpleclans.leader.ally: true
|
||||
simpleclans.leader.rival: true
|
||||
simpleclans.leader.modtag: true
|
||||
simpleclans.leader.cape: true
|
||||
simpleclans.leader.invite: true
|
||||
simpleclans.leader.kick: true
|
||||
simpleclans.leader.promote: true
|
||||
simpleclans.leader.promotable: true
|
||||
simpleclans.leader.demote: true
|
||||
simpleclans.leader.ff: true
|
||||
simpleclans.leader.disband: true
|
||||
simpleclans.leader.settrust: true
|
||||
simpleclans.leader.war: true
|
||||
simpleclans.leader.home-set: true
|
||||
simpleclans.leader.home-regroup: true
|
||||
simpleclans.leader.setrank: true
|
||||
simpleclans.leader.coloredtag: true
|
||||
name: SimpleClans
|
||||
main: net.sacredlabyrinth.phaed.simpleclans.SimpleClans
|
||||
version: '${project.version}'
|
||||
softdepend: [VanishNoPacket, Permissions, PermissionsBukkit, Vault, PermissionsEx, mChat, mChatSuite, PlaceholderAPI]
|
||||
api-version: '1.13'
|
||||
permissions:
|
||||
simpleclans.admin.permissions:
|
||||
description: Can grant clans permissions
|
||||
simpleclans.admin.reload:
|
||||
description: Can reload configuration
|
||||
simpleclans.admin.purge:
|
||||
description: Can purge a player
|
||||
simpleclans.admin.promote:
|
||||
description: Can promote players to clan leaders
|
||||
simpleclans.admin.demote:
|
||||
description: Can demote clan leaders to normal players
|
||||
simpleclans.admin.all-seeing-eye:
|
||||
description: Can see all clan chats
|
||||
simpleclans.admin.resetkdr:
|
||||
description: Can reset player kdr (of all or just one)
|
||||
simpleclans.mod.verify:
|
||||
description: Can verify simpleclans
|
||||
simpleclans.mod.ban:
|
||||
description: Can ban players from the entire plugin
|
||||
simpleclans.mod.disband:
|
||||
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:
|
||||
description: Can bypass restrictions
|
||||
simpleclans.mod.nopvpinwar:
|
||||
description: Can bypass pvp in wars
|
||||
simpleclans.anyone.list:
|
||||
description: Can list simpleclans
|
||||
simpleclans.anyone.profile:
|
||||
description: Can view a clan's profile
|
||||
simpleclans.anyone.roster:
|
||||
description: Can veiw a clan's member list
|
||||
simpleclans.anyone.lookup:
|
||||
description: Can lookup a player's info
|
||||
simpleclans.anyone.leaderboard:
|
||||
description: Can view the leaderboard
|
||||
simpleclans.anyone.alliances:
|
||||
description: Can view alliances by clan
|
||||
simpleclans.anyone.rivalries:
|
||||
description: Can view rivalries by clan
|
||||
simpleclans.other.kdr-exempt:
|
||||
description: The player's KDR is not affected on killing/dying
|
||||
default: false
|
||||
simpleclans.member.profile:
|
||||
description: Can view his own clan's profile
|
||||
simpleclans.member.roster:
|
||||
description: Can view his own clan's member list
|
||||
simpleclans.member.bypass-fee:
|
||||
description: Can bypass the member fee
|
||||
simpleclans.member.lookup:
|
||||
description: Can view his own player info
|
||||
simpleclans.member.vitals:
|
||||
description: Can view his clan's vitals
|
||||
simpleclans.member.coords:
|
||||
description: Can view his clan's coords
|
||||
simpleclans.member.stats:
|
||||
description: Can view his simpleclans stats
|
||||
simpleclans.member.bb:
|
||||
description: Can view his clan's bulletin board
|
||||
simpleclans.member.bb-add:
|
||||
description: Can add to his clan's bulletin board
|
||||
simpleclans.member.bb-toggle:
|
||||
description: Can toggle bb on/off
|
||||
simpleclans.member.ff:
|
||||
description: Can toggle his own friendly fire
|
||||
simpleclans.member.resign:
|
||||
description: Can resign from his clan
|
||||
simpleclans.member.ally:
|
||||
description: Can use ally chat
|
||||
simpleclans.member.chat:
|
||||
description: Can use clan chat
|
||||
simpleclans.member.can-join:
|
||||
description: Can join clans
|
||||
simpleclans.member.home:
|
||||
description: Can tp to home base
|
||||
simpleclans.member.resetkdr:
|
||||
description: Can reset his kdr
|
||||
simpleclans.leader.create:
|
||||
description: Can create simpleclans
|
||||
simpleclans.leader.verify:
|
||||
description: Can verify his clan
|
||||
simpleclans.leader.home-set:
|
||||
description: Can set home base
|
||||
simpleclans.leader.home-regroup:
|
||||
description: Can tp entire clan to homebase
|
||||
simpleclans.leader.ally:
|
||||
description: Can ally his clan with other simpleclans
|
||||
simpleclans.leader.rival:
|
||||
description: Can start a rivalry with another clan
|
||||
simpleclans.leader.modtag:
|
||||
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.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:
|
||||
description: Can hide his own clan tag
|
||||
simpleclans.member.fee-check:
|
||||
description: Can check his clan's fee
|
||||
simpleclans.mod.mostkilled:
|
||||
description: Can view his and other's clans mostkilled
|
||||
simpleclans.mod.keep-items:
|
||||
description: Can keep items when teleporting home
|
||||
simpleclans.mod.place:
|
||||
description: Can manually place players in clans
|
||||
simpleclans.leader.fee:
|
||||
description: Can enable and set the clan fee
|
||||
simpleclans.leader.invite:
|
||||
description: Can invite players into his clan
|
||||
simpleclans.leader.kick:
|
||||
description: Can kick players form his tea,
|
||||
simpleclans.leader.promote:
|
||||
description: Can promote players to clan leaders
|
||||
simpleclans.leader.promotable:
|
||||
description: Can be promoted to clan leader
|
||||
simpleclans.leader.demote:
|
||||
description: Can demote clan leaders to normal players
|
||||
simpleclans.leader.ff:
|
||||
description: Can toggle his clan's friendly fire
|
||||
simpleclans.leader.disband:
|
||||
description: Can disband his own clan
|
||||
simpleclans.leader.settrust:
|
||||
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
|
||||
simpleclans.leader.coloredtag:
|
||||
description: Can use color codes in tags
|
||||
simpleclans.leader.rank.list:
|
||||
description: Can list the ranks
|
||||
simpleclans.leader.rank.create:
|
||||
description: Can create a new rank
|
||||
simpleclans.leader.rank.assign:
|
||||
description: Can assign a rank to a user
|
||||
simpleclans.leader.rank.unassign:
|
||||
description: Can unassign a player from a rank
|
||||
simpleclans.leader.rank.delete:
|
||||
description: Can delete a rank
|
||||
simpleclans.leader.rank.permissions.available:
|
||||
description: Can list the available permissions
|
||||
simpleclans.leader.rank.permissions.list:
|
||||
description: Can list the permissions of a rank
|
||||
simpleclans.leader.rank.permissions.add:
|
||||
description: Can add permissions to a rank
|
||||
simpleclans.leader.rank.permissions.remove:
|
||||
description: Can remove permissions from a rank
|
||||
simpleclans.leader.rank.setdisplayname:
|
||||
description: Can set the rank displayname
|
||||
simpleclans.member.bank:
|
||||
description: Can use banks
|
||||
simpleclans.admin.*:
|
||||
description: Permissions for admins
|
||||
default: op
|
||||
children:
|
||||
simpleclans.admin.reload: true
|
||||
simpleclans.admin.all-seeing-eye: true
|
||||
simpleclans.admin.resetkdr: true
|
||||
simpleclans.admin.demote: true
|
||||
simpleclans.mod.*:
|
||||
description: Permissions for moderators
|
||||
default: op
|
||||
children:
|
||||
simpleclans.mod.verify: true
|
||||
simpleclans.mod.ban: true
|
||||
simpleclans.mod.disband: true
|
||||
simpleclans.mod.globalff: true
|
||||
simpleclans.mod.bypass: true
|
||||
simpleclans.mod.home: true
|
||||
simpleclans.mod.mostkilled: true
|
||||
simpleclans.mod.keep-items: true
|
||||
simpleclans.mod.nopvpinwar: true
|
||||
simpleclans.mod.place: true
|
||||
simpleclans.anyone.*:
|
||||
description: Permissions for anyone
|
||||
default: false
|
||||
children:
|
||||
simpleclans.anyone.list: true
|
||||
simpleclans.anyone.profile: true
|
||||
simpleclans.anyone.roster: true
|
||||
simpleclans.anyone.lookup: true
|
||||
simpleclans.anyone.leaderboard: true
|
||||
simpleclans.anyone.alliances: true
|
||||
simpleclans.anyone.rivalries: true
|
||||
simpleclans.member.*:
|
||||
description: Permissions for those who can be clan members
|
||||
default: false
|
||||
children:
|
||||
simpleclans.member.can-join: true
|
||||
simpleclans.member.profile: true
|
||||
simpleclans.member.roster: true
|
||||
simpleclans.member.lookup: true
|
||||
simpleclans.member.vitals: true
|
||||
simpleclans.member.coords: true
|
||||
simpleclans.member.stats: true
|
||||
simpleclans.member.bb: true
|
||||
simpleclans.member.bb-add: true
|
||||
simpleclans.member.bb-toggle: true
|
||||
simpleclans.member.cape-toggle: true
|
||||
simpleclans.member.tag-toggle: true
|
||||
simpleclans.member.ff: true
|
||||
simpleclans.member.resign: true
|
||||
simpleclans.member.ally: true
|
||||
simpleclans.member.chat: true
|
||||
simpleclans.member.home: true
|
||||
simpleclans.member.kills: true
|
||||
simpleclans.member.bank: true
|
||||
simpleclans.member.resetkdr: true
|
||||
simpleclans.member.fee-check: true
|
||||
simpleclans.leader.*:
|
||||
description: Permissions for those who can be clan leaders
|
||||
default: false
|
||||
children:
|
||||
simpleclans.leader.create: true
|
||||
simpleclans.leader.verify: true
|
||||
simpleclans.leader.ally: true
|
||||
simpleclans.leader.rival: true
|
||||
simpleclans.leader.modtag: true
|
||||
simpleclans.leader.cape: true
|
||||
simpleclans.leader.invite: true
|
||||
simpleclans.leader.kick: true
|
||||
simpleclans.leader.promote: true
|
||||
simpleclans.leader.promotable: true
|
||||
simpleclans.leader.demote: true
|
||||
simpleclans.leader.ff: true
|
||||
simpleclans.leader.disband: true
|
||||
simpleclans.leader.settrust: true
|
||||
simpleclans.leader.war: true
|
||||
simpleclans.leader.home-set: true
|
||||
simpleclans.leader.home-regroup: true
|
||||
simpleclans.leader.setrank: true
|
||||
simpleclans.leader.coloredtag: true
|
||||
simpleclans.leader.coloredrank: true
|
||||
simpleclans.leader.bb-clear: true
|
||||
simpleclans.leader.rank.setdisplayname: true
|
||||
simpleclans.leader.rank.list: true
|
||||
simpleclans.leader.rank.create: true
|
||||
simpleclans.leader.rank.assign: true
|
||||
simpleclans.leader.rank.unassign: true
|
||||
simpleclans.leader.rank.delete: true
|
||||
simpleclans.leader.rank.permissions.available: true
|
||||
simpleclans.leader.rank.permissions.add: true
|
||||
simpleclans.leader.rank.permissions.remove: true
|
||||
simpleclans.leader.rank.permissions.list: true
|
||||
Reference in new issue
Block a user