mirror of
https://github.com/RoinujNosde/SimpleClans.git
synced 2026-11-05 01:10:04 -05:00
Compare commits
52
Commits
v2.17.0
...
chat-perms
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
776acbebbe | ||
|
|
aa70a7653e | ||
|
|
046aa1d96d | ||
|
|
e44775e994 | ||
|
|
43da5bd1f1 | ||
|
|
8fa465da38 | ||
|
|
56c7908c33 | ||
|
|
fc81e76521 | ||
|
|
f7fe5c4ad4 | ||
|
|
8f4f763c37 | ||
|
|
7a37382264 | ||
|
|
7f9d133051 | ||
|
|
26ba9f7329 | ||
|
|
d8cb61b0fc | ||
|
|
3f1b06dcf9 | ||
|
|
b043eb0742 | ||
|
|
7691a4b719 | ||
|
|
87ece22036 | ||
|
|
f7e7ec6624 | ||
|
|
25197cdd72 | ||
|
|
30a501c063 | ||
|
|
f14c425488 | ||
|
|
cc2e32984d | ||
|
|
2c9b0f98fe | ||
|
|
f484bc16c6 | ||
|
|
37f0ecff50 | ||
|
|
c8969f2196 | ||
|
|
b9c3cfd640 | ||
|
|
a440834347 | ||
|
|
1adec0b89d | ||
|
|
d56a0a979a | ||
|
|
af07988103 | ||
|
|
96a13d8d6c | ||
|
|
2a1ad5b5c8 | ||
|
|
1311423a17 | ||
|
|
59e9c4caed | ||
|
|
4ab53d1613 | ||
|
|
2ea744443f | ||
|
|
8bd8bb6466 | ||
|
|
e7f756f306 | ||
|
|
b7961acd5c | ||
|
|
c47289c5bf | ||
|
|
7769060f4d | ||
|
|
a859928622 | ||
|
|
becb88b763 | ||
|
|
711f81f3da | ||
|
|
7fae6f8b8a | ||
|
|
62a8d304f4 | ||
|
|
fe8668abb0 | ||
|
|
36f5739f06 | ||
|
|
f7465941b2 | ||
|
|
2aa5b9aad3 |
No files matched your search
@@ -5,9 +5,9 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ dev ]
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -16,9 +16,8 @@ jobs:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
java-version: [ 8, 11, 16, 17 ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: Java ${{ matrix.java-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -4,15 +4,16 @@ on:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 1.8
|
||||
java-version: 8
|
||||
cache: 'maven'
|
||||
distribution: 'adopt'
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: Upload artifact
|
||||
@@ -23,7 +24,7 @@ jobs:
|
||||
game_endpoint: minecraft
|
||||
file_path: target/SimpleClans.jar
|
||||
changelog: ${{ github.event.release.body }}
|
||||
changelog_type: html
|
||||
changelog_type: markdown
|
||||
display_name: ${{ github.event.release.tag_name }}
|
||||
game_versions: 8849,8503,7915,7667,7330,7105,6588,630,591,585,531
|
||||
release_type: release
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Publish to Modrinth
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 8
|
||||
cache: 'maven'
|
||||
distribution: 'adopt'
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: Upload artifact
|
||||
uses: RubixDev/modrinth-upload@v1.0.0
|
||||
with:
|
||||
token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
project_id: quLDfyDl
|
||||
file_path: target/SimpleClans.jar
|
||||
changelog: ${{ github.event.release.body }}
|
||||
name: ${{ github.event.release.tag_name }}
|
||||
version: ${{ github.event.release.tag_name }}
|
||||
game_versions: 1.19,1.18,1.17,1.16,1.15,1.14,1.13,1.12,1.11,1.10,1.9,1.8
|
||||
release_type: release
|
||||
loaders: spigot
|
||||
featured: true
|
||||
@@ -1,27 +1,27 @@
|
||||
name: Publish to Reposilite
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 1.8
|
||||
java-version: 8
|
||||
server-id: reposilite # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_PASSWORD
|
||||
|
||||
cache: 'maven'
|
||||
distribution: 'adopt'
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
- name: Publish to Reposilite
|
||||
run: mvn -B deploy
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
name: release-please
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
with:
|
||||
release-type: maven
|
||||
package-name: SimpleClans
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
fork: false
|
||||
@@ -0,0 +1,49 @@
|
||||
# Changelog
|
||||
|
||||
## [2.18.1](https://github.com/RoinujNosde/SimpleClans/compare/v2.18.0...v2.18.1) (2022-11-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* added check for clan_member on land commands ([fc81e76](https://github.com/RoinujNosde/SimpleClans/commit/fc81e765211bebe22a7a6aa5d5158754580bbdc5))
|
||||
* attempt at fixing NPE on getAllClanPlayers ([26ba9f7](https://github.com/RoinujNosde/SimpleClans/commit/26ba9f73296a772eaa698d2ede6fbc3831da850c))
|
||||
* **bungee:** error deserializing clan banners ([56c7908](https://github.com/RoinujNosde/SimpleClans/commit/56c7908c332167cec9cca6a4ea054977d0d68b9f))
|
||||
* channel auto creation setting not respected on join/link ([7f9d133](https://github.com/RoinujNosde/SimpleClans/commit/7f9d133051b9011837d0a5114abc6c3637a3f02c))
|
||||
* default ranks were getting re-added on config load ([7a37382](https://github.com/RoinujNosde/SimpleClans/commit/7a37382264ff4dd5456f6930045b5102bf491897))
|
||||
* missing getHandlerList on HomeRegroupEvent ([#338](https://github.com/RoinujNosde/SimpleClans/issues/338)) ([8fa465d](https://github.com/RoinujNosde/SimpleClans/commit/8fa465da385f36b1fb075031c375ef94df78ea52))
|
||||
* money was not given back when channel creation failed ([#336](https://github.com/RoinujNosde/SimpleClans/issues/336)) ([d8cb61b](https://github.com/RoinujNosde/SimpleClans/commit/d8cb61b0fc9584bb58f421faf98596816621053f))
|
||||
* wrong path of discord economy section ([#334](https://github.com/RoinujNosde/SimpleClans/issues/334)) ([3f1b06d](https://github.com/RoinujNosde/SimpleClans/commit/3f1b06dcf996e51a878b7fc281069e236ebcbfce))
|
||||
|
||||
## [2.18.0](https://github.com/RoinujNosde/SimpleClans/compare/v2.17.0...v2.18.0) (2022-10-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add help-size config ([25197cd](https://github.com/RoinujNosde/SimpleClans/commit/25197cdd729cea63d7e223dc1e0aaef830613327))
|
||||
* added method for registering protection providers ([2ea7444](https://github.com/RoinujNosde/SimpleClans/commit/2ea744443f502970b15859818e9d5e45ca69d453))
|
||||
* adds permission to bypass the teleport delay ([d56a0a9](https://github.com/RoinujNosde/SimpleClans/commit/d56a0a979a47a140115742518e934a2469e6f880))
|
||||
* adds PlayerHomeClearEvent ([becb88b](https://github.com/RoinujNosde/SimpleClans/commit/becb88b763380bed5a2e1dd209c32c8363a7f88b))
|
||||
* adds starter-ranks ([a440834](https://github.com/RoinujNosde/SimpleClans/commit/a4408343479d7efa6ae5a65894f8b822ecd47ebb))
|
||||
* Improves Bungee support ([#327](https://github.com/RoinujNosde/SimpleClans/issues/327)) ([2c9b0f9](https://github.com/RoinujNosde/SimpleClans/commit/2c9b0f98fe3942ea74190c1a81d61be2c8647db8))
|
||||
* **lang:** new crowdin updates ([#319](https://github.com/RoinujNosde/SimpleClans/issues/319)) ([87ece22](https://github.com/RoinujNosde/SimpleClans/commit/87ece22036fb674c8c362b6a1b86fe884543e6ad))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* changes size of some frames for better visualization on Bedrock ([1adec0b](https://github.com/RoinujNosde/SimpleClans/commit/1adec0b89d676767cdb94dcdf91ba37a231eb4a8))
|
||||
* ConfigurationSerializableAdapter NPE ([30a501c](https://github.com/RoinujNosde/SimpleClans/commit/30a501c063aa9dbcf596df83adc2b15baf0e4bb9))
|
||||
* getPastClans() preserves the insertion order ([af07988](https://github.com/RoinujNosde/SimpleClans/commit/af079881030bd299b9bae1ebf0cc62353af7e6fc))
|
||||
* NoClassDefFoundError in WorldGuard6Provider ([a859928](https://github.com/RoinujNosde/SimpleClans/commit/a8599286225ba603ea124b8b52510245b94ffd24))
|
||||
* NPE while collecting fees ([c47289c](https://github.com/RoinujNosde/SimpleClans/commit/c47289c5bf8113a9d6a8e1ee74a5afb0358647b6))
|
||||
* NPE while purging data ([f14c425](https://github.com/RoinujNosde/SimpleClans/commit/f14c42548846feef01b484acbb5f02bcbcabd8db))
|
||||
* NPE while sending a message to spies ([#322](https://github.com/RoinujNosde/SimpleClans/issues/322)) ([e7f756f](https://github.com/RoinujNosde/SimpleClans/commit/e7f756f3063c646e21415e08eea73f123d2818a0))
|
||||
* removes duplicate /clan from help ([f7e7ec6](https://github.com/RoinujNosde/SimpleClans/commit/f7e7ec66243359e26d3c456a9740a53753951c48))
|
||||
* removes rank and join date on disband ([2a1ad5b](https://github.com/RoinujNosde/SimpleClans/commit/2a1ad5b5c8d2937a8ee6dd6f7f43d85c86f08307))
|
||||
* set useSSL to false ([f484bc1](https://github.com/RoinujNosde/SimpleClans/commit/f484bc16c6176ccd13e05aae2169400e7bcf5d62))
|
||||
* supports '.' and '*' as username prefix by default ([37f0ecf](https://github.com/RoinujNosde/SimpleClans/commit/37f0ecff506d06f3047e3598848117a14c2b7ead))
|
||||
* updates join date when joining a clan ([#326](https://github.com/RoinujNosde/SimpleClans/issues/326)) ([96a13d8](https://github.com/RoinujNosde/SimpleClans/commit/96a13d8d6cc18c91d4dee20dd632cd5d65db5213))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* improved UUID lookup performance ([4ab53d1](https://github.com/RoinujNosde/SimpleClans/commit/4ab53d16135ecf5a4067b1a63d058da392dc5313))
|
||||
@@ -60,7 +60,7 @@ Including SimpleClans with Maven:
|
||||
<dependency>
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<version>2.16.2</version> <!-- You can find the latest version at the bottom -->
|
||||
<version>2.17.0</version> <!-- You can find the latest version at the bottom -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -74,10 +74,11 @@ repositories {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
compileOnly "net.sacredlabyrinth.phaed.simpleclans:SimpleClans:2.16.2"
|
||||
compileOnly "net.sacredlabyrinth.phaed.simpleclans:SimpleClans:2.17.0"
|
||||
}
|
||||
```
|
||||
|
||||
Feel free to learn our [Javadoc](https://ci.roinujnosde.me/job/SimpleClans/Javadoc/).
|
||||
##### Latest version:
|
||||
[](https://repo.roinujnosde.me/#/releases/net/sacredlabyrinth/phaed/simpleclans/SimpleClans)
|
||||
##### API Examples
|
||||
|
||||
+1
-1
@@ -14,7 +14,6 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.MilkBowl:VaultAPI:1.7" level="project" />
|
||||
@@ -141,5 +140,6 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: io.github.bananapuncher714:nbteditor:7.16.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: de.eldoria:eldo-util:1.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.9.1" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,3 +1,7 @@
|
||||
pull_request_title: "feat(lang): new crowdin updates"
|
||||
pull_request_labels: ["l10n"]
|
||||
commit_message: "feat(lang): new translations for %language%"
|
||||
append_commit_message: false
|
||||
files:
|
||||
- source: src/main/resources/messages.properties
|
||||
translation: /src/main/resources/%file_name%_%locale_with_underscore%.%file_extension%
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<name>SimpleClans</name>
|
||||
<version>2.16.2</version>
|
||||
<version>2.18.1-SNAPSHOT</version>
|
||||
<url>https://www.spigotmc.org/resources/simpleclans.71242/</url>
|
||||
<build>
|
||||
<resources>
|
||||
@@ -29,7 +29,6 @@
|
||||
<target>1.8</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
@@ -76,6 +75,10 @@
|
||||
<pattern>com.cryptomorin.xseries</pattern>
|
||||
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.xseries</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.google.gson</pattern>
|
||||
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.gson</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<artifactSet>
|
||||
<excludes>
|
||||
@@ -195,10 +198,6 @@
|
||||
<artifactId>guava</artifactId>
|
||||
<groupId>com.google.guava</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>gson</artifactId>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>bungeecord-chat</artifactId>
|
||||
<groupId>net.md-5</groupId>
|
||||
@@ -221,18 +220,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>junit</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
@@ -413,6 +400,10 @@
|
||||
<id>reposilite</id>
|
||||
<url>https://repo.roinujnosde.me/releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>reposilite</id>
|
||||
<url>https://repo.roinujnosde.me/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<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">
|
||||
<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.16.2</version>
|
||||
<version>2.18.2-SNAPSHOT</version>
|
||||
<name>SimpleClans</name>
|
||||
<url>https://www.spigotmc.org/resources/simpleclans.71242/</url>
|
||||
|
||||
@@ -36,7 +35,6 @@
|
||||
<target>1.8</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
@@ -84,6 +82,10 @@
|
||||
<pattern>com.cryptomorin.xseries</pattern>
|
||||
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.xseries</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.google.gson</pattern>
|
||||
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.gson</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<artifactSet>
|
||||
<excludes>
|
||||
@@ -178,12 +180,6 @@
|
||||
<version>1.7</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
@@ -247,6 +243,11 @@
|
||||
<version>4.351</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.9.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- Repositories -->
|
||||
@@ -290,7 +291,7 @@
|
||||
</repositories>
|
||||
|
||||
<properties>
|
||||
<project.build.sourcfeEncoding>UTF-8</project.build.sourcfeEncoding>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<!-- Upstream Distribution -->
|
||||
@@ -300,5 +301,9 @@
|
||||
<id>reposilite</id>
|
||||
<url>https://repo.roinujnosde.me/releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>reposilite</id>
|
||||
<url>https://repo.roinujnosde.me/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
</project>
|
||||
@@ -3,7 +3,6 @@ package net.sacredlabyrinth.phaed.simpleclans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -554,12 +553,7 @@ public class ChatBlock {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = receiver.toPlayer();
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendMessage(ChatUtils.parseColors(msg));
|
||||
SimpleClans.getInstance().getProxyManager().sendMessage(receiver.getName(), ChatUtils.parseColors(msg));
|
||||
}
|
||||
|
||||
// ClanCommands#setbanner, LandCommands#Allow/BlockCommand/verify, StaffCommands#kick, etc
|
||||
|
||||
@@ -7,7 +7,6 @@ import net.sacredlabyrinth.phaed.simpleclans.hooks.papi.Placeholder;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.loggers.BankLog;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.loggers.BankLogger;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.loggers.BankOperator;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -54,7 +53,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
private List<String> allies = new ArrayList<>();
|
||||
private List<String> rivals = new ArrayList<>();
|
||||
private List<String> bb = new ArrayList<>();
|
||||
private final List<String> members = new ArrayList<>();
|
||||
private final List<ClanPlayer> members = new ArrayList<>();
|
||||
private Flags flags = new Flags(null);
|
||||
private boolean feeEnabled;
|
||||
private List<Rank> ranks = new ArrayList<>();
|
||||
@@ -385,17 +384,22 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return confirmation
|
||||
*/
|
||||
public boolean isMember(Player player) {
|
||||
return members.contains(player.getUniqueId().toString());
|
||||
return isMember(player.getUniqueId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the player is a member of this clan
|
||||
*
|
||||
* @param playerUniqueId the Player's UUID
|
||||
* @param uuid the Player's UUID
|
||||
* @return confirmation
|
||||
*/
|
||||
public boolean isMember(UUID playerUniqueId) {
|
||||
return members.contains(playerUniqueId.toString());
|
||||
public boolean isMember(UUID uuid) {
|
||||
for (ClanPlayer cp : members) {
|
||||
if (cp.getUniqueId().equals(uuid)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@@ -522,23 +526,16 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* (used internally)
|
||||
*/
|
||||
public void importMember(ClanPlayer cp) {
|
||||
String uuid;
|
||||
if (cp.getUniqueId() != null) {
|
||||
uuid = cp.getUniqueId().toString();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!members.contains(uuid)) {
|
||||
members.add(uuid);
|
||||
if (!members.contains(cp)) {
|
||||
members.add(cp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (used internally)
|
||||
*/
|
||||
public void removeMember(UUID playerUniqueId) {
|
||||
members.remove(playerUniqueId.toString());
|
||||
public void removeMember(UUID uuid) {
|
||||
members.removeIf(cp -> cp.getUniqueId().equals(uuid));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -734,12 +731,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return the formatted leaders string
|
||||
*/
|
||||
public String getLeadersString(String prefix, String sep) {
|
||||
return members.stream().
|
||||
map(member -> SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member))).
|
||||
filter(Objects::nonNull).
|
||||
filter(ClanPlayer::isLeader).
|
||||
map(clanPlayer -> prefix.concat(clanPlayer.getName())).
|
||||
collect(Collectors.joining(sep));
|
||||
return members.stream().filter(ClanPlayer::isLeader).map(ClanPlayer::getName).
|
||||
collect(Collectors.joining(sep, prefix, ""));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -790,19 +783,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return the members
|
||||
*/
|
||||
public List<ClanPlayer> getMembers() {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
out.add(cp);
|
||||
}
|
||||
|
||||
Collections.sort(out);
|
||||
|
||||
return out;
|
||||
return new ArrayList<>(members);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -812,22 +793,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
*/
|
||||
@Placeholder(value = "onlinemembers_count", resolver = "list_size", config = "filter_vanished")
|
||||
public List<ClanPlayer> getOnlineMembers() {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
if (cp.toPlayer() != null) {
|
||||
out.add(cp);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
return members.stream().filter(cp -> cp.toPlayer() != null).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all leaders in the clan
|
||||
*
|
||||
@@ -835,20 +803,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
*/
|
||||
@Placeholder(value = "leader_size", resolver = "list_size")
|
||||
public List<ClanPlayer> getLeaders() {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cp.isLeader()) {
|
||||
out.add(cp);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
return members.stream().filter(ClanPlayer::isLeader).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -857,22 +812,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
* @return non leaders
|
||||
*/
|
||||
public List<ClanPlayer> getNonLeaders() {
|
||||
List<ClanPlayer> out = new ArrayList<>();
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!cp.isLeader()) {
|
||||
out.add(cp);
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(out);
|
||||
|
||||
return out;
|
||||
return members.stream().filter(cp -> !cp.isLeader()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -911,16 +851,10 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
if (members.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
double totalWeightedKills = 0;
|
||||
int totalDeaths = 0;
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (ClanPlayer cp : members) {
|
||||
totalWeightedKills += cp.getWeightedKills();
|
||||
totalDeaths += cp.getDeaths();
|
||||
}
|
||||
@@ -943,12 +877,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
return totalDeaths;
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (ClanPlayer cp : members) {
|
||||
totalDeaths += cp.getDeaths();
|
||||
}
|
||||
|
||||
@@ -966,12 +895,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
return total;
|
||||
}
|
||||
|
||||
for (String member : members) {
|
||||
ClanPlayer cp = SimpleClans.getInstance().getClanManager().getClanPlayer(UUID.fromString(member));
|
||||
if (cp == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (ClanPlayer cp : members) {
|
||||
total += cp.getWeightedKills();
|
||||
}
|
||||
|
||||
@@ -1056,6 +980,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
cp.removePastClan(getColorTag());
|
||||
cp.setClan(this);
|
||||
cp.setLeader(false);
|
||||
cp.setJoinDate(new Date().getTime());
|
||||
cp.setTrusted(SimpleClans.getInstance().getSettingsManager().is(CLAN_TRUST_MEMBERS_BY_DEFAULT));
|
||||
if (defaultRank != null) {
|
||||
cp.setRank(defaultRank);
|
||||
@@ -1176,7 +1101,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an ally form the clan, and the clan from the ally
|
||||
* Remove an ally from the clan, and the clan from the ally
|
||||
*/
|
||||
public void removeAlly(Clan ally) {
|
||||
removeAlly(ally.getTag());
|
||||
@@ -1227,7 +1152,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
*/
|
||||
@Placeholder("is_anyonline")
|
||||
public boolean isAnyOnline() {
|
||||
return members.stream().map(UUID::fromString).map(Bukkit::getPlayer).anyMatch(Objects::nonNull);
|
||||
return members.stream().anyMatch(cp -> cp.toPlayer() != null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1327,18 +1252,14 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
String message = SimpleClans.getInstance().getSettingsManager().getColored(CLANCHAT_ANNOUNCEMENT_COLOR) + msg;
|
||||
|
||||
for (ClanPlayer cp : getMembers()) {
|
||||
Player pl = cp.toPlayer();
|
||||
|
||||
if (pl != null) {
|
||||
ChatBlock.sendMessage(pl, message);
|
||||
}
|
||||
ChatBlock.sendMessage(cp, message);
|
||||
}
|
||||
|
||||
SimpleClans.getInstance().getServer().getConsoleSender().sendMessage(AQUA + "[" + lang("clan.announce") + AQUA + "] " + AQUA + "[" + Helper.getColorName(playerName) + WHITE + "] " + message);
|
||||
Bukkit.getConsoleSender().sendMessage(AQUA + "[" + lang("clan.announce") + AQUA + "] " + AQUA + "[" + Helper.getColorName(playerName) + WHITE + "] " + message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Announce message to a all the leaders of a clan
|
||||
* Announce message to all the leaders of a clan
|
||||
*/
|
||||
public void leaderAnnounce(String msg) {
|
||||
String message = SimpleClans.getInstance().getSettingsManager().getColored(CLANCHAT_ANNOUNCEMENT_COLOR) + msg;
|
||||
@@ -1346,13 +1267,9 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
List<ClanPlayer> leaders = getLeaders();
|
||||
|
||||
for (ClanPlayer cp : leaders) {
|
||||
Player pl = cp.toPlayer();
|
||||
|
||||
if (pl != null) {
|
||||
ChatBlock.sendMessage(pl, message);
|
||||
}
|
||||
ChatBlock.sendMessage(cp, message);
|
||||
}
|
||||
SimpleClans.getInstance().getServer().getConsoleSender().sendMessage(AQUA + "[" + lang("leader.announce") + AQUA + "] " + WHITE + message);
|
||||
Bukkit.getConsoleSender().sendMessage(AQUA + "[" + lang("leader.announce") + AQUA + "] " + WHITE + message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1470,7 +1387,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
for (ClanPlayer cp : clanPlayers) {
|
||||
if (cp.getTag().equals(getTag())) {
|
||||
cp.setClan(null);
|
||||
|
||||
cp.setJoinDate(0);
|
||||
cp.setRank(null);
|
||||
if (isVerified()) {
|
||||
cp.addPastClan(getColorTag() + (cp.isLeader() ? DARK_RED + "*" : ""));
|
||||
}
|
||||
@@ -1618,6 +1536,8 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
flags.put("homeYaw", home != null ? home.getYaw() : 0);
|
||||
String world = home != null && home.getWorld() != null ? home.getWorld().getName() : "";
|
||||
flags.put("homeWorld", world);
|
||||
String name = SimpleClans.getInstance().getProxyManager().getServerName();
|
||||
flags.put("homeServer", name);
|
||||
|
||||
SimpleClans.getInstance().getStorageManager().updateClan(this);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer> {
|
||||
private int deaths;
|
||||
private long lastSeen;
|
||||
private long joinDate;
|
||||
private Set<String> pastClans = new HashSet<>();
|
||||
private final Set<String> pastClans = new LinkedHashSet<>();
|
||||
private final Map<String, Long> resignTimes = new HashMap<>();
|
||||
private @Nullable VoteResult vote;
|
||||
private Flags flags = new Flags(null);
|
||||
@@ -509,8 +509,7 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer> {
|
||||
}
|
||||
|
||||
public String getLastSeenString(@Nullable CommandSender sender) {
|
||||
Player player = toPlayer();
|
||||
if (player != null && player.isOnline() && !VanishUtils.isVanished(sender, player)) {
|
||||
if (!VanishUtils.isVanished(sender, this)) {
|
||||
return lang("online", sender);
|
||||
}
|
||||
return new java.text.SimpleDateFormat("MMM dd, ''yy h:mm a").format(new Date(lastSeen));
|
||||
@@ -537,10 +536,11 @@ public class ClanPlayer implements Serializable, Comparable<ClanPlayer> {
|
||||
/**
|
||||
* (used internally)
|
||||
*
|
||||
* @param PackedPastClans the PackedPastClans to set
|
||||
* @param packedPastClans the packedPastClans to set
|
||||
*/
|
||||
public void setPackedPastClans(String PackedPastClans) {
|
||||
pastClans = Helper.fromArrayToSet(PackedPastClans.split("[|]"));
|
||||
public void setPackedPastClans(String packedPastClans) {
|
||||
String[] clans = packedPastClans.split("\\|");
|
||||
Collections.addAll(pastClans, clans);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JSONValue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Flags {
|
||||
|
||||
private final JSONObject flags;
|
||||
private static final Gson gson = new Gson();
|
||||
private final JsonObject flags;
|
||||
|
||||
public Flags(@Nullable String json) {
|
||||
JSONObject flags = null;
|
||||
if (json != null && !json.isEmpty()) {
|
||||
flags = (JSONObject) JSONValue.parse(json);
|
||||
flags = gson.fromJson(json, JsonObject.class);
|
||||
} else {
|
||||
flags = new JsonObject();
|
||||
}
|
||||
if (flags == null) {
|
||||
flags = new JSONObject();
|
||||
}
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<String> getStringList(@NotNull String key) {
|
||||
Object object = flags.get(key);
|
||||
JsonElement object = flags.get(key);
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
if (object instanceof JSONArray) {
|
||||
for (Object o : ((JSONArray) object)) {
|
||||
list.add(String.valueOf(o));
|
||||
if (object != null && object.isJsonArray()) {
|
||||
for (JsonElement element : object.getAsJsonArray()) {
|
||||
list.add(element.getAsString());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
@@ -38,11 +36,11 @@ public class Flags {
|
||||
|
||||
@Nullable
|
||||
public String getString(@NotNull String key) {
|
||||
Object object = flags.get(key);
|
||||
if (object == null) {
|
||||
JsonElement element = flags.get(key);
|
||||
if (element == null || element.isJsonNull()) {
|
||||
return null;
|
||||
}
|
||||
return String.valueOf(object);
|
||||
return element.getAsString();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -56,11 +54,11 @@ public class Flags {
|
||||
|
||||
@NotNull
|
||||
public Number getNumber(@NotNull String key) {
|
||||
Object object = flags.get(key);
|
||||
if (object instanceof Number) {
|
||||
return (Number) object;
|
||||
JsonElement element = flags.get(key);
|
||||
if (element == null || element.isJsonNull()) {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
return element.getAsNumber();
|
||||
}
|
||||
|
||||
public boolean getBoolean(@NotNull String key) {
|
||||
@@ -68,26 +66,22 @@ public class Flags {
|
||||
}
|
||||
|
||||
public boolean getBoolean(@NotNull String key, boolean def) {
|
||||
Object object = flags.get(key);
|
||||
if (object instanceof Boolean) {
|
||||
return (Boolean) object;
|
||||
JsonElement element = flags.get(key);
|
||||
if (element == null || element.isJsonNull()) {
|
||||
return def;
|
||||
}
|
||||
return def;
|
||||
return element.getAsBoolean();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void put(@NotNull String key, @NotNull List<?> value) {
|
||||
JSONArray array = new JSONArray();
|
||||
array.addAll(value);
|
||||
flags.put(key, array);
|
||||
flags.add(key, gson.toJsonTree(value));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void put(@NotNull String key, @NotNull Object object) {
|
||||
flags.put(key, object);
|
||||
flags.add(key, gson.toJsonTree(object));
|
||||
}
|
||||
|
||||
public String toJSONString() {
|
||||
return flags.toJSONString();
|
||||
return flags.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -7,12 +11,9 @@ import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
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.Type;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.file.FileSystem;
|
||||
@@ -35,8 +36,11 @@ import static net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils.stripColors;
|
||||
* @author phaed
|
||||
*/
|
||||
|
||||
public class Helper {
|
||||
public final class Helper {
|
||||
|
||||
private static final Gson GSON = new Gson();
|
||||
private static final Type RANKS_TYPE = TypeToken.getParameterized(List.class, Rank.class).getType();
|
||||
private static final Type RESIGN_TYPE = TypeToken.getParameterized(Map.class, String.class, Long.class).getType();
|
||||
private Helper() {
|
||||
}
|
||||
|
||||
@@ -55,17 +59,6 @@ public class Helper {
|
||||
return locale != null ? locale.toLanguageTag() : null;
|
||||
}
|
||||
|
||||
public static @Nullable JSONObject parseJson(String json) {
|
||||
if (json != null && !json.isEmpty()) {
|
||||
try {
|
||||
return (JSONObject) new JSONParser().parse(json);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Set<Path> getPathsIn(String path, Predicate<? super Path> filter) {
|
||||
Set<Path> files = new LinkedHashSet<>();
|
||||
String packagePath = path.replace(".", "/");
|
||||
@@ -123,47 +116,32 @@ public class Helper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a list of ranks from the specified JSONObject
|
||||
* Parses a list of ranks from the specified Json String
|
||||
*
|
||||
* @param jo the JSON Object
|
||||
* @param json the Json String
|
||||
* @return a list of ranks or null if the JSON String is null/empty
|
||||
*/
|
||||
public static @Nullable List<Rank> ranksFromJson(@Nullable JSONObject jo) {
|
||||
if (jo != null && !jo.isEmpty()) {
|
||||
Object ranks = jo.get("ranks");
|
||||
if (ranks != null) {
|
||||
JSONArray array = (JSONArray) ranks;
|
||||
List<Rank> rankList = new ArrayList<>();
|
||||
for (Object o : array) {
|
||||
JSONObject r = (JSONObject) o;
|
||||
String name = (String) r.get("name");
|
||||
String displayName = (String) r.get("displayName");
|
||||
Set<String> permissions = new HashSet<>();
|
||||
for (Object p : (JSONArray) r.get("permissions")) {
|
||||
permissions.add((String) p);
|
||||
}
|
||||
Rank rank = new Rank(name, displayName, permissions);
|
||||
rankList.add(rank);
|
||||
}
|
||||
|
||||
return rankList;
|
||||
}
|
||||
public static @Nullable List<Rank> ranksFromJson(@Nullable String json) {
|
||||
if (json != null && !json.isEmpty()) {
|
||||
JsonObject object = GSON.fromJson(json, JsonObject.class);
|
||||
JsonElement ranks = object.get("ranks");
|
||||
return GSON.fromJson(ranks, RANKS_TYPE);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the default rank from the specified JSONObject
|
||||
* Parses the default rank from the specified Json String
|
||||
*
|
||||
* @param jo the JSON object
|
||||
* @param json the Json String
|
||||
* @return the default rank or null if not found and/or it does not exist
|
||||
*/
|
||||
public static @Nullable String defaultRankFromJson(@Nullable JSONObject jo) {
|
||||
if (jo != null && !jo.isEmpty()) {
|
||||
if (!jo.containsKey("defaultRank")) {
|
||||
return null;
|
||||
} else {
|
||||
return (String) jo.get("defaultRank");
|
||||
public static @Nullable String defaultRankFromJson(@Nullable String json) {
|
||||
if (json != null && !json.isEmpty()) {
|
||||
JsonObject object = GSON.fromJson(json, JsonObject.class);
|
||||
JsonElement defaultRank = object.get("defaultRank");
|
||||
if (defaultRank != null && !defaultRank.isJsonNull()) {
|
||||
return defaultRank.getAsString();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -176,36 +154,24 @@ public class Helper {
|
||||
* @param defaultRank the default rank
|
||||
* @return a JSON String
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static String ranksToJson(List<Rank> ranks, @Nullable String defaultRank) {
|
||||
if (ranks == null)
|
||||
ranks = new ArrayList<>();
|
||||
|
||||
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();
|
||||
permArray.addAll(rank.getPermissions());
|
||||
o.put("permissions", permArray);
|
||||
array.add(o);
|
||||
}
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("ranks", array);
|
||||
object.put("defaultRank", defaultRank);
|
||||
return object.toJSONString();
|
||||
JsonObject object = new JsonObject();
|
||||
object.add("ranks", GSON.toJsonTree(ranks));
|
||||
object.addProperty("defaultRank", defaultRank);
|
||||
return object.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a resign times map to a JSON String
|
||||
*
|
||||
* @param resignTimes
|
||||
* @param resignTimes the resign times
|
||||
* @return a JSON String
|
||||
*/
|
||||
public static String resignTimesToJson(Map<String, Long> resignTimes) {
|
||||
return JSONObject.toJSONString(resignTimes);
|
||||
return GSON.toJson(resignTimes);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,14 +180,9 @@ public class Helper {
|
||||
* @param json JSON String
|
||||
* @return a map
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static @Nullable Map<String, Long> resignTimesFromJson(String json) {
|
||||
if (json != null) {
|
||||
try {
|
||||
return (Map<String, Long>) new JSONParser().parse(json);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (json != null && !json.isEmpty()) {
|
||||
return GSON.fromJson(json, RESIGN_TYPE);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -283,6 +244,7 @@ public class Helper {
|
||||
* @param values
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public static Set<String> fromArrayToSet(String... values) {
|
||||
HashSet<String> results = new HashSet<>();
|
||||
Collections.addAll(results, values);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -15,11 +17,11 @@ public class Rank implements Comparable<Rank> {
|
||||
|
||||
public Rank(String name) {
|
||||
setName(name);
|
||||
permissions = new HashSet<String>();
|
||||
permissions = new HashSet<>();
|
||||
setDisplayName(displayName);
|
||||
}
|
||||
|
||||
public Rank(String name, String displayName, Set<String> permissions) {
|
||||
public Rank(String name, @Nullable String displayName, Set<String> permissions) {
|
||||
setName(name);
|
||||
setDisplayName(displayName);
|
||||
setPermissions(permissions);
|
||||
@@ -32,7 +34,7 @@ public class Rank implements Comparable<Rank> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
public void setDisplayName(@Nullable String displayName) {
|
||||
if (displayName == null || displayName.isEmpty()) {
|
||||
displayName = name;
|
||||
}
|
||||
@@ -41,7 +43,7 @@ public class Rank implements Comparable<Rank> {
|
||||
|
||||
public void setPermissions(Set<String> permissions) {
|
||||
if (permissions == null) {
|
||||
permissions = new HashSet<String>();
|
||||
permissions = new HashSet<>();
|
||||
}
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import net.sacredlabyrinth.phaed.simpleclans.listeners.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.loggers.BankLogger;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.loggers.CSVBankLogger;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.ProxyManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.tasks.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ui.InventoryController;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatFormatMigration;
|
||||
@@ -55,6 +57,7 @@ public class SimpleClans extends JavaPlugin {
|
||||
private TeleportManager teleportManager;
|
||||
private ProtectionManager protectionManager;
|
||||
private ChatManager chatManager;
|
||||
private ProxyManager proxyManager;
|
||||
private boolean hasUUID;
|
||||
private static final Pattern ACF_PLACEHOLDER_PATTERN = Pattern.compile("\\{(?<key>[a-zA-Z]+?)}");
|
||||
|
||||
@@ -101,6 +104,7 @@ public class SimpleClans extends JavaPlugin {
|
||||
permissionsManager = new PermissionsManager();
|
||||
requestManager = new RequestManager();
|
||||
clanManager = new ClanManager();
|
||||
proxyManager = new BungeeManager(this);
|
||||
storageManager = new StorageManager();
|
||||
teleportManager = new TeleportManager();
|
||||
protectionManager = new ProtectionManager();
|
||||
@@ -248,6 +252,10 @@ public class SimpleClans extends JavaPlugin {
|
||||
return chatManager;
|
||||
}
|
||||
|
||||
public ProxyManager getProxyManager() {
|
||||
return proxyManager;
|
||||
}
|
||||
|
||||
public BankLogger getBankLogger() {
|
||||
return bankLogger;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,15 @@ package net.sacredlabyrinth.phaed.simpleclans.chat;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ChatManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
|
||||
public interface ChatHandler {
|
||||
|
||||
SimpleClans plugin = SimpleClans.getInstance();
|
||||
SettingsManager settingsManager = plugin.getSettingsManager();
|
||||
ChatManager chatManager = plugin.getChatManager();
|
||||
PermissionsManager permissionsManager = plugin.getPermissionsManager();
|
||||
|
||||
void sendMessage(SCMessage message);
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ public class SCMessage implements Cloneable {
|
||||
* @param content The content of message
|
||||
* @param receivers The clan players, who will receive the content
|
||||
*/
|
||||
public SCMessage(@NotNull Source source, @NotNull ClanPlayer.Channel channel, @NotNull ClanPlayer sender, String content, @NotNull List<ClanPlayer> receivers) {
|
||||
public SCMessage(@NotNull Source source, @NotNull ClanPlayer.Channel channel,
|
||||
@NotNull ClanPlayer sender, String content, @NotNull List<ClanPlayer> receivers) {
|
||||
this.source = source;
|
||||
this.channel = channel;
|
||||
this.sender = sender;
|
||||
@@ -84,6 +85,6 @@ public class SCMessage implements Cloneable {
|
||||
* @see ChatHandler initiate the handler
|
||||
*/
|
||||
public enum Source {
|
||||
SPIGOT, DISCORD, BUNGEE
|
||||
SPIGOT, DISCORD, PROXY
|
||||
}
|
||||
}
|
||||
+2
-5
@@ -15,9 +15,7 @@ import java.util.Optional;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.ClanPlayer.Channel.CLAN;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.SPIGOT;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.DISCORDCHAT_ENABLE;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.DISCORDCHAT_FORMAT_TO;
|
||||
import static org.bukkit.Bukkit.getPluginManager;
|
||||
|
||||
/**
|
||||
* Handles delivering messages from {@link Source#SPIGOT} to {@link Source#DISCORD}.
|
||||
@@ -37,7 +35,7 @@ public class DiscordChatHandler implements ChatHandler {
|
||||
if (clan == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
DiscordHook discordHook = Objects.requireNonNull(chatManager.getDiscordHook(), "DiscordHook cannot be null");
|
||||
Optional<TextChannel> channel = discordHook.getCachedChannel(clan.getTag());
|
||||
channel.ifPresent(textChannel -> DiscordUtil.sendMessage(textChannel, formattedMessage));
|
||||
@@ -45,7 +43,6 @@ public class DiscordChatHandler implements ChatHandler {
|
||||
|
||||
@Override
|
||||
public boolean canHandle(SCMessage.Source source) {
|
||||
return source == SPIGOT && settingsManager.is(DISCORDCHAT_ENABLE) &&
|
||||
getPluginManager().getPlugin("DiscordSRV") != null;
|
||||
return source == SPIGOT && chatManager.isDiscordHookEnabled();
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.chat.handlers;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.ChatHandler;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.PERFORMANCE_USE_BUNGEECORD;
|
||||
|
||||
public class ProxyChatHandler implements ChatHandler {
|
||||
|
||||
@Override
|
||||
public void sendMessage(SCMessage message) {
|
||||
plugin.getProxyManager().sendMessage(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandle(Source source) {
|
||||
return source == Source.SPIGOT && settingsManager.is(PERFORMANCE_USE_BUNGEECORD);
|
||||
}
|
||||
}
|
||||
+25
-7
@@ -8,12 +8,12 @@ import net.sacredlabyrinth.phaed.simpleclans.events.ChatEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.DISCORD;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.SPIGOT;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.*;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.DISCORDCHAT_ENABLE;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.PERFORMANCE_USE_BUNGEECORD;
|
||||
import static org.bukkit.Bukkit.getPluginManager;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class SpigotChatHandler implements ChatHandler {
|
||||
|
||||
@Override
|
||||
@@ -31,10 +31,10 @@ public class SpigotChatHandler implements ChatHandler {
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
message.setContent(event.getMessage());
|
||||
message.setContent(stripColorsAndFormatsPerPermission(message.getSender(),event.getMessage()));
|
||||
|
||||
ConfigField configField = ConfigField.valueOf(String.format("%sCHAT_FORMAT",
|
||||
message.getSource() == SPIGOT ? message.getChannel() : message.getSource()));
|
||||
message.getSource() == DISCORD ? "DISCORD" : message.getChannel()));
|
||||
|
||||
String format = settingsManager.getString(configField);
|
||||
String formattedMessage = chatManager.parseChatFormat(format, message, event.getPlaceholders());
|
||||
@@ -48,9 +48,27 @@ public class SpigotChatHandler implements ChatHandler {
|
||||
}.runTask(plugin);
|
||||
}
|
||||
|
||||
private String stripColorsAndFormatsPerPermission(ClanPlayer sender, String message) {
|
||||
if (!permissionsManager.has(sender.toPlayer(), "simpleclans.member.chat.color")) {
|
||||
message = stripColors(message);
|
||||
}
|
||||
if (!permissionsManager.has(sender.toPlayer(), "simpleclans.member.chat.format")) {
|
||||
message = stripFormats(message);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
private String stripColors(String message) {
|
||||
return message.replaceAll("[§&][0-9a-fA-FxX]", "");
|
||||
}
|
||||
|
||||
private String stripFormats(String message) {
|
||||
return message.replaceAll("[§&][k-orK-OR]", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandle(SCMessage.Source source) {
|
||||
return source == SPIGOT || (source == DISCORD && settingsManager.is(DISCORDCHAT_ENABLE) &&
|
||||
getPluginManager().getPlugin("DiscordSRV") != null);
|
||||
return source == SPIGOT || (source == PROXY && settingsManager.is(PERFORMANCE_USE_BUNGEECORD))
|
||||
|| (source == DISCORD && chatManager.isDiscordHookEnabled());
|
||||
}
|
||||
}
|
||||
+21
-21
@@ -5,50 +5,50 @@ import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.ChatHandler;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.DISCORD;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.SPIGOT;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.*;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.DISCORDCHAT_ENABLE;
|
||||
import static org.bukkit.Bukkit.getPluginManager;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.PERFORMANCE_USE_BUNGEECORD;
|
||||
|
||||
/**
|
||||
* Handles delivering messages from {@link Source#SPIGOT} and {@link Source#DISCORD} to internal spy chat.
|
||||
* Handles delivering messages from {@link Source#SPIGOT} or {@link Source#DISCORD} to internal spy chat.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class SpyChatHandler implements ChatHandler {
|
||||
|
||||
@Override
|
||||
public void sendMessage(SCMessage message) {
|
||||
ConfigField configField = ConfigField.valueOf(String.format("%sCHAT_SPYFORMAT",
|
||||
message.getSource() == SPIGOT ? message.getChannel() : message.getSource()));
|
||||
String format = settingsManager.getString(configField);
|
||||
ConfigField formatField = ConfigField.valueOf(String.format("%sCHAT_SPYFORMAT",
|
||||
message.getSource() == DISCORD ? "DISCORD" : message.getChannel()));
|
||||
String format = settingsManager.getString(formatField);
|
||||
message.setContent(ChatUtils.stripColors(message.getContent()));
|
||||
|
||||
String formattedMessage = chatManager.parseChatFormat(format, message);
|
||||
|
||||
List<ClanPlayer> onlinePlayers = getOnlineClanPlayers().stream()
|
||||
.filter(player -> plugin.getPermissionsManager().has(player.toPlayer(), "simpleclans.admin.all-seeing-eye"))
|
||||
.filter(player -> !player.isMuted())
|
||||
.collect(Collectors.toList());
|
||||
List<ClanPlayer> onlineSpies = getOnlineSpies();
|
||||
|
||||
onlinePlayers.removeAll(message.getReceivers());
|
||||
onlinePlayers.forEach(receiver -> ChatBlock.sendMessage(receiver, formattedMessage));
|
||||
// Don't send a duplicate message if a spy is inside the clan
|
||||
onlineSpies.removeAll(message.getReceivers());
|
||||
onlineSpies.forEach(receiver -> ChatBlock.sendMessage(receiver, formattedMessage));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandle(SCMessage.Source source) {
|
||||
return source == SPIGOT || (source == DISCORD && settingsManager.is(DISCORDCHAT_ENABLE) &&
|
||||
getPluginManager().getPlugin("DiscordSRV") != null);
|
||||
return source == SPIGOT || (source == PROXY && settingsManager.is(PERFORMANCE_USE_BUNGEECORD))
|
||||
|| (source == DISCORD && chatManager.isDiscordHookEnabled());
|
||||
}
|
||||
|
||||
private List<ClanPlayer> getOnlineClanPlayers() {
|
||||
return plugin.getClanManager().getAllClanPlayers().stream().
|
||||
filter(cp -> cp.toPlayer() != null).
|
||||
private List<ClanPlayer> getOnlineSpies() {
|
||||
return Bukkit.getOnlinePlayers().stream().
|
||||
filter(Objects::nonNull).
|
||||
filter(player -> permissionsManager.has(player, "simpleclans.admin.all-seeing-eye")).
|
||||
map(player -> plugin.getClanManager().getCreateClanPlayer(player.getUniqueId())).
|
||||
filter(Objects::nonNull).
|
||||
filter(clanPlayer -> !clanPlayer.isMuted()).
|
||||
collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ public class SCCommandManager extends PaperCommandManager {
|
||||
registerCommands();
|
||||
registerConditions();
|
||||
registerCompletions();
|
||||
defaultHelpPerPage = plugin.getSettingsManager().getInt(HELP_SIZE);
|
||||
}
|
||||
|
||||
private void registerDependencies() {
|
||||
|
||||
+11
-13
@@ -4,12 +4,14 @@ import co.aikar.commands.BaseCommand;
|
||||
import co.aikar.commands.annotation.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.HomeRegroupEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.PlayerHomeClearEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.PlayerHomeSetEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ProtectionManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.VanishUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -59,17 +61,12 @@ public class HomeCommands extends BaseCommand {
|
||||
@CommandPermission("simpleclans.leader.regroup.home")
|
||||
@Conditions("rank:name=REGROUP_HOME")
|
||||
@Description("{@@command.description.regroup.home}")
|
||||
public void regroupHome(Player player, ClanPlayer cp, Clan clan) {
|
||||
public void regroupHome(Player player, ClanPlayer cp, @Conditions("can_teleport") Clan clan) {
|
||||
if (!settings.is(ALLOW_REGROUP)) {
|
||||
ChatBlock.sendMessage(player, RED + lang("insufficient.permissions", player));
|
||||
return;
|
||||
}
|
||||
Location location = clan.getHomeLocation();
|
||||
if (location == null) {
|
||||
ChatBlock.sendMessage(player, RED + lang("hombase.not.set", player));
|
||||
return;
|
||||
}
|
||||
|
||||
processRegroup(player, cp, clan, location);
|
||||
}
|
||||
|
||||
@@ -77,14 +74,9 @@ public class HomeCommands extends BaseCommand {
|
||||
@CommandPermission("simpleclans.member.home")
|
||||
@Conditions("rank:name=HOME_TP")
|
||||
@Description("{@@command.description.home.tp}")
|
||||
public void teleport(Player player, Clan clan, ClanPlayer cp) {
|
||||
public void teleport(Player player, @Conditions("can_teleport") Clan clan, ClanPlayer cp) {
|
||||
Location homeLocation = clan.getHomeLocation();
|
||||
|
||||
if (homeLocation == null) {
|
||||
ChatBlock.sendMessage(player, RED + lang("hombase.not.set", player));
|
||||
return;
|
||||
}
|
||||
|
||||
if (cm.purchaseHomeTeleport(player)) {
|
||||
plugin.getTeleportManager().addPlayer(player, homeLocation, clan.getName());
|
||||
}
|
||||
@@ -94,13 +86,19 @@ public class HomeCommands extends BaseCommand {
|
||||
@CommandPermission("simpleclans.leader.home-set")
|
||||
@Conditions("rank:name=HOME_SET")
|
||||
@Description("{@@command.description.home.clear}")
|
||||
public void clear(Player player, Clan clan) {
|
||||
public void clear(Player player, ClanPlayer cp, Clan clan) {
|
||||
if (settings.is(CLAN_HOMEBASE_CAN_BE_SET_ONLY_ONCE) && clan.getHomeLocation() != null &&
|
||||
!permissions.has(player, "simpleclans.mod.home")) {
|
||||
ChatBlock.sendMessage(player, RED + lang("home.base.only.once", player));
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerHomeClearEvent event = new PlayerHomeClearEvent(clan, cp);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
clan.setHomeLocation(null);
|
||||
ChatBlock.sendMessage(player, AQUA + lang("hombase.cleared", player));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.Con
|
||||
|
||||
@CommandAlias("%clan")
|
||||
@Subcommand("%land")
|
||||
@Conditions("%basic_conditions|land_sharing|own_land")
|
||||
@Conditions("%basic_conditions|clan_member|land_sharing|own_land")
|
||||
@CommandPermission("simpleclans.member.land")
|
||||
public class LandCommand extends BaseCommand {
|
||||
|
||||
|
||||
+5
-1
@@ -198,8 +198,8 @@ public class LeaderCommands extends BaseCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
double amount = settings.getDouble(ECONOMY_DISCORD_CREATION_PRICE);
|
||||
if (settings.is(ECONOMY_PURCHASE_DISCORD_CREATE)) {
|
||||
double amount = settings.getDouble(ECONOMY_DISCORD_CREATION_PRICE);
|
||||
if (!permissions.playerHasMoney(player, amount)) {
|
||||
player.sendMessage(AQUA + lang("not.sufficient.money", player, amount));
|
||||
return;
|
||||
@@ -214,6 +214,10 @@ public class LeaderCommands extends BaseCommand {
|
||||
discordHook.createChannel(clan.getTag());
|
||||
ChatBlock.sendMessageKey(player, "discord.created.successfully");
|
||||
} catch (DiscordHookException ex) {
|
||||
// Return player's money if clan creation went wrong
|
||||
if (settings.is(ECONOMY_PURCHASE_DISCORD_CREATE)) {
|
||||
permissions.playerGrantMoney(player, amount);
|
||||
}
|
||||
String messageKey = ex.getMessageKey();
|
||||
if (messageKey != null) {
|
||||
ChatBlock.sendMessage(player, RED + lang(messageKey));
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands.conditions;
|
||||
|
||||
import co.aikar.commands.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Flags;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
|
||||
public class TeleportCondition extends AbstractParameterCondition<Clan> {
|
||||
|
||||
public TeleportCondition(@NotNull SimpleClans plugin) {
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Clan> getType() {
|
||||
return Clan.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateCondition(ConditionContext<BukkitCommandIssuer> context,
|
||||
BukkitCommandExecutionContext execContext,
|
||||
Clan value) throws InvalidCommandArgument {
|
||||
Player player = execContext.getPlayer();
|
||||
if (value.getHomeLocation() == null) {
|
||||
throw new ConditionFailedException(lang("hombase.not.set", player));
|
||||
}
|
||||
Flags flags = new Flags(value.getFlags());
|
||||
String homeServer = flags.getString("homeServer", "");
|
||||
if (!homeServer.isEmpty() && !plugin.getProxyManager().getServerName().equals(homeServer)) {
|
||||
throw new ConditionFailedException(lang("home.set.in.different.server"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getId() {
|
||||
return "can_teleport";
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.commands.conditions;
|
||||
|
||||
import co.aikar.commands.BukkitCommandExecutionContext;
|
||||
import co.aikar.commands.BukkitCommandIssuer;
|
||||
import co.aikar.commands.ConditionContext;
|
||||
import co.aikar.commands.InvalidCommandArgument;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.commands.ClanInput;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class TeleportInputCondition extends AbstractParameterCondition<ClanInput> {
|
||||
|
||||
public TeleportInputCondition(@NotNull SimpleClans plugin) {
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<ClanInput> getType() {
|
||||
return ClanInput.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateCondition(ConditionContext<BukkitCommandIssuer> context, BukkitCommandExecutionContext execContext, ClanInput value) throws InvalidCommandArgument {
|
||||
new TeleportCondition(plugin).validateCondition(context, execContext, value.getClan());
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getId() {
|
||||
return "can_teleport";
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.VanishUtils;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
@@ -35,10 +34,8 @@ public class ClanRoster extends Sendable {
|
||||
List<ClanPlayer> members = clan.getNonLeaders();
|
||||
plugin.getClanManager().sortClanPlayersByLastSeen(members);
|
||||
for (ClanPlayer cp : members) {
|
||||
Player p = cp.toPlayer();
|
||||
|
||||
String name = (cp.isTrusted() ? sm.getColored(PAGE_TRUSTED_COLOR) : sm.getColored(PAGE_UNTRUSTED_COLOR)) + cp.getName();
|
||||
String lastSeen = p != null && p.isOnline() && !VanishUtils.isVanished(sender, p) ? GREEN + lang("online", sender) : WHITE + cp.getLastSeenDaysString(sender);
|
||||
String lastSeen = VanishUtils.isVanished(sender, cp) ? WHITE + cp.getLastSeenDaysString(sender) : GREEN + lang("online", sender);
|
||||
|
||||
chatBlock.addRow(" " + name, YELLOW + ChatUtils.parseColors(cp.getRankDisplayName()) + RESET, lastSeen);
|
||||
}
|
||||
@@ -48,11 +45,9 @@ public class ClanRoster extends Sendable {
|
||||
List<ClanPlayer> leaders = clan.getLeaders();
|
||||
plugin.getClanManager().sortClanPlayersByLastSeen(leaders);
|
||||
for (ClanPlayer cp : leaders) {
|
||||
Player p = cp.toPlayer();
|
||||
|
||||
String name = sm.getColored(PAGE_LEADER_COLOR) + cp.getName();
|
||||
String lastSeen = p != null && p.isOnline() && !VanishUtils.isVanished(sender, p) ? GREEN + lang("online", sender)
|
||||
: WHITE + cp.getLastSeenDaysString(sender);
|
||||
String lastSeen = VanishUtils.isVanished(sender, cp) ? WHITE + cp.getLastSeenDaysString(sender) :
|
||||
GREEN + lang("online", sender);
|
||||
|
||||
chatBlock.addRow(" " + name, YELLOW + ChatUtils.parseColors(cp.getRankDisplayName()) + RESET, lastSeen);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.sacredlabyrinth.phaed.simpleclans.Helper;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.KDRFormat;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.RankingNumberResolver;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.VanishUtils;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -37,7 +38,7 @@ public class Leaderboard extends Sendable {
|
||||
|
||||
private void addLines() {
|
||||
for (ClanPlayer cp : clanPlayers) {
|
||||
boolean online = cp.toPlayer() != null;
|
||||
boolean online = !VanishUtils.isVanished(cp);
|
||||
|
||||
String name = (cp.isLeader() ? sm.getColored(PAGE_LEADER_COLOR) : (cp.isTrusted() ? sm.getColored(PAGE_TRUSTED_COLOR) :
|
||||
sm.getColored(PAGE_UNTRUSTED_COLOR))) + cp.getName();
|
||||
|
||||
-1
@@ -52,7 +52,6 @@ public class GeneralCommands extends BaseCommand {
|
||||
|
||||
@Default
|
||||
@Description("{@@command.description.clan}")
|
||||
@CommandAlias("%clan")
|
||||
@HelpSearchTags("menu gui interface ui")
|
||||
public void main(CommandSender sender) {
|
||||
if (sender instanceof Player && settings.is(ENABLE_GUI)) {
|
||||
|
||||
+12
-11
@@ -5,6 +5,7 @@ import co.aikar.commands.annotation.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.commands.ClanInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.commands.ClanPlayerInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.PlayerHomeSetEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.events.TagChangeEvent;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.language.LanguageResource;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
@@ -127,11 +128,18 @@ public class StaffCommands extends BaseCommand {
|
||||
@CommandPermission("simpleclans.mod.home")
|
||||
@CommandCompletion("@clans")
|
||||
@Description("{@@command.description.mod.home.set}")
|
||||
public void homeSet(Player player, @Name("clan") ClanInput clan) {
|
||||
public void homeSet(Player player, ClanPlayer cp, @Name("clan") ClanInput clanInput) {
|
||||
Location loc = player.getLocation();
|
||||
Clan clan = clanInput.getClan();
|
||||
|
||||
clan.getClan().setHomeLocation(loc);
|
||||
ChatBlock.sendMessage(player, AQUA + lang("hombase.mod.set", player, clan.getClan().getName()) + " " +
|
||||
PlayerHomeSetEvent event = new PlayerHomeSetEvent(clan, cp, loc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
clan.setHomeLocation(loc);
|
||||
ChatBlock.sendMessage(player, AQUA + lang("hombase.mod.set", player, clan.getName()) + " " +
|
||||
ChatColor.YELLOW + Helper.toLocationString(loc));
|
||||
}
|
||||
|
||||
@@ -139,14 +147,7 @@ public class StaffCommands extends BaseCommand {
|
||||
@CommandCompletion("@clans:has_home")
|
||||
@CommandPermission("simpleclans.mod.hometp")
|
||||
@Description("{@@command.description.mod.home.tp}")
|
||||
public void homeTp(Player player, @Name("clan") ClanInput clan) {
|
||||
Location loc = clan.getClan().getHomeLocation();
|
||||
|
||||
if (loc == null) {
|
||||
ChatBlock.sendMessage(player, ChatColor.RED + lang("hombase.not.set", player));
|
||||
return;
|
||||
}
|
||||
|
||||
public void homeTp(Player player, @Name("clan") @Conditions("can_teleport") ClanInput clan) {
|
||||
plugin.getTeleportManager().teleportToHome(player, clan.getClan());
|
||||
}
|
||||
|
||||
|
||||
@@ -50,12 +50,16 @@ public class HomeRegroupEvent extends Event implements Cancellable {
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
cancelled = cancel;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.events;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PlayerHomeClearEvent extends Event implements Cancellable {
|
||||
|
||||
private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
||||
private final Clan clan;
|
||||
private final ClanPlayer cp;
|
||||
private boolean cancelled;
|
||||
|
||||
public PlayerHomeClearEvent(Clan clan, ClanPlayer cp) {
|
||||
this.clan = clan;
|
||||
this.cp = cp;
|
||||
}
|
||||
|
||||
public Clan getClan() {
|
||||
return clan;
|
||||
}
|
||||
|
||||
public ClanPlayer getCp() {
|
||||
return cp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -639,7 +639,7 @@ public class DiscordHook implements Listener {
|
||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
||||
private boolean createChannelSilently(ClanPlayer clanPlayer) {
|
||||
Clan clan = clanPlayer.getClan();
|
||||
if (clan == null) {
|
||||
if (clan == null || !settingsManager.is(DISCORDCHAT_AUTO_CREATION)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.hooks.protection;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
@@ -12,6 +13,10 @@ import java.util.Set;
|
||||
|
||||
public interface ProtectionProvider {
|
||||
|
||||
default void register() {
|
||||
SimpleClans.getInstance().getProtectionManager().registerProvider(this);
|
||||
}
|
||||
|
||||
void setup() throws LinkageError, Exception;
|
||||
|
||||
@NotNull
|
||||
|
||||
+27
-9
@@ -1,6 +1,5 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.hooks.protection.providers;
|
||||
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||
@@ -26,14 +25,20 @@ public class WorldGuard6Provider implements ProtectionProvider {
|
||||
private WorldGuardPlugin worldGuard;
|
||||
private Method getRegionManager;
|
||||
private Method getApplicableRegions;
|
||||
private Method getPoints;
|
||||
private Method getX;
|
||||
private Method getZ;
|
||||
|
||||
@SuppressWarnings("JavaReflectionMemberAccess")
|
||||
@Override
|
||||
public void setup() throws NoSuchMethodException {
|
||||
public void setup() throws NoSuchMethodException, ClassNotFoundException {
|
||||
worldGuard = WorldGuardPlugin.inst();
|
||||
getRegionManager = worldGuard.getClass().getMethod("getRegionManager", World.class);
|
||||
//noinspection JavaReflectionMemberAccess
|
||||
getApplicableRegions = RegionManager.class.getMethod("getApplicableRegions", Location.class);
|
||||
|
||||
getPoints = ProtectedRegion.class.getMethod("getPoints");
|
||||
Class<?> blockVector = Class.forName("com.sk89q.worldedit.BlockVector2");
|
||||
getX = blockVector.getMethod("getX");
|
||||
getZ = blockVector.getMethod("getZ");
|
||||
}
|
||||
|
||||
private @Nullable RegionManager getRegionManager(@Nullable World world) {
|
||||
@@ -56,14 +61,27 @@ public class WorldGuard6Provider implements ProtectionProvider {
|
||||
|
||||
@NotNull
|
||||
private Land getLand(ProtectedRegion region) {
|
||||
//noinspection DuplicatedCode - TODO Extract to common WorldGuard interface?
|
||||
List<Coordinate> coordinates = new ArrayList<>();
|
||||
for (BlockVector2 point : region.getPoints()) {
|
||||
coordinates.add(new Coordinate(point.getX(), point.getZ()));
|
||||
}
|
||||
List<Coordinate> coordinates = getCoordinates(region);
|
||||
|
||||
return new Land(getIdPrefix() + region.getId(), region.getOwners().getUniqueIds(), coordinates);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<Coordinate> getCoordinates(ProtectedRegion region) {
|
||||
List<Coordinate> coordinates = new ArrayList<>();
|
||||
try {
|
||||
List<?> points = (List<?>) getPoints.invoke(region);
|
||||
for (Object point : points) {
|
||||
double x = (double) getX.invoke(point);
|
||||
double z = (double) getZ.invoke(point);
|
||||
coordinates.add(new Coordinate(x, z));
|
||||
}
|
||||
} catch (ReflectiveOperationException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Set<Land> getLandsAt(@NotNull Location location) {
|
||||
HashSet<Land> lands = new HashSet<>();
|
||||
|
||||
+7
-13
@@ -1,10 +1,7 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.listeners;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ChatBlock;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer.Channel;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -86,13 +83,7 @@ public class SCPlayerListener extends SCListener {
|
||||
if (isBlacklistedWorld(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ClanPlayer cp;
|
||||
if (settingsManager.is(PERFORMANCE_USE_BUNGEECORD)) {
|
||||
cp = plugin.getClanManager().getClanPlayerJoinEvent(player);
|
||||
} else {
|
||||
cp = plugin.getClanManager().getAnyClanPlayer(player.getUniqueId());
|
||||
}
|
||||
ClanPlayer cp = plugin.getClanManager().getAnyClanPlayer(player.getUniqueId());
|
||||
|
||||
updatePlayerName(player);
|
||||
plugin.getClanManager().updateLastSeen(player);
|
||||
@@ -120,7 +111,10 @@ public class SCPlayerListener extends SCListener {
|
||||
Clan clan = plugin.getClanManager().getClanByPlayerUniqueId(player.getUniqueId());
|
||||
Location home;
|
||||
if (clan != null && (home = clan.getHomeLocation()) != null) {
|
||||
event.setRespawnLocation(plugin.getTeleportManager().getSafe(home));
|
||||
String homeServer = new Flags(clan.getFlags()).getString("homeServer", "");
|
||||
if (homeServer.isEmpty() || plugin.getProxyManager().getServerName().equals(homeServer)) {
|
||||
event.setRespawnLocation(plugin.getTeleportManager().getSafe(home));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +190,7 @@ public class SCPlayerListener extends SCListener {
|
||||
if (duplicate != null) {
|
||||
plugin.getLogger().warning(String.format("Found duplicate for %s, UUIDs: %s, %s", player.getName(),
|
||||
player.getUniqueId(), duplicate.getUniqueId()));
|
||||
duplicate.setName(duplicate.getName() + "_duplicate");
|
||||
duplicate.setName(duplicate.getUniqueId().toString());
|
||||
plugin.getStorageManager().updatePlayerName(duplicate);
|
||||
}
|
||||
if (cp != null) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.ClanPlayer.Channel;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.SPIGOT;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source.DISCORD;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.*;
|
||||
import static org.bukkit.Bukkit.getPluginManager;
|
||||
@@ -44,7 +44,6 @@ public final class ChatManager {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Subscribe
|
||||
public void registerDiscord(DiscordReadyEvent event) {
|
||||
discordHook = new DiscordHook(plugin);
|
||||
@@ -64,12 +63,11 @@ public final class ChatManager {
|
||||
return discordHook;
|
||||
}
|
||||
|
||||
public void processChat(@NotNull Source source, @NotNull Channel channel,
|
||||
@NotNull ClanPlayer clanPlayer, String message) {
|
||||
Clan clan = Objects.requireNonNull(clanPlayer.getClan(), "Clan cannot be null");
|
||||
List<ClanPlayer> receivers = new ArrayList<>();
|
||||
public void processChat(@NotNull SCMessage message) {
|
||||
Clan clan = Objects.requireNonNull(message.getSender().getClan(), "Clan cannot be null");
|
||||
|
||||
switch (channel) {
|
||||
List<ClanPlayer> receivers = new ArrayList<>();
|
||||
switch (message.getChannel()) {
|
||||
case ALLY:
|
||||
if (!plugin.getSettingsManager().is(ALLYCHAT_ENABLE)) {
|
||||
return;
|
||||
@@ -85,20 +83,24 @@ public final class ChatManager {
|
||||
return;
|
||||
}
|
||||
|
||||
receivers.addAll(clan.getOnlineMembers().stream().
|
||||
filter(member -> !member.isMuted()).
|
||||
receivers.addAll(clan.getOnlineMembers().stream().filter(member -> !member.isMuted()).
|
||||
collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
SCMessage scMessage = new SCMessage(source, channel, clanPlayer, message, receivers);
|
||||
message.setReceivers(receivers);
|
||||
|
||||
for (ChatHandler ch : handlers) {
|
||||
if (ch.canHandle(source)) {
|
||||
ch.sendMessage(scMessage.clone());
|
||||
if (ch.canHandle(message.getSource())) {
|
||||
ch.sendMessage(message.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void processChat(@NotNull Source source, @NotNull Channel channel,
|
||||
@NotNull ClanPlayer clanPlayer, String message) {
|
||||
Objects.requireNonNull(clanPlayer.getClan(), "Clan cannot be null");
|
||||
processChat(new SCMessage(source, channel, clanPlayer, message));
|
||||
}
|
||||
|
||||
public String parseChatFormat(String format, SCMessage message) {
|
||||
return parseChatFormat(format, message, new HashMap<>());
|
||||
}
|
||||
@@ -113,7 +115,7 @@ public final class ChatManager {
|
||||
|
||||
String rank = sender.getRankId().isEmpty() ? null : ChatUtils.parseColors(sender.getRankDisplayName());
|
||||
ConfigField configField = ConfigField.valueOf(String.format("%sCHAT_RANK",
|
||||
message.getSource() == SPIGOT ? message.getChannel() : message.getSource()));
|
||||
message.getSource() == DISCORD ? "DISCORD" : message.getChannel()));
|
||||
String rankFormat = (rank != null) ? sm.getColored(configField).replace("%rank%", rank) : "";
|
||||
|
||||
if (placeholders != null) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
@@ -36,8 +37,8 @@ import static org.bukkit.ChatColor.RED;
|
||||
public final class ClanManager {
|
||||
|
||||
private final SimpleClans plugin;
|
||||
private final HashMap<String, Clan> clans = new HashMap<>();
|
||||
private final HashMap<String, ClanPlayer> clanPlayers = new HashMap<>();
|
||||
private final ConcurrentHashMap<String, Clan> clans = new ConcurrentHashMap<>();
|
||||
private final ConcurrentHashMap<UUID, ClanPlayer> clanPlayers = new ConcurrentHashMap<>();
|
||||
private final HashMap<ClanPlayer, List<Kill>> kills = new HashMap<>();
|
||||
|
||||
/**
|
||||
@@ -123,7 +124,7 @@ public final class ClanManager {
|
||||
*/
|
||||
public void importClanPlayer(ClanPlayer cp) {
|
||||
if (cp.getUniqueId() != null) {
|
||||
this.clanPlayers.put(cp.getUniqueId().toString(), cp);
|
||||
this.clanPlayers.put(cp.getUniqueId(), cp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,11 +134,13 @@ public final class ClanManager {
|
||||
public void createClan(Player player, String colorTag, String name) {
|
||||
ClanPlayer cp = getCreateClanPlayer(player.getUniqueId());
|
||||
|
||||
boolean verified = !plugin.getSettingsManager().is(REQUIRE_VERIFICATION) || plugin.getPermissionsManager().has(player, "simpleclans.mod.verify");
|
||||
boolean verified = !plugin.getSettingsManager().is(REQUIRE_VERIFICATION)
|
||||
|| plugin.getPermissionsManager().has(player, "simpleclans.mod.verify");
|
||||
|
||||
Clan clan = new Clan(colorTag, name, verified);
|
||||
clan.addPlayerToClan(cp);
|
||||
cp.setLeader(true);
|
||||
clan.getRanks().addAll(plugin.getSettingsManager().getStarterRanks());
|
||||
|
||||
plugin.getStorageManager().insertClan(clan);
|
||||
importClan(clan);
|
||||
@@ -168,7 +171,7 @@ public final class ClanManager {
|
||||
if (clan != null) {
|
||||
clan.removePlayerFromClan(cp.getUniqueId());
|
||||
}
|
||||
clanPlayers.remove(cp.getUniqueId().toString());
|
||||
clanPlayers.remove(cp.getUniqueId());
|
||||
plugin.getStorageManager().deleteClanPlayer(cp);
|
||||
}
|
||||
|
||||
@@ -176,7 +179,7 @@ public final class ClanManager {
|
||||
* Delete a player data from memory
|
||||
*/
|
||||
public void deleteClanPlayerFromMemory(UUID playerUniqueId) {
|
||||
clanPlayers.remove(playerUniqueId.toString());
|
||||
clanPlayers.remove(playerUniqueId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,6 +243,7 @@ public final class ClanManager {
|
||||
* Gets the ClanPlayer data object if a player is currently in a clan, null
|
||||
* if he's not in a clan Used for BungeeCord Reload ClanPlayer and your Clan
|
||||
*/
|
||||
@Deprecated
|
||||
public @Nullable ClanPlayer getClanPlayerJoinEvent(Player player) {
|
||||
SimpleClans.getInstance().getStorageManager().importFromDatabaseOnePlayer(player);
|
||||
return getClanPlayer(player.getUniqueId());
|
||||
@@ -266,7 +270,7 @@ public final class ClanManager {
|
||||
* if he's not in a clan
|
||||
*/
|
||||
public @Nullable ClanPlayer getClanPlayer(UUID playerUniqueId) {
|
||||
ClanPlayer cp = clanPlayers.get(playerUniqueId.toString());
|
||||
ClanPlayer cp = clanPlayers.get(playerUniqueId);
|
||||
|
||||
if (cp == null) {
|
||||
return null;
|
||||
@@ -297,7 +301,7 @@ public final class ClanManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
ClanPlayer cp = clanPlayers.get(uuid.toString());
|
||||
ClanPlayer cp = clanPlayers.get(uuid);
|
||||
|
||||
if (cp == null) {
|
||||
return null;
|
||||
@@ -319,7 +323,7 @@ public final class ClanManager {
|
||||
|
||||
@Nullable
|
||||
public ClanPlayer getAnyClanPlayer(UUID uuid) {
|
||||
return clanPlayers.get(uuid.toString());
|
||||
return clanPlayers.get(uuid);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@@ -350,8 +354,8 @@ public final class ClanManager {
|
||||
*/
|
||||
public ClanPlayer getCreateClanPlayer(UUID uuid) {
|
||||
Objects.requireNonNull(uuid, "UUID must not be null");
|
||||
if (clanPlayers.containsKey(uuid.toString())) {
|
||||
return clanPlayers.get(uuid.toString());
|
||||
if (clanPlayers.containsKey(uuid)) {
|
||||
return clanPlayers.get(uuid);
|
||||
}
|
||||
|
||||
ClanPlayer cp = new ClanPlayer(uuid);
|
||||
@@ -389,13 +393,8 @@ public final class ClanManager {
|
||||
if (plugin.getSettingsManager().is(DISABLE_MESSAGES)) {
|
||||
return;
|
||||
}
|
||||
Collection<? extends Player> players = Bukkit.getOnlinePlayers();
|
||||
|
||||
for (Player player : players) {
|
||||
ChatBlock.sendMessage(player, ChatColor.DARK_GRAY + "* " + ChatColor.AQUA + msg);
|
||||
}
|
||||
|
||||
SimpleClans.getInstance().getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[" + lang("server.announce") + "] " + ChatColor.WHITE + msg);
|
||||
plugin.getProxyManager().sendMessage("ALL", ChatColor.DARK_GRAY + "* " + ChatColor.AQUA + msg);
|
||||
Bukkit.getConsoleSender().sendMessage(ChatColor.AQUA + "[" + lang("server.announce") + "] " + ChatColor.WHITE + msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.managers;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Rank;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.Material;
|
||||
@@ -250,6 +251,22 @@ public final class SettingsManager {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public @NotNull Collection<Rank> getStarterRanks() {
|
||||
List<Rank> ranks = new ArrayList<>();
|
||||
List<Map<?, ?>> mapList = config.getMapList("clan.starter-ranks");
|
||||
for (Map<?, ?> rankMap : mapList) {
|
||||
Set<String> names = (Set<String>) rankMap.keySet();
|
||||
for (String name : names) {
|
||||
Map<String, Object> rank = (Map<String, Object>) rankMap.get(name);
|
||||
String displayName = (String) rank.get("display-name");
|
||||
List<String> permissions = (List<String>) rank.get("permissions");
|
||||
ranks.add(new Rank(name, displayName, new HashSet<>(permissions)));
|
||||
}
|
||||
}
|
||||
return ranks;
|
||||
}
|
||||
|
||||
public FileConfiguration getConfig() {
|
||||
return config;
|
||||
}
|
||||
@@ -383,8 +400,8 @@ public final class SettingsManager {
|
||||
ECONOMY_PURCHASE_HOME_TELEPORT_SET("economy.purchase-home-teleport-set", false),
|
||||
ECONOMY_REGROUP_PRICE("economy.home-regroup-price", 5.0),
|
||||
ECONOMY_PURCHASE_HOME_REGROUP("economy.purchase-home-regroup", false),
|
||||
ECONOMY_PURCHASE_DISCORD_CREATE("purchase-discord-create", false),
|
||||
ECONOMY_DISCORD_CREATION_PRICE("discord-creation-price", 1000.0),
|
||||
ECONOMY_PURCHASE_DISCORD_CREATE("economy.purchase-discord-create", false),
|
||||
ECONOMY_DISCORD_CREATION_PRICE("economy.discord-creation-price", 1000.0),
|
||||
ECONOMY_UNIQUE_TAX_ON_REGROUP("economy.unique-tax-on-regroup", true),
|
||||
ECONOMY_ISSUER_PAYS_REGROUP("economy.issuer-pays-regroup", true),
|
||||
ECONOMY_MONEY_PER_KILL("economy.money-per-kill", false),
|
||||
@@ -459,6 +476,7 @@ public final class SettingsManager {
|
||||
PAGE_HEADINGS_COLOR("page.headings-color", "8"),
|
||||
PAGE_SEPARATOR("page.separator", "-"),
|
||||
PAGE_SIZE("page.size", 100),
|
||||
HELP_SIZE("page.help-size", 10),
|
||||
/*
|
||||
================
|
||||
> Clan Chat Settings
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.sql.*;
|
||||
import java.text.MessageFormat;
|
||||
@@ -286,6 +285,7 @@ public final class StorageManager {
|
||||
* Used for BungeeCord Reload ClanPlayer and your Clan
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public void importFromDatabaseOnePlayer(Player player) {
|
||||
plugin.getClanManager().deleteClanPlayerFromMemory(player.getUniqueId());
|
||||
|
||||
@@ -299,7 +299,7 @@ public final class StorageManager {
|
||||
}
|
||||
plugin.getClanManager().importClanPlayer(cp);
|
||||
|
||||
plugin.getLogger().info("ClanPlayer Reloaded: " + player.getName() + ", UUID: " + player.getUniqueId().toString());
|
||||
plugin.getLogger().info("ClanPlayer Reloaded: " + player.getName() + ", UUID: " + player.getUniqueId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ public final class StorageManager {
|
||||
String packed_rivals = res.getString("packed_rivals");
|
||||
String packed_bb = res.getString("packed_bb");
|
||||
String flags = res.getString("flags");
|
||||
JSONObject ranks = Helper.parseJson(res.getString("ranks"));
|
||||
String ranksJson = res.getString("ranks");
|
||||
long founded = res.getLong("founded");
|
||||
long last_used = res.getLong("last_used");
|
||||
double balance = res.getDouble("balance");
|
||||
@@ -410,8 +410,8 @@ public final class StorageManager {
|
||||
clan.setBalance(BankOperator.INTERNAL, ClanBalanceUpdateEvent.Cause.LOADING, BankLogger.Operation.SET, balance);
|
||||
clan.setMemberFee(feeValue);
|
||||
clan.setMemberFeeEnabled(feeEnabled);
|
||||
clan.setRanks(Helper.ranksFromJson(ranks));
|
||||
clan.setDefaultRank(Helper.defaultRankFromJson(ranks));
|
||||
clan.setRanks(Helper.ranksFromJson(ranksJson));
|
||||
clan.setDefaultRank(Helper.defaultRankFromJson(ranksJson));
|
||||
clan.setBanner(banner);
|
||||
|
||||
out.add(clan);
|
||||
@@ -452,7 +452,7 @@ public final class StorageManager {
|
||||
String packed_rivals = res.getString("packed_rivals");
|
||||
String packed_bb = res.getString("packed_bb");
|
||||
String flags = res.getString("flags");
|
||||
JSONObject ranks = Helper.parseJson(res.getString("ranks"));
|
||||
String ranksJson = res.getString("ranks");
|
||||
long founded = res.getLong("founded");
|
||||
long last_used = res.getLong("last_used");
|
||||
double balance = res.getDouble("balance");
|
||||
@@ -484,8 +484,8 @@ public final class StorageManager {
|
||||
clan.setBalance(BankOperator.INTERNAL, ClanBalanceUpdateEvent.Cause.LOADING, BankLogger.Operation.SET, balance);
|
||||
clan.setMemberFee(feeValue);
|
||||
clan.setMemberFeeEnabled(feeEnabled);
|
||||
clan.setRanks(Helper.ranksFromJson(ranks));
|
||||
clan.setDefaultRank(Helper.defaultRankFromJson(ranks));
|
||||
clan.setRanks(Helper.ranksFromJson(ranksJson));
|
||||
clan.setDefaultRank(Helper.defaultRankFromJson(ranksJson));
|
||||
clan.setBanner(banner);
|
||||
|
||||
out = clan;
|
||||
@@ -536,11 +536,7 @@ public final class StorageManager {
|
||||
|
||||
if (last_seen == 0) {
|
||||
last_seen = (new Date()).getTime();
|
||||
}
|
||||
|
||||
if (join_date == 0) {
|
||||
join_date = (new Date()).getTime();
|
||||
}
|
||||
}
|
||||
|
||||
ClanPlayer cp = new ClanPlayer();
|
||||
if (uuid != null) {
|
||||
@@ -620,10 +616,6 @@ public final class StorageManager {
|
||||
last_seen = (new Date()).getTime();
|
||||
}
|
||||
|
||||
if (join_date == 0) {
|
||||
join_date = (new Date()).getTime();
|
||||
}
|
||||
|
||||
ClanPlayer cp = new ClanPlayer();
|
||||
if (uuid != null) {
|
||||
cp.setUniqueId(UUID.fromString(uuid));
|
||||
@@ -690,6 +682,8 @@ public final class StorageManager {
|
||||
*
|
||||
*/
|
||||
public void insertClan(Clan clan) {
|
||||
plugin.getProxyManager().sendUpdate(clan);
|
||||
|
||||
String query = "INSERT INTO `sc_clans` (`banner`, `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`) ";
|
||||
@@ -772,6 +766,7 @@ public final class StorageManager {
|
||||
if (updateLastUsed) {
|
||||
clan.updateLastUsed();
|
||||
}
|
||||
plugin.getProxyManager().sendUpdate(clan);
|
||||
if (plugin.getSettingsManager().is(PERFORMANCE_SAVE_PERIODICALLY)) {
|
||||
modifiedClans.add(clan);
|
||||
return;
|
||||
@@ -816,6 +811,7 @@ public final class StorageManager {
|
||||
* Delete a clan from the database
|
||||
*/
|
||||
public void deleteClan(Clan clan) {
|
||||
plugin.getProxyManager().sendDelete(clan);
|
||||
String query = "DELETE FROM `sc_clans` WHERE tag = '" + clan.getTag() + "';";
|
||||
core.executeUpdate(query);
|
||||
}
|
||||
@@ -825,6 +821,8 @@ public final class StorageManager {
|
||||
*
|
||||
*/
|
||||
public void insertClanPlayer(ClanPlayer cp) {
|
||||
plugin.getProxyManager().sendUpdate(cp);
|
||||
|
||||
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() + "',"
|
||||
@@ -856,6 +854,7 @@ public final class StorageManager {
|
||||
*/
|
||||
public void updateClanPlayer(ClanPlayer cp) {
|
||||
cp.updateLastSeen();
|
||||
plugin.getProxyManager().sendUpdate(cp);
|
||||
if (plugin.getSettingsManager().is(PERFORMANCE_SAVE_PERIODICALLY)) {
|
||||
modifiedClanPlayers.add(cp);
|
||||
return;
|
||||
@@ -903,6 +902,7 @@ public final class StorageManager {
|
||||
clan.addBbWithoutSaving(ChatColor.AQUA + MessageFormat.format(lang("has.been.purged"), cp.getName()));
|
||||
updateClan(clan, false);
|
||||
}
|
||||
plugin.getProxyManager().sendDelete(cp);
|
||||
String query = "DELETE FROM `sc_players` WHERE uuid = '" + cp.getUniqueId() + "';";
|
||||
core.executeUpdate(query);
|
||||
deleteKills(cp.getUniqueId());
|
||||
|
||||
@@ -46,15 +46,16 @@ public final class TeleportManager {
|
||||
* @param clanName the Clan name
|
||||
*/
|
||||
public void addPlayer(Player player, Location destination, String clanName) {
|
||||
PermissionsManager pm = plugin.getPermissionsManager();
|
||||
|
||||
int secs = SimpleClans.getInstance().getSettingsManager().getInt(CLAN_TELEPORT_DELAY);
|
||||
if (plugin.getPermissionsManager().has(player, "simpleclans.mod.bypass")) {
|
||||
if (pm.has(player, "simpleclans.mod.bypass") || pm.has(player, "simpleclans.vip.teleport-delay")) {
|
||||
secs = 0;
|
||||
}
|
||||
waitingPlayers.put(player.getUniqueId().toString(), new TeleportState(player, destination, clanName, secs));
|
||||
|
||||
if (secs > 0) {
|
||||
ChatBlock.sendMessage(player, AQUA
|
||||
+ MessageFormat.format(lang("waiting.for.teleport.stand.still.for.0.seconds", player), secs));
|
||||
ChatBlock.sendMessage(player, AQUA + lang("waiting.for.teleport.stand.still.for.0.seconds", player, secs));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.adapters.ClanPlayerListAdapter;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.adapters.ClanPlayerTypeAdapterFactory;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.adapters.ConfigurationSerializableAdapter;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.adapters.SCMessageAdapter;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.listeners.MessageListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.plugin.messaging.PluginMessageListener;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public final class BungeeManager implements ProxyManager, PluginMessageListener {
|
||||
|
||||
private static final String UPDATE_CLAN_CHANNEL = "UpdateClan";
|
||||
private static final String UPDATE_CLANPLAYER_CHANNEL = "UpdateClanPlayer";
|
||||
private static final String DELETE_CLAN_CHANNEL = "DeleteClan";
|
||||
private static final String DELETE_CLANPLAYER_CHANNEL = "DeleteClanPlayer";
|
||||
private static final String CHAT_CHANNEL = "Chat";
|
||||
|
||||
private final SimpleClans plugin;
|
||||
private final Gson gson;
|
||||
private final List<String> onlinePlayers = new ArrayList<>();
|
||||
private String serverName = "";
|
||||
private final Set<String> unknownChannels = new HashSet<>();
|
||||
|
||||
public BungeeManager(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
gson = new GsonBuilder().registerTypeAdapterFactory(new ClanPlayerTypeAdapterFactory(plugin))
|
||||
.registerTypeAdapterFactory(new ConfigurationSerializableAdapter())
|
||||
.registerTypeAdapter(ClanPlayerListAdapter.getType(), new ClanPlayerListAdapter(plugin))
|
||||
.registerTypeAdapter(SCMessage.class, new SCMessageAdapter(plugin)).setExclusionStrategies()
|
||||
.create();
|
||||
if (!plugin.getSettingsManager().is(ConfigField.PERFORMANCE_USE_BUNGEECORD)) {
|
||||
return;
|
||||
}
|
||||
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "BungeeCord");
|
||||
Bukkit.getMessenger().registerIncomingPluginChannel(plugin, "BungeeCord", this);
|
||||
Bukkit.getScheduler().runTaskTimer(plugin, this::requestPlayerList, 0, 60 * 20);
|
||||
requestServerName();
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, byte[] data) {
|
||||
ByteArrayDataInput input = ByteStreams.newDataInput(data);
|
||||
String subChannel = input.readUTF();
|
||||
if (unknownChannels.contains(subChannel)) {
|
||||
return;
|
||||
}
|
||||
SimpleClans.debug("Message received, sub-channel: " + subChannel);
|
||||
try {
|
||||
Class<?> clazz = Class.forName("net.sacredlabyrinth.phaed.simpleclans.proxy.listeners." + subChannel);
|
||||
MessageListener listener = (MessageListener) clazz.getConstructor(BungeeManager.class).newInstance(this);
|
||||
listener.accept(input);
|
||||
SimpleClans.debug("Message processed");
|
||||
} catch (ClassNotFoundException e) {
|
||||
SimpleClans.debug(String.format("Unknown channel: %s", subChannel));
|
||||
unknownChannels.add(subChannel);
|
||||
} catch (ReflectiveOperationException ex) {
|
||||
plugin.getLogger().log(Level.SEVERE, String.format("Error processing channel %s", subChannel), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOnline(String playerName) {
|
||||
if (Bukkit.getOnlinePlayers().stream().anyMatch(player -> player.getName().equals(playerName))) {
|
||||
return true;
|
||||
}
|
||||
return onlinePlayers.contains(playerName);
|
||||
}
|
||||
|
||||
public void setOnlinePlayers(@NotNull List<String> onlinePlayers) {
|
||||
this.onlinePlayers.clear();
|
||||
this.onlinePlayers.addAll(onlinePlayers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServerName() {
|
||||
return serverName;
|
||||
}
|
||||
|
||||
public void setServerName(@NotNull String name) {
|
||||
this.serverName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(SCMessage message) {
|
||||
forwardPluginMessage(CHAT_CHANNEL, gson.toJson(message), false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
@Override
|
||||
public void sendMessage(@NotNull String target, @NotNull String message) {
|
||||
if (isChannelRegistered()) {
|
||||
ByteArrayDataOutput output = ByteStreams.newDataOutput();
|
||||
output.writeUTF("Message");
|
||||
output.writeUTF(target);
|
||||
output.writeUTF(message);
|
||||
|
||||
sendOnBungeeChannel(output);
|
||||
} else {
|
||||
if ("ALL".equals(target)) {
|
||||
Bukkit.getOnlinePlayers().forEach(p -> p.sendMessage(message));
|
||||
} else {
|
||||
Optional.ofNullable(Bukkit.getPlayer(target)).ifPresent(p -> p.sendMessage(message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendDelete(Clan clan) {
|
||||
forwardPluginMessage(DELETE_CLAN_CHANNEL, clan.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendDelete(ClanPlayer cp) {
|
||||
forwardPluginMessage(DELETE_CLANPLAYER_CHANNEL, cp.getUniqueId().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendUpdate(Clan clan) {
|
||||
forwardPluginMessage(UPDATE_CLAN_CHANNEL, gson.toJson(clan));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendUpdate(ClanPlayer cp) {
|
||||
forwardPluginMessage(UPDATE_CLANPLAYER_CHANNEL, gson.toJson(cp));
|
||||
}
|
||||
|
||||
public SimpleClans getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public Gson getGson() {
|
||||
return gson;
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
private void requestPlayerList() {
|
||||
if (!isChannelRegistered()) {
|
||||
return;
|
||||
}
|
||||
ByteArrayDataOutput output = ByteStreams.newDataOutput();
|
||||
output.writeUTF("PlayerList");
|
||||
output.writeUTF("ALL");
|
||||
|
||||
sendOnBungeeChannel(output);
|
||||
}
|
||||
|
||||
private void requestServerName() {
|
||||
Listener listener = new Listener() {
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
@EventHandler
|
||||
void on(PlayerJoinEvent event) {
|
||||
ByteArrayDataOutput output = ByteStreams.newDataOutput();
|
||||
output.writeUTF("GetServer");
|
||||
|
||||
Bukkit.getScheduler().runTask(plugin, () -> {
|
||||
event.getPlayer().sendPluginMessage(plugin, "BungeeCord", output.toByteArray());
|
||||
PlayerJoinEvent.getHandlerList().unregister(this); //only needed once
|
||||
});
|
||||
}
|
||||
};
|
||||
Bukkit.getPluginManager().registerEvents(listener, plugin);
|
||||
}
|
||||
|
||||
private void forwardPluginMessage(final String subChannel, final String message) {
|
||||
forwardPluginMessage(subChannel, message, true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
private void forwardPluginMessage(final String subChannel, final String message, final boolean all) {
|
||||
SimpleClans.debug(String.format("Forwarding message, channel %s, message %s, all %s", subChannel, message, all));
|
||||
if (!isChannelRegistered()) {
|
||||
SimpleClans.debug("Not registered");
|
||||
return;
|
||||
}
|
||||
String target = all ? "ALL" : "ONLINE";
|
||||
ByteArrayDataOutput output = ByteStreams.newDataOutput();
|
||||
output.writeUTF("Forward");
|
||||
output.writeUTF(target);
|
||||
output.writeUTF(subChannel);
|
||||
output.writeUTF(message);
|
||||
|
||||
sendOnBungeeChannel(output);
|
||||
}
|
||||
|
||||
private void sendOnBungeeChannel(ByteArrayDataOutput output) {
|
||||
Bukkit.getOnlinePlayers().stream().findAny().ifPresent(player ->
|
||||
player.sendPluginMessage(plugin, "BungeeCord", output.toByteArray()));
|
||||
}
|
||||
|
||||
private boolean isChannelRegistered() {
|
||||
return Bukkit.getMessenger().isOutgoingChannelRegistered(plugin, "BungeeCord");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage;
|
||||
|
||||
public interface ProxyManager {
|
||||
|
||||
String getServerName();
|
||||
|
||||
boolean isOnline(String playerName);
|
||||
|
||||
void sendMessage(SCMessage message);
|
||||
|
||||
void sendMessage(String target, String message);
|
||||
|
||||
void sendUpdate(Clan clan);
|
||||
|
||||
void sendUpdate(ClanPlayer cp);
|
||||
|
||||
void sendDelete(Clan clan);
|
||||
|
||||
void sendDelete(ClanPlayer cp);
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.adapters;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonToken;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ClanPlayerListAdapter extends TypeAdapter<List<ClanPlayer>> {
|
||||
private final SimpleClans plugin;
|
||||
|
||||
public ClanPlayerListAdapter(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, List<ClanPlayer> value) throws IOException {
|
||||
out.beginArray();
|
||||
for (ClanPlayer clanPlayer : value) {
|
||||
out.beginObject();
|
||||
out.name("uuid");
|
||||
out.value(clanPlayer.getUniqueId().toString());
|
||||
out.endObject();
|
||||
}
|
||||
out.endArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClanPlayer> read(JsonReader in) throws IOException {
|
||||
List<ClanPlayer> list = new ArrayList<>();
|
||||
in.beginArray();
|
||||
while (in.peek() == JsonToken.BEGIN_OBJECT) {
|
||||
in.beginObject();
|
||||
in.nextName();
|
||||
UUID uuid = UUID.fromString(in.nextString());
|
||||
ClanPlayer cp = plugin.getClanManager().getAnyClanPlayer(uuid);
|
||||
in.endObject();
|
||||
if (cp != null) {
|
||||
list.add(cp);
|
||||
}
|
||||
}
|
||||
in.endArray();
|
||||
return list;
|
||||
}
|
||||
|
||||
public static Type getType() {
|
||||
return TypeToken.getParameterized(List.class, ClanPlayer.class).getType();
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.adapters;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ClanPlayerTypeAdapterFactory implements TypeAdapterFactory {
|
||||
|
||||
private final SimpleClans plugin;
|
||||
|
||||
public ClanPlayerTypeAdapterFactory(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> @Nullable TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (type.getType() != ClanPlayer.class) {
|
||||
return null;
|
||||
}
|
||||
final TypeAdapter<ClanPlayer> delegate = (TypeAdapter<ClanPlayer>) gson.getDelegateAdapter(this, type);
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<ClanPlayer>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, ClanPlayer value) {
|
||||
JsonObject object = delegate.toJsonTree(value).getAsJsonObject();
|
||||
object.addProperty("clan", value.getTag());
|
||||
gson.toJson(object, out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClanPlayer read(JsonReader in) {
|
||||
JsonObject object = gson.fromJson(in, JsonObject.class);
|
||||
String tag = object.get("clan").getAsString();
|
||||
Clan clan = plugin.getClanManager().getClan(tag);
|
||||
object.add("clan", null);
|
||||
|
||||
ClanPlayer cp = delegate.fromJsonTree(object);
|
||||
cp.setClan(clan);
|
||||
return cp;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.adapters;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.google.gson.stream.JsonToken;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public class ConfigurationSerializableAdapter implements TypeAdapterFactory {
|
||||
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!ConfigurationSerializable.class.isAssignableFrom(type.getRawType())) {
|
||||
return null;
|
||||
}
|
||||
TypeAdapter<Map> adapter = gson.getAdapter(Map.class);
|
||||
return (TypeAdapter<T>) new TypeAdapter<ConfigurationSerializable>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, ConfigurationSerializable value) throws IOException {
|
||||
if (value == null) {
|
||||
out.nullValue();
|
||||
} else {
|
||||
adapter.write(out, value.serialize());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigurationSerializable read(JsonReader in) throws IOException {
|
||||
if (in.peek() == JsonToken.NULL) { //could be replaced with map == null?
|
||||
in.nextNull();
|
||||
return null;
|
||||
}
|
||||
Map map = adapter.read(in);
|
||||
return ConfigurationSerialization.deserializeObject(map,
|
||||
(Class<? extends ConfigurationSerializable>) type.getRawType());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.adapters;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage.Source;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SCMessageAdapter extends TypeAdapter<SCMessage> {
|
||||
|
||||
private final SimpleClans plugin;
|
||||
|
||||
public SCMessageAdapter(SimpleClans plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, SCMessage value) throws IOException {
|
||||
out.beginObject();
|
||||
out.name("channel");
|
||||
out.value(value.getChannel().toString());
|
||||
out.name("sender");
|
||||
out.value(value.getSender().getUniqueId().toString());
|
||||
out.name("content");
|
||||
out.value(value.getContent());
|
||||
out.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable SCMessage read(JsonReader in) throws IOException {
|
||||
in.beginObject();
|
||||
in.nextName();
|
||||
ClanPlayer.Channel channel = ClanPlayer.Channel.valueOf(in.nextString());
|
||||
in.nextName();
|
||||
UUID uuid = UUID.fromString(in.nextString());
|
||||
ClanPlayer sender = plugin.getClanManager().getAnyClanPlayer(uuid);
|
||||
in.nextName();
|
||||
String content = in.nextString();
|
||||
in.endObject();
|
||||
|
||||
if (sender == null) {
|
||||
return null;
|
||||
}
|
||||
return new SCMessage(Source.PROXY, channel, sender, content);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.chat.SCMessage;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
|
||||
public class Chat extends MessageListener {
|
||||
|
||||
public Chat(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(ByteArrayDataInput data) {
|
||||
SCMessage message = getGson().fromJson(data.readUTF(), SCMessage.class);
|
||||
if (message.getSender().getClan() == null) {
|
||||
return;
|
||||
}
|
||||
bungee.getPlugin().getChatManager().processChat(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.debug;
|
||||
|
||||
public class DeleteClan extends MessageListener {
|
||||
|
||||
public DeleteClan(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(ByteArrayDataInput data) {
|
||||
String tag = data.readUTF();
|
||||
getClanManager().removeClan(tag);
|
||||
debug(String.format("Deleted clan %s", tag));
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.debug;
|
||||
|
||||
public class DeleteClanPlayer extends MessageListener {
|
||||
|
||||
public DeleteClanPlayer(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(ByteArrayDataInput data) {
|
||||
UUID uuid = UUID.fromString(data.readUTF());
|
||||
getClanManager().deleteClanPlayerFromMemory(uuid);
|
||||
debug(String.format("Deleted cp %s", uuid));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
|
||||
public class GetServer extends MessageListener {
|
||||
|
||||
public GetServer(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(ByteArrayDataInput data) {
|
||||
String name = data.readUTF();
|
||||
bungee.setServerName(name);
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.gson.Gson;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
|
||||
public abstract class MessageListener {
|
||||
|
||||
protected final BungeeManager bungee;
|
||||
|
||||
public MessageListener(BungeeManager bungee) {
|
||||
this.bungee = bungee;
|
||||
}
|
||||
|
||||
public abstract void accept(ByteArrayDataInput data);
|
||||
|
||||
protected ClanManager getClanManager() {
|
||||
return bungee.getPlugin().getClanManager();
|
||||
}
|
||||
|
||||
protected Gson getGson() {
|
||||
return bungee.getGson();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class PlayerList extends MessageListener {
|
||||
|
||||
public PlayerList(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(ByteArrayDataInput data) {
|
||||
data.readUTF(); // target
|
||||
List<String> players = Arrays.asList(data.readUTF().split(", "));
|
||||
bungee.setOnlinePlayers(players);
|
||||
SimpleClans.debug("Updated player list");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ObjectUtils;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.debug;
|
||||
|
||||
public abstract class Update<T> extends MessageListener {
|
||||
|
||||
public Update(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
protected abstract Class<T> getType();
|
||||
|
||||
protected abstract @Nullable T getCurrent(T t);
|
||||
|
||||
protected abstract void insert(T t);
|
||||
|
||||
@Override
|
||||
public final void accept(ByteArrayDataInput data) {
|
||||
T t = getGson().fromJson(data.readUTF(), getType());
|
||||
T current = getCurrent(t);
|
||||
if (current == null) {
|
||||
insert(t);
|
||||
debug(String.format("Inserted %s", t));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
ObjectUtils.updateFields(t, current);
|
||||
} catch (IllegalAccessException e) {
|
||||
bungee.getPlugin().getLogger().log(Level.SEVERE, String.format("An error happened while updating %s", t), e);
|
||||
}
|
||||
debug(String.format("Updated %s", t));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class UpdateClan extends Update<Clan> {
|
||||
|
||||
public UpdateClan(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<Clan> getType() {
|
||||
return Clan.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nullable Clan getCurrent(Clan clan) {
|
||||
return getClanManager().getClan(clan.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insert(Clan clan) {
|
||||
getClanManager().importClan(clan);
|
||||
}
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.proxy.listeners;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.proxy.BungeeManager;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class UpdateClanPlayer extends Update<ClanPlayer> {
|
||||
|
||||
public UpdateClanPlayer(BungeeManager bungee) {
|
||||
super(bungee);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<ClanPlayer> getType() {
|
||||
return ClanPlayer.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nullable ClanPlayer getCurrent(ClanPlayer clanPlayer) {
|
||||
return getClanManager().getAnyClanPlayer(clanPlayer.getUniqueId());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insert(ClanPlayer clanPlayer) {
|
||||
getClanManager().importClanPlayer(clanPlayer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class MySQLCore implements DBCore {
|
||||
private void initialize() {
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database + "?useUnicode=true&characterEncoding=utf-8&autoReconnect=true", username, password);
|
||||
connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database + "?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false", username, password);
|
||||
} catch (ClassNotFoundException e) {
|
||||
log.severe("ClassNotFoundException! " + e.getMessage());
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -2,9 +2,10 @@ package net.sacredlabyrinth.phaed.simpleclans.tasks;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.*;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.loggers.BankOperator;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.PermissionsManager;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;
|
||||
@@ -42,24 +43,24 @@ public class CollectFeeTask extends BukkitRunnable {
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
PermissionsManager pm = plugin.getPermissionsManager();
|
||||
for (Clan clan : plugin.getClanManager().getClans()) {
|
||||
final double memberFee = clan.getMemberFee();
|
||||
|
||||
if (clan.isMemberFeeEnabled() && memberFee > 0) {
|
||||
for (ClanPlayer cp : clan.getFeePayers()) {
|
||||
boolean success = plugin.getPermissionsManager()
|
||||
.playerChargeMoney(Bukkit.getOfflinePlayer(cp.getUniqueId()), memberFee);
|
||||
if (success) {
|
||||
Player player = cp.toPlayer();
|
||||
ChatBlock.sendMessage(player, AQUA + lang("fee.collected", cp, memberFee));
|
||||
if (!clan.isMemberFeeEnabled() || memberFee <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
clan.deposit(new BankOperator(cp, plugin.getPermissionsManager().playerGetMoney(player)), Cause.MEMBER_FEE, memberFee);
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
} else {
|
||||
clan.removePlayerFromClan(cp.getUniqueId());
|
||||
clan.addBb(AQUA + lang("bb.fee.player.kicked", cp.getName()));
|
||||
}
|
||||
for (ClanPlayer cp : clan.getFeePayers()) {
|
||||
OfflinePlayer player = Bukkit.getOfflinePlayer(cp.getUniqueId());
|
||||
boolean success = pm.playerChargeMoney(player, memberFee);
|
||||
if (success) {
|
||||
ChatBlock.sendMessage(cp, AQUA + lang("fee.collected", cp, memberFee));
|
||||
|
||||
clan.deposit(new BankOperator(cp, pm.playerGetMoney(player)), Cause.MEMBER_FEE, memberFee);
|
||||
plugin.getStorageManager().updateClan(clan);
|
||||
} else {
|
||||
clan.removePlayerFromClan(cp.getUniqueId());
|
||||
clan.addBb(AQUA + lang("bb.fee.player.kicked", cp.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public class AddPermissionFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 4 * 9;
|
||||
return 3 * 9;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class MainFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 9;
|
||||
return 3 * 9;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,6 @@ public class PermissionsFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public void createComponents() {
|
||||
|
||||
for (int slot = 0; slot < 9; slot++) {
|
||||
if (slot == 2 || slot == 4 || slot == 6 || slot == 7)
|
||||
continue;
|
||||
@@ -82,7 +81,7 @@ public class PermissionsFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 4 * 9;
|
||||
return 3 * 9;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -120,7 +120,7 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
public int getSize() {
|
||||
int size = 3;
|
||||
if (isSameClan()) {
|
||||
size = 5;
|
||||
size = 6;
|
||||
}
|
||||
return size * 9;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class WarningFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 4 * 9;
|
||||
return 6 * 9;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -126,7 +126,7 @@ public class ClanDetailsFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 5 * 9;
|
||||
return 6 * 9;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -114,7 +114,7 @@ public class PlayerDetailsFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 5 * 9;
|
||||
return 6 * 9;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class StaffFrame extends SCFrame {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 2 * 9;
|
||||
return 3 * 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.utils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public final class ObjectUtils {
|
||||
|
||||
private ObjectUtils() {
|
||||
}
|
||||
|
||||
public static void updateFields(Object origin, Object destination) throws IllegalAccessException {
|
||||
if (origin.getClass() != destination.getClass()) {
|
||||
throw new IllegalArgumentException("origin and destination must be of the same type");
|
||||
}
|
||||
Field[] fields = origin.getClass().getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
if (Modifier.isFinal(field.getModifiers())) {
|
||||
copyValues(field, field.get(origin), field.get(destination));
|
||||
continue;
|
||||
}
|
||||
field.set(destination, field.get(origin));
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isPrimitive(Field field) {
|
||||
Class<?> type = field.getType();
|
||||
return type.isPrimitive() || Number.class.isAssignableFrom(type) || type == String.class;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
private static void copyValues(Field field, Object originValue, Object destValue) {
|
||||
if (isPrimitive(field)) {
|
||||
return;
|
||||
}
|
||||
if (originValue instanceof Collection) {
|
||||
Collection<?> destColl = (Collection<?>) destValue;
|
||||
destColl.clear();
|
||||
destColl.addAll((Collection) originValue);
|
||||
return;
|
||||
}
|
||||
if (originValue instanceof Map) {
|
||||
Map<?, ?> destMap = (Map<?, ?>) destValue;
|
||||
destMap.clear();
|
||||
destMap.putAll((Map) originValue);
|
||||
return;
|
||||
}
|
||||
throw new UnsupportedOperationException(String.format("unknown field type: %s", originValue.getClass()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,9 @@ package net.sacredlabyrinth.phaed.simpleclans.utils;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -23,34 +23,49 @@ public class VanishUtils {
|
||||
@NotNull List<ClanPlayer> clanPlayers) {
|
||||
ArrayList<ClanPlayer> nonVanished = new ArrayList<>();
|
||||
for (ClanPlayer cp : clanPlayers) {
|
||||
Player player = cp.toPlayer();
|
||||
if (!isVanished(viewer, player)) {
|
||||
if (!isVanished(viewer, cp)) {
|
||||
nonVanished.add(cp);
|
||||
}
|
||||
}
|
||||
return nonVanished;
|
||||
}
|
||||
|
||||
@Contract("_, null -> true")
|
||||
public static boolean isVanished(@Nullable CommandSender viewer, @Nullable Player player) {
|
||||
if (isVanished(player)) {
|
||||
public static boolean isVanished(@Nullable CommandSender viewer, @NotNull ClanPlayer cp) {
|
||||
if (isVanished(cp)) {
|
||||
return true;
|
||||
}
|
||||
if (viewer instanceof Player) {
|
||||
Player player = cp.toPlayer();
|
||||
if (viewer instanceof Player && player != null) {
|
||||
return !((Player) viewer).canSee(player);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Contract("null -> true")
|
||||
public static boolean isVanished(@Nullable Player player) {
|
||||
if (player == null || !player.isOnline()) {
|
||||
public static boolean isVanished(@Nullable CommandSender viewer, @NotNull Player player) {
|
||||
if (viewer instanceof Player) {
|
||||
return !((Player) viewer).canSee(player);
|
||||
}
|
||||
return checkMetadata(player);
|
||||
}
|
||||
|
||||
public static boolean isVanished(@NotNull ClanPlayer cp) {
|
||||
if (!isOnline(cp)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = cp.toPlayer();
|
||||
return player != null && checkMetadata(player);
|
||||
}
|
||||
|
||||
private static boolean checkMetadata(Player player) {
|
||||
if (player.hasMetadata("vanished") && !player.getMetadata("vanished").isEmpty()) {
|
||||
return player.getMetadata("vanished").get(0).asBoolean();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOnline(@NotNull ClanPlayer player) {
|
||||
return SimpleClans.getInstance().getProxyManager().isOnline(player.getName());
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,34 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.uuid;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
/**
|
||||
* @author evilmidget38
|
||||
*
|
||||
* http://forums.bukkit.org/threads/250926/
|
||||
* <a href="http://forums.bukkit.org/threads/250926/">...</a>
|
||||
*
|
||||
* https://gist.github.com/evilmidget38/26d70114b834f71fb3b4
|
||||
* <a href="https://gist.github.com/evilmidget38/26d70114b834f71fb3b4">...</a>
|
||||
*/
|
||||
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/users/profiles/minecraft";
|
||||
private final JSONParser jsonParser = new JSONParser();
|
||||
private static final String PROFILE_URL = "https://api.mojang.com/profiles/minecraft";
|
||||
private final Gson gson = new Gson();
|
||||
private final List<String> names;
|
||||
private final boolean rateLimiting;
|
||||
|
||||
@@ -39,14 +41,14 @@ public class UUIDFetcher implements Callable<Map<String, UUID>> {
|
||||
this(names, true);
|
||||
}
|
||||
|
||||
private static void writeBody(HttpURLConnection connection, String body) throws Exception {
|
||||
private static void writeBody(HttpURLConnection connection, String body) throws IOException {
|
||||
OutputStream stream = connection.getOutputStream();
|
||||
stream.write(body.getBytes(StandardCharsets.UTF_8));
|
||||
stream.write(body.getBytes(UTF_8));
|
||||
stream.flush();
|
||||
stream.close();
|
||||
}
|
||||
|
||||
private static HttpURLConnection createConnection() throws Exception {
|
||||
private static HttpURLConnection createConnection() throws IOException {
|
||||
URL url = new URL(PROFILE_URL);
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("POST");
|
||||
@@ -78,27 +80,28 @@ public class UUIDFetcher implements Callable<Map<String, UUID>> {
|
||||
return new UUID(mostSignificant, leastSignificant);
|
||||
}
|
||||
|
||||
public static UUID getUUIDOf(String name) throws Exception {
|
||||
return new UUIDFetcher(Arrays.asList(name)).call().get(name);
|
||||
public static UUID getUUIDOf(String name) throws IOException, InterruptedException {
|
||||
return new UUIDFetcher(Collections.singletonList(name)).call().get(name);
|
||||
}
|
||||
|
||||
public static UUID getUUIDOfThrottled(String name) throws Exception {
|
||||
return new UUIDFetcher(Arrays.asList(name), true).call().get(name);
|
||||
public static UUID getUUIDOfThrottled(String name) throws IOException, InterruptedException {
|
||||
return new UUIDFetcher(Collections.singletonList(name), true).call().get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, UUID> call() throws Exception {
|
||||
public Map<String, UUID> call() throws IOException, InterruptedException {
|
||||
Map<String, UUID> uuidMap = new HashMap<>();
|
||||
int requests = (int) Math.ceil(names.size() / PROFILES_PER_REQUEST);
|
||||
for (int i = 0; i < requests; i++) {
|
||||
HttpURLConnection connection = createConnection();
|
||||
String body = JSONArray.toJSONString(names.subList(i * 100, Math.min((i + 1) * 100, names.size())));
|
||||
List<String> namesToFetch = names.subList(i * 100, Math.min((i + 1) * 100, names.size()));
|
||||
String body = gson.toJson(namesToFetch);
|
||||
writeBody(connection, body);
|
||||
JSONArray array = (JSONArray) jsonParser.parse(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8));
|
||||
for (Object profile : array) {
|
||||
JSONObject jsonProfile = (JSONObject) profile;
|
||||
String id = (String) jsonProfile.get("id");
|
||||
String name = (String) jsonProfile.get("name");
|
||||
JsonArray array = gson.fromJson(new InputStreamReader(connection.getInputStream(), UTF_8), JsonArray.class);
|
||||
for (JsonElement profile : array) {
|
||||
JsonObject jsonProfile = profile.getAsJsonObject();
|
||||
String id = jsonProfile.get("id").getAsString();
|
||||
String name = jsonProfile.get("name").getAsString();
|
||||
UUID uuid = UUIDFetcher.getUUID(id);
|
||||
uuidMap.put(name, uuid);
|
||||
}
|
||||
|
||||
@@ -24,19 +24,19 @@ public class UUIDMigration {
|
||||
}
|
||||
}
|
||||
|
||||
public static UUID getForcedPlayerUUID(String playerDisplayName) {
|
||||
Player onlinePlayer = SimpleClans.getInstance().getServer().getPlayerExact(playerDisplayName);
|
||||
@SuppressWarnings("deprecation")
|
||||
OfflinePlayer offlinePlayer = SimpleClans.getInstance().getServer().getOfflinePlayer(playerDisplayName);
|
||||
public static UUID getForcedPlayerUUID(String playerName) {
|
||||
Player player = Bukkit.getPlayerExact(playerName);
|
||||
|
||||
if (onlinePlayer != null) {
|
||||
return onlinePlayer.getUniqueId();
|
||||
if (player != null) {
|
||||
return player.getUniqueId();
|
||||
} else {
|
||||
for (ClanPlayer cp : SimpleClans.getInstance().getClanManager().getAllClanPlayers()) {
|
||||
if (cp.getName().equalsIgnoreCase(playerDisplayName)) {
|
||||
if (cp.getName().equalsIgnoreCase(playerName)) {
|
||||
return cp.getUniqueId();
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(playerName);
|
||||
return offlinePlayer.getUniqueId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ settings:
|
||||
list-default-order-by: kdr
|
||||
lore-length: 36
|
||||
past-clans-limit: 10
|
||||
username-regex: '^\**[a-zA-Z0-9_$]{1,16}$'
|
||||
username-regex: '^(\.|\*){0,1}[a-zA-Z0-9_$]{1,16}$'
|
||||
war-and-protection:
|
||||
war-enabled: false
|
||||
land-sharing: true
|
||||
@@ -155,6 +155,17 @@ clan:
|
||||
max-alliances: -1
|
||||
min-size-to-set-ally: 3
|
||||
min-to-verify: 1
|
||||
starter-ranks:
|
||||
- recruit:
|
||||
display-name: "&7Recruit"
|
||||
permissions: [ stats, kills, mostkilled, rank.list ]
|
||||
- ambassador:
|
||||
display-name: "&bAmbassador"
|
||||
permissions: [ ally.chat, ally.add, ally.remove, rival.add, rival.remove, war.end, war.start ]
|
||||
- treasurer:
|
||||
display-name: "&6Treasurer"
|
||||
permissions: [ bank.balance, bank.deposit, bank.withdraw ]
|
||||
|
||||
tasks:
|
||||
collect-upkeep:
|
||||
hour: 1
|
||||
@@ -174,6 +185,7 @@ page:
|
||||
leader-color: '4'
|
||||
separator: '-'
|
||||
size: 100
|
||||
help-size: 10
|
||||
clanchat:
|
||||
enable: true
|
||||
tag-based-clan-chat: false
|
||||
|
||||
@@ -493,6 +493,7 @@ 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
|
||||
home.set.in.different.server=Home-base was set in a different server
|
||||
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
|
||||
|
||||
@@ -7,12 +7,20 @@ setdefault.command=الوضع الإفتراضي
|
||||
removedefault.command=إزالة الافتراضي
|
||||
permissions.command=الصلاحيّات
|
||||
list.command=قائمة
|
||||
balance.command=الرصيد
|
||||
list.order.asc=تصاعدي
|
||||
list.order.desc=تنازلي
|
||||
list.type.name=الإسم
|
||||
list.type.kdr=نسبة القتل / الموت
|
||||
list.type.size=الحجم
|
||||
list.type.founded=وجدت
|
||||
list.type.active=نشط
|
||||
land.command=أرض
|
||||
break.command=كسر
|
||||
interact.command=تفاعل
|
||||
damage.command=الأضرار
|
||||
container.command=حاوية
|
||||
confirm.command=تأكيد
|
||||
profile.command=الملف الشخصى
|
||||
roster.command=القائمة
|
||||
lookup.command=إبحث
|
||||
@@ -20,6 +28,7 @@ leaderboard.command=لائحة المتصدرين
|
||||
alliances.command=إتحاد
|
||||
rivalries.command=المنافسات
|
||||
vitals.command=الحيوية
|
||||
coords.command=الأحداثيات
|
||||
stats.command=الحالة
|
||||
ally.command=حليف
|
||||
add.command=إضافة
|
||||
@@ -61,7 +70,13 @@ unban.command=إلغاء الحظر
|
||||
reload.command=إعادة التحميل
|
||||
kills.command=تعداد القتل
|
||||
war.command=الحَرْبُ
|
||||
start.command=إبدأ
|
||||
end.command=نهاية
|
||||
home.command=المنزل
|
||||
regroup.command=إعادة تجميع
|
||||
me.command=لي
|
||||
tp.command=أنتقال
|
||||
place.command=مرتبة
|
||||
acf-core.parameter.member=عضو
|
||||
acf-core.parameter.rank=الرتبة
|
||||
acf-core.parameter.displayname=اسم العرض
|
||||
@@ -69,13 +84,18 @@ acf-core.parameter.tag=العلامة
|
||||
acf-core.parameter.name=الإسم
|
||||
acf-core.parameter.fee=الرسوم
|
||||
acf-core.parameter.description=الوصف
|
||||
acf-core.parameter.player=لاعب
|
||||
acf-core.parameter.clan=فريق
|
||||
alliances=إتحاد
|
||||
coords=الأحداثيات
|
||||
rivalries=المنافسات
|
||||
roster=القائمة
|
||||
stats=الحالة
|
||||
vitals=الحيوية
|
||||
profile=الملف الشخصى
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
start=إبدأ
|
||||
end=نهاية
|
||||
add=إضافة
|
||||
remove=إزالة
|
||||
allow=السماح
|
||||
|
||||
@@ -372,6 +372,7 @@ clan.with.this.tag.already.exists=Klan s tímto názvem již existuje
|
||||
get.your.clan.verified.to.access.advanced.features=Pro přístup k pokročilým funkcím ověřte váš klan
|
||||
clan.created=Klan {0} vytvořen
|
||||
not.enough.leaders.online.to.vote.on.demotion=Není k dispozici dostatek vedoucích představitelů online aby mohli hlasovat o tomto snížení
|
||||
player.is.not.a.leader.of.your.clan=CHráč není členem žádného klanu
|
||||
clan.has.been.disbanded=Klan {0} byl rozpuštěn
|
||||
clan.0=Klan\: {0}
|
||||
status.0=Status\: {0}
|
||||
|
||||
@@ -503,7 +503,7 @@ your.clans.are.already.rivals=Eure Clans sind bereits Rivalen
|
||||
player.got.money=Du hast für das töten von {1} Spielern basieren auf deiner KDR ({2}) {0} Geld bekommen
|
||||
cleared.bb=Das schwarze Brett wurde gelöscht
|
||||
clan.balance=Clan-Kontostand\: {0}
|
||||
clan.admin.balance={0}''s Kontostand\: {1}$
|
||||
clan.admin.balance={0}'s Kontostand\: {1}$
|
||||
bb.fee.player.kicked={0} wurde aus dem Clan geschmissen, da er/sie die Clangebühr nicht bezahlt hat
|
||||
bb.fee.set=Die Clangebühr beträgt {0} $
|
||||
bb.clan.deposit=Es wurden {0} $ überwiesen
|
||||
@@ -515,7 +515,7 @@ bb.clan.set=Dein Kontostand wurde auf {0} $ gesetzt von {1}
|
||||
player.clan.withdraw=Du hast {0} abgebucht
|
||||
clan.admin.take=Du hast {0} $ von {1}s Konto abgehoben
|
||||
clan.admin.give=Du hast {0} $ an die Bank von {1} gegeben
|
||||
clan.admin.set=Du hast {0}''s Bankkonto auf {1} gesetzt
|
||||
clan.admin.set=Du hast {0}'s Bankkonto auf {1} gesetzt
|
||||
clan.admin.bank.not.enough.money=Das Konto von {0} verfügt nicht über genügend Geld.
|
||||
clan.bank.not.enough.money=Das Konto von deinem Clan ist nicht ausreichend gedeckt
|
||||
your.clans.are.not.rivals=Eure Clans sind keine Rivalen
|
||||
@@ -563,7 +563,7 @@ disabled.command=Deaktivierter Befehl
|
||||
rank.displayname.updated=Der Anzeigename des Ranges wurde aktualisiert\!
|
||||
rank.setdefault=Der Standardrang des Clans wurde zu {0} gesetzt
|
||||
rank.removedefault=Der Standardrang des Clans wurde entfernt
|
||||
rank.0.permissions=Rang {0}''s Berechtigungen\:
|
||||
rank.0.permissions=Rang {0}'s Berechtigungen\:
|
||||
available.rank.permissions=Verfügbare Berechtigungen für Ränge\:
|
||||
rank.already.exists=Rang existiert bereits
|
||||
rank.0.does.not.exist=Rang {0} existiert nicht
|
||||
@@ -667,7 +667,7 @@ gui.ranks.rank.displayname.lore=&7Anzeigename\: &b{0}
|
||||
gui.ranks.rank.remove.lore=&7Rechtsklick um diesen Rang zu entfernen
|
||||
gui.ranks.rank.edit.permissions.lore=&7Linksklick um die Berechtigung des Rangs zu bearbeiten
|
||||
gui.ranks.rank.assign.lore=&7Linksklick um den Rang zu {0} zuzuweisen
|
||||
gui.permissions.title={0}''s Berechtigungen
|
||||
gui.permissions.title={0}'s Berechtigungen
|
||||
gui.permissions.add.title=&fFüge Berechtigungen hinzu
|
||||
gui.permissions.permission.title=&f{0}
|
||||
gui.permissions.permission.lore=&7Rechtsklick um diese Berechtigung von von dem Rang zu entfernen
|
||||
|
||||
@@ -493,6 +493,7 @@ 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
|
||||
home.set.in.different.server=La base inicial fue establecida en un servidor diferente
|
||||
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
|
||||
|
||||
@@ -123,6 +123,7 @@ command.description.land.block.break=Bloque les membres du clan de casser des bl
|
||||
command.description.land.block.damage=Empêche les membres du clan de causer des dommages sur votre terrain
|
||||
command.description.stats=Montre les stats des membres de votre clan
|
||||
command.description.rivalries=Voir tous les rivaux du clan
|
||||
command.description.mostkilled=Montre le nombre le plus tué sur tout le serveur
|
||||
command.description.kills=Voir votre nombre de kills ou celui d'un autre joueur
|
||||
command.description.lookup=Recherchez vos informations
|
||||
command.description.lookup.other=Recherchez les informations d'un joueurs
|
||||
@@ -164,10 +165,12 @@ command.description.kick=Expulse un membre de votre clan
|
||||
command.description.bb.display=Affichez le bulletin de votre clan
|
||||
command.description.bb.clear=Effacez le bulletin de votre clan
|
||||
command.description.bb.post=Postez un message sur le bulletin de votre clan
|
||||
command.description.mod.bb.display=Affiche le tableau de bord d'un clan
|
||||
command.description.place=Place un joueur dans un clan
|
||||
command.description.reload=Recharge le plugin et sa configuration
|
||||
command.description.trust=Fait confiance à un membre
|
||||
command.description.untrust=Ne fait plus confiance à un membre
|
||||
command.description.resign=Rejette de votre clan
|
||||
command.description.ally.add=Ajoute un allié
|
||||
command.description.clan=Ouvre l'interface
|
||||
command.description.disband=Dissoudre votre clan
|
||||
@@ -243,18 +246,18 @@ kill.death.ratio=Ratio de Tué/Mort
|
||||
nokillsfound=Pas de Morts Trouvés
|
||||
promoted.to.leader={0} a été promu chef
|
||||
denied.demotion={0} a refusé la rétrogradation de {1}. Le consensus a échoué.
|
||||
membership.invitation={0} a refusé l''invitation à rejoindre
|
||||
membership.invitation={0} a refusé l'invitation à rejoindre
|
||||
joined.the.clan={0} a rejoint le clan
|
||||
signed.off.request.cancelled={0} s''est déconnecté. Demande {1} annulée.
|
||||
signed.off.request.cancelled={0} s'est déconnecté. Demande {1} annulée.
|
||||
clan.deletion={0} a refusé la suppression du clan. Le consensus a échoué.
|
||||
has.been.disbanded=Le clan {0} a été dissous
|
||||
denied.the.promotion={0} a refusé la promotion de {1}. Le consensus a échoué.
|
||||
demoted.back.to.member={0} a été rétrogradé en tant que membre
|
||||
peace.agreement.denied=L''accord de paix avec {0} a été refusé
|
||||
peace.agreement.denied=L'accord de paix avec {0} a été refusé
|
||||
denied.to.make.peace={0} a refusé de faire la paix avec {1}
|
||||
broken.the.rivalry={0} a rompu la rivalité avec {1}
|
||||
broken.the.rivalry.with={0} a rompu la rivalité avec {1}
|
||||
the.alliance.was.denied=L''alliance avec {0} a été refusée
|
||||
the.alliance.was.denied=L'alliance avec {0} a été refusée
|
||||
denied.an.alliance={0} a refusé une alliance avec {1}
|
||||
accepted.an.alliance={0} a accepté une alliance avec {1}
|
||||
created.an.alliance={0} a créé une alliance avec {1}
|
||||
@@ -266,6 +269,8 @@ asking.for.the.deletion={0} demande la suppression du clan
|
||||
asking.for.the.promotion={0} demande la promotion de {1}
|
||||
asking.for.the.demotion={0} demande la rétrogradation de {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
hover.click.to.accept=Cliquez ici pour accepter
|
||||
hover.click.to.deny=&cCliquez ici pour refuser
|
||||
account.has.been.debited=Votre compte a été débité {0}
|
||||
mysql.connection.successful=MySQL Connexion réussie
|
||||
mysql.connection.failed=MySQL Échec de la connexion
|
||||
@@ -284,7 +289,7 @@ view.next.page=Tapez /{0} pour voir la page suivante.
|
||||
voted.to.accept={0} a voté pour accepter
|
||||
bulletin.board.header={0}* {1}{2} tableau d’affichage
|
||||
has.been.disbanded.rivalry.ended={0} a été dissous. Rivalité terminée.
|
||||
has.been.disbanded.alliance.ended={0} a été dissous. L''alliance est terminée.
|
||||
has.been.disbanded.alliance.ended={0} a été dissous. L'alliance est terminée.
|
||||
clan.disbanded=Clan Dissous
|
||||
1.color.day=1 {0}jour
|
||||
many.color.days={0}{1} jours
|
||||
@@ -293,7 +298,7 @@ clan.is.not.verified=Le clan n'est pas vérifié
|
||||
not.a.member.of.any.clan=Vous n'êtes membre d'aucun clan
|
||||
minimum.to.make.alliance=Votre clan doit avoir au moins {0} joueurs pour faire des alliances
|
||||
your.clans.are.not.allies=Vos clans ne sont pas alliés
|
||||
has.broken.the.alliance={0} a rompu l''alliance avec {1}
|
||||
has.broken.the.alliance={0} a rompu l'alliance avec {1}
|
||||
at.least.one.leader.accept.the.alliance=Au moins un chef de l'alliance doit être en ligne pour accepter l'alliance
|
||||
leaders.have.been.asked.for.an.alliance={0} chefs ont été consulté pour une alliance
|
||||
your.clans.are.already.allies=Vos clans sont déjà alliés
|
||||
@@ -312,11 +317,11 @@ your.tag.cannot.contain.the.following.colors=Votre tag de clan ne peut pas conte
|
||||
your.tag.cannot.contain.color.codes=Votre tag ne peut pas contenir des codes de couleur
|
||||
you.cannot.set.colored.ranks=Vous ne pouvez pas définir de rangs colorés
|
||||
your.clan.name.cannot.be.longer.than.characters=Votre tag de clan ne peut pas dépasser {0} caractères
|
||||
your.clan.name.must.be.longer.than.characters=Le nom d''utilisateur doit être composé de plus de {0} caractères
|
||||
your.clan.name.must.be.longer.than.characters=Le nom d'utilisateur doit être composé de plus de {0} caractères
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=Le tag de votre clan ne peut contenir que des lettres, des chiffres et des codes de couleur
|
||||
your.clan.name.cannot.contain.color.codes=Votre tag ne peut pas contenir des codes de couleur
|
||||
that.tag.name.is.disallowed=Ce nom de tag n'est pas autorisé
|
||||
you.must.first.resign=Vous devez d''abord démissionner de {0}
|
||||
you.must.first.resign=Vous devez d'abord démissionner de {0}
|
||||
clan.with.this.tag.already.exists=Un clan avec cette étiquette existe déjà
|
||||
get.your.clan.verified.to.access.advanced.features=Faites vérifier votre clan pour accéder aux fonctionnalités avancées
|
||||
clan.created=Clan {0} créé
|
||||
@@ -469,8 +474,8 @@ fee.set=Les frais ont été définis avec succès
|
||||
max.fee.allowed.is.0=Les frais maximaux autorisés sont de {0}
|
||||
fee.collected={0} $ ont été retirés pour les frais de clan
|
||||
player.purged=Le joueur a bien été purgé
|
||||
upkeep.collected={0} $ ont été retirés pour l''entretien
|
||||
balance.is.not.enough.for.upkeep=Le solde du clan n''est pas suffisant pour payer l''entretien ({0} $), déposez le montant pour éviter d''être dissous
|
||||
upkeep.collected={0} $ ont été retirés pour l'entretien
|
||||
balance.is.not.enough.for.upkeep=Le solde du clan n'est pas suffisant pour payer l'entretien ({0} $), déposez le montant pour éviter d'être dissous
|
||||
your.clan.description.must.be.longer.than=La description de votre clan doit faire plus de {0} caractères
|
||||
your.clan.description.cannot.be.longer.than=La description de votre clan doit faire plus de {0} caractères
|
||||
description.changed=Vous avez modifié avec succès la description du clan
|
||||
@@ -481,7 +486,7 @@ rank.displayname.updated=Le nom d'affichage du rang a été mis à jour \!
|
||||
rank.0.permissions=Permissions du rang {0}\:
|
||||
available.rank.permissions=Permissions disponibles pour les rangs\:
|
||||
rank.already.exists=Le rang existe déjà
|
||||
rank.0.does.not.exist=Le rang {0} n''existe pas
|
||||
rank.0.does.not.exist=Le rang {0} n'existe pas
|
||||
rank.created=Rang créé
|
||||
permission.0.added.to.rank.1=Permission {0} ajoutée au rang {1}
|
||||
permission.0.removed.from.rank.1=Permission {0} supprimée du rang {1}
|
||||
@@ -629,7 +634,7 @@ gui.staffclandetails.disband.lore=&7Clic gauche pour dissoudre ce clan
|
||||
gui.clandetails.chat.title=&fChat
|
||||
gui.clandetails.chat.clan.chat.lore=&7/{0} [message] - Envoie un message au chat du clan
|
||||
gui.clandetails.chat.clan.join.leave.lore=&7/{0} {1}/{2} - &bRejoindre/quitte le chat du clan
|
||||
gui.clandetails.chat.ally.chat.lore=&7/{0} [message] - Envoie un message au chat d''allié
|
||||
gui.clandetails.chat.ally.chat.lore=&7/{0} [message] - Envoie un message au chat d'allié
|
||||
gui.clandetails.chat.clan.status.lore=&fClan\: {0}
|
||||
gui.playerdetails.title={0}
|
||||
gui.playerdetails.player.title=&f{0}
|
||||
@@ -640,7 +645,7 @@ gui.playerdetails.player.lore.status=&fStatus\: {0}
|
||||
gui.playerdetails.player.lore.kdr=&fKDR\: {0}
|
||||
gui.playerdetails.player.lore.kill.totals=&fNombre de meurtres\: [Rival\:{0} Neutre\:{1} Civile\:{2}]
|
||||
gui.playerdetails.player.lore.deaths=&fMorts\: {0}
|
||||
gui.playerdetails.player.lore.join.date=&fDate d''adhésion\: {0}
|
||||
gui.playerdetails.player.lore.join.date=&fDate d'adhésion\: {0}
|
||||
gui.playerdetails.player.lore.last.seen=&fVu pour la dernière fois\: {0}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
gui.playerdetails.player.lore.past.clans.separator=&b,
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
description.command=תיאור
|
||||
create.command=צור
|
||||
delete.command=למחוק
|
||||
rank.command=דרוג
|
||||
permissions.command=הרשאה
|
||||
list.command=רשימה
|
||||
acf-core.parameter.rank=דרוג
|
||||
acf-core.parameter.description=תיאור
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
|
||||
@@ -225,6 +225,7 @@ command.description.rank.setdisplayname=Beállítja a rang megjelenítési nevé
|
||||
command.description.rank.setdefault=Alapértelmezett rang beállítása
|
||||
command.description.rank.removedefault=Alapértelmezett rang törlése
|
||||
command.description.rank.permissions.available=Felsorolja az elérhető rangsorolási engedélyeket
|
||||
command.description.rank.permissions.rank=Rangod jogainak megtekintése
|
||||
command.description.rank.permissions.add=Hozzáad egy jogot a ranghoz
|
||||
command.description.rank.permissions.remove=Megvon egy jogot a rangtól
|
||||
home-menu=/{0} home{1} - Teleportálás a klán hazai bázisához
|
||||
@@ -256,6 +257,7 @@ leader=vezető
|
||||
roster=névsor
|
||||
trusted=megbízható
|
||||
untrusted=megbízhatatlan
|
||||
in.rank=rangban
|
||||
deaths=Halálok
|
||||
weights=Súlyok
|
||||
stats=statisztikák
|
||||
@@ -310,6 +312,7 @@ clickable.accept=&a&l[ELFOGADÁS]
|
||||
clickable.deny=&c&l[ELUTASÍTÁS]
|
||||
hover.click.to.accept=&aKattints hogy elfogadd
|
||||
hover.click.to.deny=&cKattints hogy elutasítsd
|
||||
not.sufficient.money=Nincs elegendő pénz a fiókodon (szükséges\: {0} $)
|
||||
account.has.been.debited=A fiókod terhelésre került {0}
|
||||
mysql.connection.successful=MySQL kapcsolat sikeres
|
||||
mysql.connection.failed=MySQL kapcsolat sikertelen
|
||||
@@ -338,6 +341,7 @@ clan.is.not.verified=A klán nem ellenőrzött
|
||||
player.not.a.member.of.any.clan=&cA játékos nem tagja bármilyen klánnak
|
||||
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
|
||||
cannot.be.same.clan=&cIllessz be a tiedtől eltérő clan-t\!
|
||||
other.clan.not.verified=&cAz a klán nem hitelesített\!
|
||||
your.clans.are.not.allies=A klánod nem szövetségesek
|
||||
has.broken.the.alliance={0} megszakította a szövetséget {1}
|
||||
@@ -352,6 +356,7 @@ you.banned=Kitiltottad a klánparancsokból
|
||||
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
|
||||
you.are.the.only.member.online=Te vagy az egyetlen tag online
|
||||
your.clan.color.tag.cannot.be.longer.than.characters=&cA klánod színezett tag-je nem lehet több {0} karakternél
|
||||
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}
|
||||
@@ -366,6 +371,7 @@ 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=Nincs elegendő vezető online hogy megszavazd ezt
|
||||
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
|
||||
player.is.not.a.leader=A játékos nem egy vezető
|
||||
@@ -400,6 +406,7 @@ inactive.0=Elérhetetlen(ek)\: {0}
|
||||
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}
|
||||
0.tag.changed.to.1=&bSikeresen megváltoztattad {0} tagját erre\: {1}
|
||||
name.0=Név\: {0}
|
||||
description.0=Leírás\: {0}
|
||||
leaders.0=Vezetők\: {0}
|
||||
@@ -502,14 +509,31 @@ bb.fee.set=Az adó {0} $
|
||||
bb.clan.deposit={0} $-t letétbe helyezett {1}
|
||||
player.clan.deposit=Letétbe helyezted {0}
|
||||
bb.clan.withdraw={0} $-t kivet {1}
|
||||
bb.clan.take={0} $-t kivett {1}
|
||||
bb.clan.give={0} $-t adott {1}
|
||||
bb.clan.set={0} $-ra lett szabva általa\: {1}
|
||||
player.clan.withdraw=Visszavonsz {0}
|
||||
clan.admin.take=Elvettél {0} $-t {1} bankjából
|
||||
clan.admin.give=Adtál {0} $-t neki\: {1}
|
||||
clan.admin.set=Átszabtad {0} egyenlegét ennyire\: {1}
|
||||
clan.admin.bank.not.enough.money={0} bankjában nincs elég pénze\!
|
||||
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
|
||||
the.clan.members.reached.limit=A klánod elérte a tag limitet
|
||||
this.clan.has.reached.the.member.limit=&bEz a klán elérte a tag limitet
|
||||
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
|
||||
you.have.toggled.permanent.status={0} -nak/nek átállítottad a végleges státuszát
|
||||
permanent.status.enabled=A klánod végleges státusza be lett kapcsolva {0} által
|
||||
permanent.status.disabled=A klánod végleges státusza ki lett kapcsolva {0} által
|
||||
yes=Igen
|
||||
cancel=Mégse
|
||||
resign.confirmation=Biztos, hogy el akarod hagyni a klánt? {0}
|
||||
disband.confirmation=Biztos, hogy fel akarod oszlatni a klánod? {0}
|
||||
resign.success=Sikeresen kiléptél a klánból
|
||||
you.cannot.demote.the.last.leader=Nem fokozhatod le az utolsó vezetőt
|
||||
you.cannot.move.the.last.leader=Nem mozdíthatod az utolsó vezetőt
|
||||
player.successfully.demoted=A játékos sikeresen le lett fokozva
|
||||
player.successfully.promoted=A játékos sikeresen fel lett fokozva
|
||||
bb.ago= \ ezelőtt
|
||||
@@ -617,6 +641,7 @@ gui.add.permission.permission.title=&f{0}
|
||||
gui.clandetails.title=[{0}] {1}
|
||||
gui.clandetails.free.agent.create.clan.price.lore=&7Ár\: &b{0}
|
||||
gui.clandetails.clan.title=&f[{0}&f] {1}
|
||||
gui.clandetails.clan.lore.description=&7Leírás\: &b{0}
|
||||
gui.clandetails.clan.lore.status=&7Állapot\: &b{0}
|
||||
gui.clandetails.clan.lore.kdr=&7KDR\: &b{0}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -657,10 +682,17 @@ gui.playerdetails.promote.demote.title=&fFokozás/Lefokozás
|
||||
gui.playerdetails.promote.lore.left.click=&7Bal-klikk a felfokozáshoz
|
||||
gui.playerdetails.demote.lore.right.click=&7Jobb-klikk a lefokozáshoz
|
||||
gui.playerdetails.ban.unban.title=&fTiltás/Tiltás visszavonása
|
||||
gui.languageselector.title=Nyelvek - Jelenlegi\: {0}
|
||||
gui.languageselector.language.title=&f{0}
|
||||
gui.languageselector.language.lore.left.click=&7Bal klikk, hogy beállítsd ezt a fordítást
|
||||
gui.languageselector.language.lore.translation.status=&7Fordítási státusz\: &b{0}%
|
||||
gui.languageselector.language.lore.right.click=&7Bal-klikk hogy segítsd a fordítást
|
||||
gui.confirmation.title=Megerősítés
|
||||
gui.not.supported=&cHiba történt a GUI megnyitása közben\! Kikapcsolása... Biztos a jó verziót töltötted le?
|
||||
staff.member.verify.clan=&cEgy staffnak hitelesítenie kell a klánodat\!
|
||||
player.already.has.that.rank=&cEnnek a játékosnak már ez a rankja\!
|
||||
joined.clan.chat=&bCsatlakoztál a klán csevegéshez
|
||||
already.joined.clan.chat=&bMár csatlakoztál a klán csevegéshez
|
||||
left.clan.chat=&bKiléptél a klán csevegésből
|
||||
muted.clan.chat=&bNémítottad a klán csevegőt
|
||||
unmuted.clan.chat=&bFeloldottad a klán csevegőt
|
||||
@@ -668,7 +700,16 @@ joined.ally.chat=&bBeléptél a szövetséges csevegőbe
|
||||
left.ally.chat=&bKiléptél a szövetséges csevegésből
|
||||
muted.ally.chat=&bNémítottad a szövetséges csevegőt
|
||||
unmuted.ally.chat=&bFeloldottad a szövetséges csevegőt
|
||||
already.joined.ally.chat=&bMár csatlakoztál a szövetséges csevegéshez
|
||||
player.already.in.this.clan=&cEz a játékos már ebben a klánban van
|
||||
your.clan.reached.max.alliances=&cA klánodnak nem lehetnek több szövetségesei
|
||||
other.clan.reached.max.alliances=&cA másik klánnak már nem lehet több szövetségese
|
||||
insert.clan.tag=&bÍrd be a klán taget (vagy "{0}")\:
|
||||
insert.clan.name=&bÍrd be a klánodnak a nevét\:
|
||||
insert.rank.name=&bÍrd be a rank nevét (vagy "{0}")\:
|
||||
click.to.help.translating=&bKlikk erre a linkre, hogy segíts a fordításban\:\n&r{0}
|
||||
your.clan.must.have.members.to.verify=&cA klánodban minimum {0} tagnak kell lennie, hogy hitelesítve legyen\!
|
||||
you.must.hold.a.banner=&cEgy bannernek kell a kezedben lennie\!
|
||||
you.changed.clan.banner=Megváltoztattad a klánod zászlaját\!
|
||||
your.clan.already.verified=&cA te klánod már ellenőrizve van\!
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
@@ -677,22 +718,45 @@ player.lookup.clanname=&e[&8%clan_color_tag%&e] &b%clan_name%
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
player.lookup.killtype=&7Ölés típusa\: %player_kill_type%
|
||||
player.lookup=\n&b%player_name%&7 információ &8-------------------------------------------\n \n &7Klán\: &f%clan_name%\n &7Ranf\: &f%player_rank%\n &7Állapot\: &f%player_status%\n &7ÖHR\: &e%player_kdr%\n &7Ölések\: &8[Rivális\:&f%player_rival_kills% &8Szövetséges\:&7%player_ally_kills% &8Semleges\:&f%player_neutral_kills% &8Civil\:&f%player_civilian_kills%&8]\n &7Halálok\: &f%player_deaths%\n &7Csatlakozás\: &f%player_join_date%\n &7Utoljára látva\: &f%player_last_seen%\n &7Előző klánok\: &f%player_past_clans%\n &7Inaktív\: &f%player_inactive_days%&7/&f%player_max_inactive_days% days\n %kill_type_line%
|
||||
economy.disabled=&cGazdaság kikapcsolva\!
|
||||
has.been.purged={0} adatai törölve lettek
|
||||
accepted.invitation=&bElfogadtad {0} meghívását
|
||||
denied.invitation=&bElutasítottad {0} meghívását
|
||||
must.be.in.clan.to.pvp=&cNeked meg {0} játékosnak klán tagnak kell lennetek a PvP-hez\!
|
||||
clans.not.at.war.pvp.denied=&cA klánod csatában áll {0} klánnal\!
|
||||
cannot.attack.civilians=&cNem támadhatsz meg civileket\!
|
||||
cannot.attack.clan.member=&cNem támadhatod meg a klán tagokat\!
|
||||
cannot.attack.ally=&cNem támadhatsz egy szövetségest\!
|
||||
cannot.send.discord.message=Nem küldhetsz üzeneteket {0} klánba, nem vagy a tagjuk\!
|
||||
discordhook.is.disabled=&cDiscordos összekapcsolás ki van kapcsolva, vagy nem érhető el\!
|
||||
your.clan.doesnt.have.any.linked.player=A klánodnak nincsenek linkelt játékosai
|
||||
your.clan.doesnt.have.minimum.linked.player=A klánodnak nincs meg a minimum linkelt játékosok száma
|
||||
your.clan.is.not.on.the.whitelist=A klánod nem fehérlistás
|
||||
your.clan.already.has.channel=A klánodnak már van Discord csatornája
|
||||
discord.reached.category.limit=Discord elérte a kategória limitet\!
|
||||
discord.reached.channels.limit=Discord elérte a csatorna limitet\!
|
||||
discord.created.successfully=&bDiscord csatorna sikeresen létrehozva\!
|
||||
you.did.not.link.your.account=Nem linkelted az accountod\!
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
cannot.change.member.fee.now=&cNem változtathatod meg a tagdíjat közel a begyűjtéséhez.
|
||||
cannot.change.member.fee.hours=&cPróbáld újra {0} óra múlva...
|
||||
cannot.change.member.fee.minutes=&cPróbáld újra {0} perc múlva...
|
||||
cannot.kick.last.leader=&cNem rúghatod ki az utolsó vezetőt\!
|
||||
cannot.disband.permanent=&cNem oszthatod fel ezt a klánt, végleges státusza van.
|
||||
you.can.only.set.base.in.your.land=&cCsak a saját területeden tehetsz le otthont\!
|
||||
only.leaders.can.create.lands=&cCsak a vezetők tudnak birtokot létrehozni\!
|
||||
only.one.land.per.clan=&cA klánodnak már van területe\!
|
||||
only.clan.members.can.create.lands=&cCsak a klán tagok tudnak birtokot létrehozni\!
|
||||
land.allowed.all.actions=&bMinden tevénykenség mostantól engedélyezett\!
|
||||
land.blocked.all.actions=&bMinden tevénykenség mostantól tiltott\!
|
||||
land.allowed.action=&bEngedélyezett tevénykenség\!
|
||||
land.blocked.action=&bTiltott tevénykenség\!
|
||||
you.do.not.own.lands=&cEz nem a te birtokod\!
|
||||
land.sharing.disabled=&cTerület megosztás kikapcsolva\!
|
||||
clan.chat.disabled=&cKlán chat tiltva van\!
|
||||
ally.chat.disabled=&cSzövetséges csevegés kikapcsolva\!
|
||||
war.expired=A háború {0} klánnal befejeződött\!
|
||||
you.cant.start.war.online.members.difference=Nem indíthatsz csatát. Egyik klán túlerőben van.
|
||||
invitedplayer.invite.off=Ez a játékos letiltotta a klán meghívásokat
|
||||
user.hasnt.played.before=&cEz a felhasználó nem játszott előtte
|
||||
clan.list.balance.header=\n{0} &7leggazdagabb klán &8-----------------------\n \n&8Klánok\: &7{1}\n \n&8\#&7. &8Klán &7- &8Egyenleg
|
||||
|
||||
@@ -284,37 +284,42 @@ kill.death.ratio=Rapporto Uccisioni/Morti
|
||||
nokillsfound=Nessuna uccisione trovata
|
||||
promoted.to.leader={0} è stato promosso al leader
|
||||
denied.demotion={0} ha negato la promozione di {1}. Consenso fallito.
|
||||
membership.invitation={0} ha rifiutato l''invito di adesione
|
||||
membership.invitation={0} ha rifiutato l'invito di adesione
|
||||
joined.the.clan={0} si è unito al clan
|
||||
signed.off.request.cancelled={0} si è disconnesso. {1} richiesta annullata.
|
||||
clan.deletion={0} ha negato l''eliminazione del clan. Consenso fallito.
|
||||
clan.deletion={0} ha negato l'eliminazione del clan. Consenso fallito.
|
||||
has.been.disbanded=Il Clan {0} è stato sciolto
|
||||
denied.the.promotion={0} ha negato la promozione di {1}. Consenso fallito.
|
||||
demoted.back.to.member={0} è stato degradato di nuovo a membro
|
||||
peace.agreement.denied=L''accordo di pace con {0} è stato negato
|
||||
peace.agreement.denied=L'accordo di pace con {0} è stato negato
|
||||
denied.to.make.peace={0} ha negato di fare la pace con {1}
|
||||
broken.the.rivalry={0} ha rotto la rivalità con {1}
|
||||
broken.the.rivalry.with={0} ha rotto la rivalità con {1}
|
||||
the.alliance.was.denied=L''alleanza con {0} è stata negata
|
||||
denied.an.alliance={0} ha negato un''alleanza con {1}
|
||||
accepted.an.alliance={0} ha accettato un''alleanza con {1}
|
||||
created.an.alliance={0} ha creato un''alleanza con {1}
|
||||
the.alliance.was.denied=L'alleanza con {0} è stata negata
|
||||
denied.an.alliance={0} ha negato un'alleanza con {1}
|
||||
accepted.an.alliance={0} ha accettato un'alleanza con {1}
|
||||
created.an.alliance={0} ha creato un'alleanza con {1}
|
||||
has.joined={0} si è unito a {1}
|
||||
proposing.to.end.the.rivalry={0} sta proponendo di porre fine alla rivalità con {1}
|
||||
proposing.an.alliance={0} sta proponendo un''alleanza con {1}
|
||||
proposing.an.alliance={0} sta proponendo un'alleanza con {1}
|
||||
inviting.you.to.join={0} ti sta invitando ad unirti a {1}
|
||||
asking.for.the.deletion={0} chiede l''eliminazione del clan
|
||||
asking.for.the.deletion={0} chiede l'eliminazione del clan
|
||||
asking.for.the.promotion={0} chiede la promozione di {1}
|
||||
asking.for.the.demotion={0} chiede la promozione di {1}
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
request.message= \ &8[&8{0}&8] &b{1}\n %accetta% &bor %deny%
|
||||
clickable.accept=&a&l[ACCETTA]
|
||||
clickable.deny=&c&l[RIFIUTA]
|
||||
hover.click.to.accept=&aClicca qui per accettare
|
||||
hover.click.to.deny=&cClicca qui per rifiutare
|
||||
not.sufficient.money=Non hai abbastanza soldi nel tuo conto
|
||||
account.has.been.debited=Il tuo account è stato eliminato
|
||||
mysql.connection.successful=Connessione MySQL riuscita
|
||||
mysql.connection.failed=Connessione MySQL fallita
|
||||
sqlite.connection.successful=Connessione SQLite riuscita
|
||||
sqlite.connection.failed= Connessione SQLite fallita
|
||||
purging.player.data=eliminazione dati del giocatore\: {0}
|
||||
purging.clan=Eliminando il clan
|
||||
clan.players=Giocatori di Clan\: {0}
|
||||
clans=Rango\: {0}
|
||||
banned=Sei bannato dall'usare i comandi del clan
|
||||
@@ -326,7 +331,7 @@ has.voted.to.deny={0} ha votato per negare
|
||||
view.next.page=Digita /{0} per visualizzare la pagina successiva.
|
||||
voted.to.accept={0} ha votato per accettare
|
||||
has.been.disbanded.rivalry.ended={0} è stato sciolto. La rivalità è finita.
|
||||
has.been.disbanded.alliance.ended={0} è stato sciolto. L''alleanza è finita.
|
||||
has.been.disbanded.alliance.ended={0} è stato sciolto. L'alleanza è finita.
|
||||
clan.disbanded=Clan sciolto
|
||||
1.color.day=1 {0}giorno
|
||||
many.color.days={0}{1} giorni
|
||||
@@ -334,13 +339,13 @@ insufficient.permissions=Permessi insufficienti
|
||||
clan.is.not.verified=Il clan non è verificato
|
||||
player.not.a.member.of.any.clan=&cIl giocatore non è membro di nessun clan
|
||||
not.a.member.of.any.clan=Non sei membro di nessun clan
|
||||
minimum.to.make.alliance=Il tuo clan deve avere almeno {0} giocatori per poter fare un''alleanza
|
||||
minimum.to.make.alliance=Il tuo clan deve avere almeno {0} giocatori per poter fare un'alleanza
|
||||
cannot.be.same.clan=&cDevi inserire un clan diverso dal tuo\!
|
||||
other.clan.not.verified=&cL'altro clan non è verificato\!
|
||||
your.clans.are.not.allies=I tuoi clan non sono alleati
|
||||
has.broken.the.alliance={0} ha rotto l''alleanza con {1}
|
||||
has.broken.the.alliance={0} ha rotto l'alleanza con {1}
|
||||
at.least.one.leader.accept.the.alliance=Almeno un leader dell'alleato deve essere online per accettare l'alleanza
|
||||
leaders.have.been.asked.for.an.alliance={0} leader richiedono un''alleanza
|
||||
leaders.have.been.asked.for.an.alliance={0} leader richiedono un'alleanza
|
||||
your.clans.are.already.allies=I tuoi clan sono già alleati
|
||||
your.clan.cannot.create.rivals=Il tuo clan non può creare rivali
|
||||
min.players.rivalries=Il tuo clan deve avere almeno {0} giocatori per poter fare rivalità
|
||||
@@ -591,8 +596,8 @@ player.lookup.clanname=&e[&8%clan_color_tag%&e] &b%clan_name%
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
economy.disabled=&cEconomia disattivata\!
|
||||
has.been.purged=I dati di {0} sono stati eliminati
|
||||
accepted.invitation=&bHai accettato l''invito di {0}
|
||||
denied.invitation=&cHai negato l''invito di {0}
|
||||
accepted.invitation=&bHai accettato l'invito di {0}
|
||||
denied.invitation=&cHai negato l'invito di {0}
|
||||
clans.not.at.war.pvp.denied=&cIl tuo clan non è in guerra con {0}\!
|
||||
cannot.attack.civilians=&cNon puoi attaccare i civili\!
|
||||
cannot.attack.clan.member=&cNon puoi attaccare un altro membro del clan\!
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
description.command=상세정보
|
||||
create.command=만들기
|
||||
delete.command=삭제하다
|
||||
rank.command=랭크
|
||||
setdisplayname.command=이름
|
||||
setdefault.command=기본
|
||||
permissions.command=권한
|
||||
list.command=목록
|
||||
balance.command=잔고
|
||||
list.order.asc=오름차순
|
||||
list.order.desc=설명
|
||||
list.type.name=이름
|
||||
invite.command=초대
|
||||
acf-core.parameter.rank=랭크
|
||||
acf-core.parameter.name=이름
|
||||
acf-core.parameter.description=상세정보
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
|
||||
@@ -229,7 +229,7 @@ command.description.rank.permissions.rank=Geeft een lijst van machtigingen voor
|
||||
command.description.rank.permissions.add=Voegt een toestemming toe aan een rank
|
||||
command.description.rank.permissions.remove=Verwijdert een toestemming van een rank
|
||||
home-menu=/{0} home{1} - Teleport naar home van clan
|
||||
home-set-menu=/{0} home set{1} - Stel de home van de clan'' in
|
||||
home-set-menu=/{0} home set{1} - Stel de home van de clan' in
|
||||
home-clear-menu=/{0} home clear{1} - Verwijder de home base van de clans
|
||||
clan=Clan
|
||||
allies=Bondgenoten
|
||||
@@ -318,7 +318,7 @@ mysql.connection.successful=MySQL verbinding succesvol
|
||||
mysql.connection.failed=MySQL verbinding mislukt
|
||||
sqlite.connection.successful=SQLite verbinding succesvol
|
||||
sqlite.connection.failed= SQLite verbinding mislukt
|
||||
purging.player.data=verwijder speler''s gegevens\: {0}
|
||||
purging.player.data=verwijder speler's gegevens\: {0}
|
||||
purging.clan=Clan verwijderen\: {0}
|
||||
clan.players=Clan spelers\: {0}
|
||||
clans=Clans\: {0}
|
||||
@@ -356,14 +356,14 @@ you.banned=Je bent verbannen van clan commando's
|
||||
clan.wide.friendly.fire.blocked=Onderling pvp is niet toegestaan
|
||||
clan.wide.friendly.fire.is.allowed=Onderling pvp is toegestaan
|
||||
you.are.the.only.member.online=U bent het enige lid online
|
||||
your.clan.color.tag.cannot.be.longer.than.characters=&cJouw clan''s gekleurde tag mag niet langer zijn dan {0} tekens
|
||||
your.clan.tag.cannot.be.longer.than.characters=Je clan''s tag mag niet langer zijn dan {0} tekens
|
||||
your.clan.tag.must.be.longer.than.characters=Je tag van je clan''s moet langer zijn dan {0} tekens
|
||||
your.clan.color.tag.cannot.be.longer.than.characters=&cJouw clan's gekleurde tag mag niet langer zijn dan {0} tekens
|
||||
your.clan.tag.cannot.be.longer.than.characters=Je clan's tag mag niet langer zijn dan {0} tekens
|
||||
your.clan.tag.must.be.longer.than.characters=Je tag van je clan's moet langer zijn dan {0} tekens
|
||||
your.tag.cannot.contain.the.following.colors=Uw tag kan de volgende kleuren niet bevatten\: {0}
|
||||
your.tag.cannot.contain.color.codes=Uw tag mag geen kleurcodes bevatten
|
||||
you.cannot.set.colored.ranks=U kunt geen gekleurde gelederen instellen
|
||||
your.clan.name.cannot.be.longer.than.characters=De naam van je clan''s mag niet langer zijn dan {0} tekens
|
||||
your.clan.name.must.be.longer.than.characters=De naam van je clan''s moet langer zijn dan {0} tekens
|
||||
your.clan.name.cannot.be.longer.than.characters=De naam van je clan's mag niet langer zijn dan {0} tekens
|
||||
your.clan.name.must.be.longer.than.characters=De naam van je clan's moet langer zijn dan {0} tekens
|
||||
your.clan.tag.can.only.contain.letters.numbers.and.color.codes=De tag van je clans kan alleen letters, cijfers en kleurcodes bevatten
|
||||
your.clan.name.cannot.contain.color.codes=Uw clan's naam mag geen kleurcodes bevatten
|
||||
that.tag.name.is.disallowed=Die tag naam is niet toegestaan
|
||||
@@ -503,7 +503,7 @@ your.clans.are.already.rivals=Je clans zijn al rivalen
|
||||
player.got.money=Je hebt {0} gekregen voor het doden van {1} gebaseerd op je KDR\: {2}
|
||||
cleared.bb=Het bulletin board is gewist
|
||||
clan.balance=Clan-Balans\: {0}
|
||||
clan.admin.balance={0}''s saldo\: {1}$
|
||||
clan.admin.balance={0}'s saldo\: {1}$
|
||||
bb.fee.player.kicked={0} werd gekickt voor het niet betalen van de vergoeding
|
||||
bb.fee.set={0} $ is de vergoeding
|
||||
bb.clan.deposit=$ zijn gestort door
|
||||
@@ -513,8 +513,8 @@ bb.clan.take=$ zijn gepakt door
|
||||
bb.clan.give=$ zijn gegeven door
|
||||
bb.clan.set=$ zijn gezet door
|
||||
player.clan.withdraw=Je neemt {0} op
|
||||
clan.admin.take=Je nam {0} $ van {1}''s bank
|
||||
clan.admin.give=Je gaf {0} $ aan {1}''s bank
|
||||
clan.admin.take=Je nam {0} $ van {1}'s bank
|
||||
clan.admin.give=Je gaf {0} $ aan {1}'s bank
|
||||
clan.admin.set=U heeft de bankbalans van {0} ingesteld op {1}
|
||||
clan.admin.bank.not.enough.money=De bank van {0} heeft niet genoeg geld\!
|
||||
clan.bank.not.enough.money=Je clans bank heeft niet genoeg geld
|
||||
@@ -525,8 +525,8 @@ you.have.reseted.your.kdr=Je hebt je KDR gereset
|
||||
you.have.reseted.0.kdr=Je hebt de KDR van {0} gereset
|
||||
you.have.reseted.kdr.of.all.players=Je hebt de KDR van alle spelers gereset
|
||||
you.have.toggled.permanent.status=Je hebt de permanente status aangezet voor {0}
|
||||
permanent.status.enabled=Je clan''s permanente status is ingeschakeld door {0}
|
||||
permanent.status.disabled=Je clan''s permanente status is uitgeschakeld door {0}
|
||||
permanent.status.enabled=Je clan's permanente status is ingeschakeld door {0}
|
||||
permanent.status.disabled=Je clan's permanente status is uitgeschakeld door {0}
|
||||
yes=Ja
|
||||
cancel=Annuleren
|
||||
resign.confirmation=Weet je zeker dat je je clan wilt verlaten? {0}
|
||||
@@ -561,7 +561,7 @@ no.description=Geen omschrijving
|
||||
the.player.must.wait.0.before.joining.your.clan.again=Deze speler moet {0} minu(u)t(en) wachten voordat hij weer aan je clan kan deelnemen
|
||||
disabled.command=Command uitgeschakeld
|
||||
rank.displayname.updated=De weergavenaam van rank is bijgewerkt\!
|
||||
rank.setdefault=De standaard rank van de clan''s is nu ingesteld op {0}
|
||||
rank.setdefault=De standaard rank van de clan's is nu ingesteld op {0}
|
||||
rank.removedefault=De standaard rang van de clan's is verwijderd
|
||||
rank.0.permissions=Rank {0} zijn machtigingen\:
|
||||
available.rank.permissions=Beschikbare machtigingen voor ranks\:
|
||||
@@ -653,7 +653,7 @@ gui.invite.title=Nodig een speler uit
|
||||
gui.invite.player.title=&f{0}
|
||||
gui.invite.player.price.lore=&7Prijs\: &b{0}
|
||||
gui.invite.player.lore=&7Linksklik om uit te nodigen
|
||||
gui.roster.title={0}''s Roster
|
||||
gui.roster.title={0}'s Roster
|
||||
gui.roster.invite.title=&fInvite
|
||||
gui.roster.invite.lore=&7Nodig een speler uit voor je clan
|
||||
gui.leaderboard.title=Leaderboard - Spelers\: {0}
|
||||
@@ -667,7 +667,7 @@ gui.ranks.rank.displayname.lore=&7Weergavennaam\: &b{0}
|
||||
gui.ranks.rank.remove.lore=&7Rechtsklik om deze rank te verwijderen
|
||||
gui.ranks.rank.edit.permissions.lore=&7Linksklik om de rechten van de rang te bewerken
|
||||
gui.ranks.rank.assign.lore=&7Linksklik om deze rank toe te wijzen aan {0}
|
||||
gui.permissions.title={0}''s Permissies
|
||||
gui.permissions.title={0}'s Permissies
|
||||
gui.permissions.add.title=&fVoeg rechten toe
|
||||
gui.permissions.permission.title=&f{0}
|
||||
gui.permissions.permission.lore=&7Rechtsklik om deze toestemming van de rank te verwijderen
|
||||
|
||||
@@ -493,6 +493,7 @@ hombase.set=Base do clã definida para\: {0}
|
||||
hombase.cleared=Base do clã apagada
|
||||
hombase.mod.set=Base de {0} definida para\:
|
||||
hombase.not.set=Base não definida
|
||||
home.set.in.different.server=A base foi definida em um servidor diferente
|
||||
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
|
||||
|
||||
@@ -185,6 +185,7 @@ command.description.verify=Verifica o seu clan
|
||||
command.description.mod.verify=Verifica um clan
|
||||
command.description.invite=Convida um jogador para o seu clan
|
||||
command.description.resetkdr=Reinicia o seu KDR
|
||||
command.description.rank.delete=Apaga um rank
|
||||
command.description.rank.setdefault=Define o cargo padrão
|
||||
command.description.rank.removedefault=Remove o cargo padrão
|
||||
command.description.rank.permissions.available=Listagem de permissões dos cargos disponíveis
|
||||
|
||||
@@ -19,6 +19,9 @@ land.command=lume
|
||||
break.command=sparge
|
||||
interact.command=interactiune
|
||||
place_block.command=plaseasa bloc
|
||||
damage.command=rănit
|
||||
container.command=recipient
|
||||
confirm.command=confirmă
|
||||
profile.command=profil
|
||||
roster.command=lista
|
||||
lookup.command=cautare
|
||||
@@ -33,6 +36,7 @@ add.command=adauga
|
||||
remove.command=elimina
|
||||
allow.command=permite
|
||||
block.command=blocheaza
|
||||
auto.command=automat
|
||||
check.command=verifica
|
||||
assign.command=repartizeaza
|
||||
unassign.command=anuleaza
|
||||
@@ -48,12 +52,17 @@ withdraw.command=retrage
|
||||
invite.command=invita
|
||||
kick.command=exclude
|
||||
bank.command=banca
|
||||
take.command=ia
|
||||
status.command=stare
|
||||
fee.command=tarif
|
||||
set.command=seteaza
|
||||
purge.command=sterge
|
||||
trust.command=incredere
|
||||
untrust.command=neincredere
|
||||
admin.command=administrator
|
||||
mod.command=moderator
|
||||
promote.command=promovare
|
||||
demote.command=retrogradează
|
||||
reload.command=reîncărcare
|
||||
leave.command=părăsește
|
||||
join.command=alăturare
|
||||
@@ -95,6 +104,7 @@ add=adauga
|
||||
remove=elimina
|
||||
allow=permite
|
||||
block=blocheaza
|
||||
auto=automat
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
|
||||
@@ -208,12 +208,12 @@ command.description.demote=Понизить лидера
|
||||
command.description.admin.promote=Повысить любого участника из любого клана
|
||||
command.description.promote=Повысить участника до лидера
|
||||
command.description.admin.permanent=Переключить постоянный статус любого клана
|
||||
command.description.toggle.bb=Следует ли показывать доску объявлений при входе на сервер
|
||||
command.description.toggle.bb=Переключить показ доски объявлений при входе на сервер
|
||||
command.description.toggle.invite=Переключает возможность получать приглашения в кланы
|
||||
command.description.toggle.tag=Показывать ли рядом с вашим именем тег клана
|
||||
command.description.toggle.deposit=Можно ли вносить средства в банковский счёт вашего клана
|
||||
command.description.toggle.withdraw=Можно ли выводить средства с банковского счёта вашего клана
|
||||
command.description.toggle.fee=Должна ли быть включена комиссия клана
|
||||
command.description.toggle.tag=Переключить показ клан тега перед вашим ником
|
||||
command.description.toggle.deposit=Переключить взнос средств в ваш клан
|
||||
command.description.toggle.withdraw=Переключить вывод средств из вашего клана
|
||||
command.description.toggle.fee=Переключить комиссию клана
|
||||
command.description.alliances=Показать список всех союзных кланов
|
||||
command.description.coords=Показать координаты участников вашего клана
|
||||
command.description.rank.assign=Назначить ранг участнику
|
||||
@@ -493,6 +493,7 @@ hombase.set=База клана установлена\: {0}
|
||||
hombase.cleared=База клана была удалена
|
||||
hombase.mod.set=База клана {0} была установлена на координатах\:
|
||||
hombase.not.set=Точка базы клана не установлена
|
||||
home.set.in.different.server=Домашняя база установлена на другом сервере
|
||||
rival.limit.reached=Вы достигли лимита соперников, нельзя соперничать больше.
|
||||
you.moved.teleport.cancelled=Вы сдвинулись, телепортация отменена
|
||||
waiting.for.teleport.stand.still.for.0.seconds=Ожидание телепортирования, оставайтесь на месте ещё {0} секунд
|
||||
@@ -671,7 +672,7 @@ gui.permissions.title=Права {0}
|
||||
gui.permissions.add.title=&fДобавить право
|
||||
gui.permissions.permission.title=&f{0}
|
||||
gui.permissions.permission.lore=&7ПКМ\: Удалить право у ранга
|
||||
gui.add.permission.title=Добавить право
|
||||
gui.add.permission.title=Добавить разрешение
|
||||
gui.add.permission.permission.title=&f{0}
|
||||
gui.add.permission.permission.lore=&7ЛКМ\: Добавить право к рангу
|
||||
gui.clandetails.title=[{0}] {1}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
description.command=Açıklama
|
||||
description.command=açıklama
|
||||
create.command=oluştur
|
||||
delete.command=sil
|
||||
rank.command=rütbe
|
||||
@@ -9,7 +9,7 @@ permissions.command=izinler
|
||||
list.command=liste
|
||||
balance.command=bakiye
|
||||
list.order.asc=artan
|
||||
list.order.desc=azalan
|
||||
list.order.desc=açıklama
|
||||
list.type.name=isim
|
||||
list.type.kdr=kd
|
||||
list.type.size=boyut
|
||||
@@ -21,7 +21,7 @@ interact.command=etkileşim
|
||||
place_block.command=blok_yerleştirme
|
||||
damage.command=hasar
|
||||
interact_entity.command=varlık_etkileşimi
|
||||
container.command=sandıkalanı
|
||||
container.command=konteyner
|
||||
confirm.command=onaylamak
|
||||
profile.command=profil\n
|
||||
roster.command=klanbilgi
|
||||
@@ -102,7 +102,7 @@ acf-core.parameter.message=mesaj
|
||||
acf-core.parameter.tag=etiket
|
||||
acf-core.parameter.name=isim
|
||||
acf-core.parameter.fee=vergi
|
||||
acf-core.parameter.description=Açıklama
|
||||
acf-core.parameter.description=açıklama
|
||||
acf-core.parameter.player=oyuncu
|
||||
acf-core.parameter.clan=klan
|
||||
acf-core.parameter.type=tip
|
||||
@@ -142,6 +142,7 @@ command.description.deny=Bir isteği reddeder
|
||||
command.description.accept=Bir isteği kabul eder
|
||||
command.description.more=Daha fazla bilgi gösterir
|
||||
command.description.create=Bir klan oluşturur
|
||||
command.description.discord.create=Klanınız için bir discord kanalı oluşturur
|
||||
command.description.ff.allow=Kişisel dost ateşinizi izin verecek şekilde ayarlar
|
||||
command.description.ff.auto=Kişisel dost ateşinizi otomatik olarak ayarlar
|
||||
command.description.globalff.allow=Genel dost ateşini izin verecek şekilde ayarlar
|
||||
@@ -165,6 +166,9 @@ command.description.kick=Klanınızdan bir üyeyi atar
|
||||
command.description.bb.display=Klanınızın ilan tahtasını görüntüler
|
||||
command.description.bb.clear=Klanınızın ilan panosunu temizler
|
||||
command.description.bb.post=Klanınızın ilan tahtasına bir mesaj gönderir
|
||||
command.description.mod.bb.display=Bir klanın ilan panosunu görüntüler
|
||||
command.description.mod.bb.clear=Bir klanın ilan panosunu temizler
|
||||
command.description.mod.bb.post=Bir klanın ilan panosuna bir mesaj gönderir
|
||||
command.description.place=Bir klana bir oyuncu yerleştirir
|
||||
command.description.reload=Eklentiyi ve yapılandırmasını yeniden yükler
|
||||
command.description.trust=Bir üyeye güvenir
|
||||
@@ -176,6 +180,7 @@ command.description.clan=Arayüzü açar
|
||||
command.description.disband=Klanınızı dağıtır
|
||||
command.description.mod.disband=Bir klanı dağıtır
|
||||
command.description.mod.kick=Klandan bir oyuncuyu atar
|
||||
command.description.modtag.other=Bir klanın başlığını değiştirir
|
||||
command.description.modtag=Klanınızın etiketini değiştirir
|
||||
command.description.purge=Bazı oyuncuların verilerini temizler
|
||||
command.description.setbanner=Klanınızın sancağını ayarlar
|
||||
@@ -307,6 +312,7 @@ clickable.accept=&a&l[KABUL ET]
|
||||
clickable.deny=&c&l[REDDET]
|
||||
hover.click.to.accept=&aKabul etmek için tıklayın
|
||||
hover.click.to.deny=&cReddetmek için tıklayın
|
||||
not.sufficient.money=Hesabınızda yeterli para yok (gereken\: {0} $)
|
||||
account.has.been.debited=Hesabınızdan {0} çekildi
|
||||
mysql.connection.successful=MySQL Bağlantısı başarılı
|
||||
mysql.connection.failed=MySQL Bağlantısı başarısız oldu
|
||||
@@ -440,7 +446,7 @@ you.are.at.war={0} şu anda {1} ile savaş halinde
|
||||
denied.war.req={0}, {1} tarafından gönderilen savaş talebini reddetti
|
||||
you.are.no.longer.at.war={0} artık {1} klanı ile savaşta değil
|
||||
end.war.denied=Savaşı sona erdirme talebi {0} tarafından reddedildi
|
||||
denied.war.end={0}, {1} ''nin savaşı sona erdirme isteğini reddetti
|
||||
denied.war.end={0}, {1} 'nin savaşı sona erdirme isteğini reddetti
|
||||
has.initiated.a.rivalry={0}, {1} klanı ile rekabet başlattı
|
||||
start=başlat
|
||||
end=bitir
|
||||
@@ -494,13 +500,18 @@ on=açık
|
||||
off=kapalı
|
||||
player.rank.changed=Rütbe belirlendi
|
||||
your.clans.are.already.rivals=Klanlarınız zaten rakip
|
||||
player.got.money=KDR''nize göre {1} kişi öldürmekten {0}$ para aldınız\: {2}
|
||||
player.got.money=KDR'nize göre {1} kişi öldürmekten {0}$ para aldınız\: {2}
|
||||
cleared.bb=Klan panosu temizledi
|
||||
clan.balance=Klan-Bakiyesi\: {0}$
|
||||
clan.admin.balance={0} bakiyesi\: {1}$
|
||||
bb.fee.player.kicked={0} vergi ödemediği için atıldı
|
||||
bb.fee.set=Vergi\: {0}$
|
||||
bb.clan.deposit={0} $, {1} tarafından yatırıldı
|
||||
player.clan.deposit={0}$ yatırdın
|
||||
bb.clan.withdraw={0} $, {1} tarafından çekildi
|
||||
bb.clan.take={0} $, {1} tarafından alındı
|
||||
bb.clan.give={0} $, {1} tarafından verildi
|
||||
bb.clan.set={0} $, {1} tarafından belirlendi
|
||||
player.clan.withdraw={0}$ çektin
|
||||
clan.admin.take={1} adlı klanın bankasından {0}$ aldınız
|
||||
clan.admin.give={1} adlı klanın bankasına {0}$ verdiniz
|
||||
@@ -511,7 +522,7 @@ your.clans.are.not.rivals=Klanlarınız rakip değil
|
||||
the.clan.members.reached.limit=Klanınız üye sınırına ulaştı
|
||||
this.clan.has.reached.the.member.limit=&bBu klan üye sınırına ulaştı
|
||||
you.have.reseted.your.kdr=KDR'nizi sıfırladınız
|
||||
you.have.reseted.0.kdr={0} klanının KDR''sini sıfırladınız
|
||||
you.have.reseted.0.kdr={0} klanının KDR'sini sıfırladınız
|
||||
you.have.reseted.kdr.of.all.players=Tüm oyuncuların KDR'sini sıfırladınız
|
||||
you.have.toggled.permanent.status={0} klanı için kalıcı durumu değiştirdiniz
|
||||
permanent.status.enabled=Klanınızın kalıcı durumu {0} tarafından etkinleştirildi
|
||||
@@ -519,6 +530,7 @@ permanent.status.disabled=Klanınızın kalıcı durumu {0} tarafından devre d
|
||||
yes=Evet
|
||||
cancel=İptal
|
||||
resign.confirmation=Ayrılmak istediğinize emin misiniz? {0}
|
||||
disband.confirmation=Klanınızı kapatmak istediğinize emin misiniz? {0}
|
||||
resign.success=Klanınızdan ayrıldınız
|
||||
you.cannot.demote.the.last.leader=Son liderin sıralamasını düşüremezsin
|
||||
you.cannot.move.the.last.leader=Son lideri taşıyamazsınız
|
||||
@@ -568,6 +580,7 @@ you.must.be.0.or.have.the.permission.1.to.use.this=Bunu kullanmak için {0} olma
|
||||
deposit.not.allowed=Para yatırmaya izin verilmiyor, izin vermek için /%clan %toggle %deposit komutunu kullanın
|
||||
withdraw.not.allowed=Para çekmeye izin verilmiyor, izin vermek için /%clan %toggle %withdraw komutunu kullanın
|
||||
resign.request.cancelled=Ayrılma isteği iptal edildi
|
||||
disband.request.cancelled=Klanı kapatma iptal edildi
|
||||
clan.create.request.cancelled=Klan oluşturma isteği iptal edildi
|
||||
rank.create.request.cancelled=Rütbe oluşturma isteği iptal edildi
|
||||
promotion.vote.has.been.requested.from.all.leaders=Tüm liderlerden terfi oylaması talep edildi
|
||||
@@ -653,7 +666,7 @@ gui.ranks.rank.title=&fRütbe\: {0}
|
||||
gui.ranks.rank.displayname.lore=&7İsim &b{0}
|
||||
gui.ranks.rank.remove.lore=&7Bu rütbeyi kaldırmak için sağ tıklayın
|
||||
gui.ranks.rank.edit.permissions.lore=&7Rütbenin izinlerini düzenlemek için sol tıklayın
|
||||
gui.ranks.rank.assign.lore=&7Bu sıralamayı {0}''a atamak için sol tıklayın
|
||||
gui.ranks.rank.assign.lore=&7Bu sıralamayı {0}'a atamak için sol tıklayın
|
||||
gui.permissions.title={0} Adlı Kişinin İzinleri
|
||||
gui.permissions.add.title=&fİzin ekle
|
||||
gui.permissions.permission.title=&f{0}
|
||||
@@ -695,6 +708,7 @@ gui.clandetails.home.title=&fEv
|
||||
gui.clandetails.home.lore.teleport.price=&7Işınlanma fiyatı\: &b{0}
|
||||
gui.clandetails.home.lore.teleport=&7Klanınızın evine ışınlanmak için sol tıklayın
|
||||
gui.staffclandetails.home.lore.teleport=&7Klan evine ışınlanmak için sol tıklayın
|
||||
gui.clandetails.home.lore.clear=&7Klan evinizi silmek için eşyayı atın
|
||||
gui.clandetails.home.lore.set.price=&7Ayarlama fiyatı\: &b{0}
|
||||
gui.clandetails.home.lore.set=&7Klanınızın evini ayarlamak için sağ tıklayın
|
||||
gui.staffclandetails.home.lore.set=&7Bu klanın evini ayarlamak için sağ tıklayın
|
||||
@@ -711,6 +725,7 @@ gui.clandetails.bank.title=&fBanka
|
||||
gui.clandetails.bank.balance.lore=&7Bakiye\: &b{0}
|
||||
gui.clandetails.bank.withdraw.status.lore=&7Çek\: &b{0}
|
||||
gui.clandetails.bank.deposit.status.lore=&7Yatır\: &b{0}
|
||||
gui.clandetails.bank.withdraw.toggle.lore=&7Para çekme durumunu değiştirmek için öğeyi bırakın
|
||||
gui.clandetails.bank.deposit.toggle.lore=&7Para yatırma durumunu değiştirmek için sağ tıklayın
|
||||
gui.clandetails.fee.title=&fVergi
|
||||
gui.clandetails.fee.status.lore=&7Durum\: &b{0}
|
||||
@@ -726,6 +741,7 @@ gui.staffclandetails.not.verified.lore=&7Bu klanı doğrulamak için sol tıklay
|
||||
gui.clandetails.resign.title=&fAyrıl
|
||||
gui.clandetails.resign.lore=&7Klanınızdan ayrılma için sol tıklayın
|
||||
gui.clandetails.disband.title=&fDağıt
|
||||
gui.clandetails.disband.lore=&7Klanınızı kapatmak için eşyayı bırakın
|
||||
gui.staffclandetails.disband.lore=&7Bu klanı dağıtmak için sol tıklayın
|
||||
gui.clandetails.chat.title=&fSohbet
|
||||
gui.clandetails.chat.clan.chat.lore=&7/{0} [message] - &bKlan sohbetine mesaj gönderir
|
||||
@@ -808,7 +824,7 @@ player.lookup.clanname=&e[&8%clan_color_tag%&e] &b%clan_name%
|
||||
player.lookup.killtype=&7Öldürme türü\: %player_kill_type%\n
|
||||
player.lookup=\n&b%player_name%&7 profili &8-------------------------------------------\n \n &7Klan\: &f%clan_name%\n &7Rütbe\: &f%player_rank%\n &7Durum\: &f%player_status%\n &7KDR\: &e%player_kdr%\n &7Toplam Öldürme\: &8[Rakip\:&f%player_rival_kills% &8Nötr\:&f%player_neutral_kills% &8Sivil\:&f%player_civilian_kills%&8]\n &7Ölme\: &f%player_deaths%\n &7Katılma Tarihi\: &f%player_join_date%\n &7Son Görülme\: &f%player_last_seen%\n &7Geçmiş Klanlar\: &f%player_past_clans%\n &7Son Aktiflik\: &f%player_inactive_days%&7/&f%player_max_inactive_days% gün\n %kill_type_line%
|
||||
economy.disabled=&cEkonomi devre dışı bırakıldı\!
|
||||
has.been.purged={0} ''ın verileri temizlendi
|
||||
has.been.purged={0} 'ın verileri temizlendi
|
||||
accepted.invitation=&b{0} adlı klanın davetini kabul ettiniz
|
||||
denied.invitation=&c{0} adlı klanın davetini reddettiniz
|
||||
must.be.in.clan.to.pvp=&cSiz ve {0}, savaşmak için bir klan üyesi olmalısınız\!
|
||||
@@ -817,6 +833,14 @@ cannot.attack.civilians=&cSivillere saldıramazsın\!
|
||||
cannot.attack.clan.member=&cKlan üyelerine saldıramazsın\!
|
||||
cannot.attack.ally=&cBir müttefiğe saldıramazsın\!
|
||||
cannot.send.discord.message={0} adlı kişiye mesaj gönderemezsiniz. Sen o klanın üyesi değilsin\!
|
||||
discordhook.is.disabled=&cDiscord entegrasyonu devre dışı veya kullanılamıyor\!
|
||||
your.clan.doesnt.have.any.linked.player=Klanınızın bağlı oyuncusu yok
|
||||
your.clan.doesnt.have.minimum.linked.player=Klanınızın minimum bağlı oyuncusu yok
|
||||
your.clan.is.not.on.the.whitelist=Klanınız beyaz listede değil
|
||||
your.clan.already.has.channel=Klanınızın zaten bir discord kanalı var
|
||||
discord.reached.category.limit=Discord kategori sınırına ulaştı\!
|
||||
discord.reached.channels.limit=Discord kanal sınırına ulaştı\!
|
||||
discord.created.successfully=&bDiscord kanalı başarıyla oluşturuldu\!
|
||||
you.did.not.link.your.account=Hesabınızı bağlamadınız\!
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
cannot.change.member.fee.now=&cVergi ücretini tahsilat saatine yakın bir zamanda değiştiremezsiniz.
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -47,7 +47,7 @@ clear.command=xóa
|
||||
modtag.command=nhãn
|
||||
toggle.command=chuyển
|
||||
tag.command=thẻ
|
||||
deposit.command=thêm tiền
|
||||
deposit.command=quyên góp
|
||||
all.command=tất cả
|
||||
withdraw.command=rút tiền
|
||||
invite.command=mời
|
||||
@@ -108,7 +108,38 @@ acf-core.parameter.clan=clan
|
||||
acf-core.parameter.type=loại
|
||||
acf-core.parameter.order=đặt đơn
|
||||
acf-core.parameter.help=trang hoặc mã
|
||||
command.description.land.allow.all=Cho phép tất cả các hành động trong đất của bạn
|
||||
command.description.land.allow.interact_entity=Cho phép các thành viên trong clan tương tác với các thực thể trong vùng đất của bạn
|
||||
command.description.land.allow.interact=Cho phép các thành viên trong clan tương tác với vùng đất của bạn
|
||||
command.description.land.allow.container=Cho phép các thành viên trong Clan mở các thùng chứa trong vùng đất của bạn
|
||||
command.description.land.allow.place=Cho phép các thành viên trong clan đặt các khối trong vùng đất của bạn
|
||||
command.description.land.allow.break=Cho phép các thành viên trong clan phá vỡ các khối trong vùng đất của bạn
|
||||
command.description.land.allow.damage=Cho phép các thành viên trong clan gây ra sát thương trong vùng đất của bạn
|
||||
command.description.land.block.all=Chặn tất cả các hành động trong đất của bạn
|
||||
command.description.land.block.interact_entity=Chặn các thành viên trong clan tương tác với các mobs trong vùng đất của bạn
|
||||
command.description.land.block.interact=Chặn các thành viên trong clan tương tác với vùng đất của bạn
|
||||
command.description.land.block.container=Chặn các thành viên trong clan mở các thùng chứa trong vùng đất của bạn
|
||||
command.description.land.block.place=Cấm các thành viên trong hội đặt khối trong vùng đất của bạn
|
||||
command.description.land.block.break=Cấm các thành viên trong hội phá vỡ khối trong vùng đất của bạn
|
||||
command.description.land.block.damage=Cấm các thành viên trong hội gây ra sát thương trong vùng đất của bạn
|
||||
command.description.stats=Xem thông tin của các thành viên trong hội
|
||||
command.description.rivalries=Hiển thị xếp hạng tất cả hội
|
||||
command.description.kills=Hiển thị số mạng hạ gục của bạn và của những người chơi khác
|
||||
command.description.lookup=Tra cứu thông tin của bạn
|
||||
command.description.lookup.other=Tra cứu thông tin của người chơi
|
||||
command.description.leaderboard=Hiển thị bảng xếp hạng
|
||||
command.description.roster.other=Liệt kê các thành viên của hội khác
|
||||
command.description.roster=Liệt kê các thành viên trong hội
|
||||
command.description.profile.other=Hiển thị thông tin của hội khác
|
||||
command.description.profile=Hiển thị thông tin của hội bạn
|
||||
command.description.vitals=Hiển thị các thông tin quan trong giữa hội bạn và đồng minh
|
||||
command.description.list=Liệt kê tất cả các hội
|
||||
command.description.list.balance=Hiển thị hội giàu nhất
|
||||
command.description.deny=Từ chối yêu cầu
|
||||
command.description.accept=Chấp nhận yêu cầu
|
||||
command.description.more=Hiển thị thông tin chi tiết
|
||||
command.description.create=Tạo clan
|
||||
command.description.discord.create=Tạo một trang Discord cho hội của bạn
|
||||
command.description.regroup.home=Tập hợp các thành viên trong clan của bạn đến nhà của clan bạn
|
||||
command.description.home.tp=Dịch chuyển đến nhà của clan bạn
|
||||
command.description.home.clear=Xóa nhà clan của bạn
|
||||
@@ -160,16 +191,32 @@ command.description.demote=Hạ chức một lãnh đạo
|
||||
command.description.admin.promote=Thăng chức một thành viên nào đó của clan nào đó
|
||||
command.description.promote=Thăng chức một thành viên thành lãnh đạo
|
||||
command.description.alliances=Danh sách các clan đồng minh
|
||||
command.description.rank.create=Tạo chức vụ
|
||||
command.description.rank.delete=xóa chức vụ trong clan
|
||||
command.description.rank.list=Danh sách thành viên clan
|
||||
command.description.rank.permissions.add=Thêm quyền cho chức vụ
|
||||
alliances=đồng minh
|
||||
coords=tọa độ
|
||||
name=Tên
|
||||
distance=Khoảng cách
|
||||
world=Thế giới
|
||||
members=Thành viên
|
||||
clans.lower=hội
|
||||
days=ngày
|
||||
rivalries=cạnhtranh
|
||||
online=Trực tuyến
|
||||
player=Người chơi
|
||||
seen=Đã xem
|
||||
leader=lãnh đạo
|
||||
roster=đội hình
|
||||
trusted=tin cậy
|
||||
untrusted=không đáng tin
|
||||
deaths=Số lần chết
|
||||
weights=Trọng lượng
|
||||
stats=thông số
|
||||
health=Máu
|
||||
armor=Giáp
|
||||
weapons=Vũ khí
|
||||
food=Đồ ăn
|
||||
vitals=sựsống
|
||||
verified=Đã xác minh
|
||||
@@ -191,6 +238,16 @@ nokillsfound=Không tìm thấy kẻ giết
|
||||
promoted.to.leader={0} đã được thăng chức lên lãnh đạo
|
||||
denied.demotion={0} đã từ chối hạ chức của {1}. Sự đồng thuận không thành công.
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
clickable.accept=&a&|[Đồng Ý]
|
||||
clickable.deny=&c&|[Từ Chối]
|
||||
hover.click.to.accept=&aNhấn vào để chấp nhận
|
||||
hover.click.to.deny=&cNhấn vào để từ chối
|
||||
mysql.connection.successful=Kết nối MySQL thành công
|
||||
mysql.connection.failed=Kết nối MySQL thất bại
|
||||
sqlite.connection.successful=Kết nối SQLite thành công
|
||||
sqlite.connection.failed= Kết nối SQLite thất bại
|
||||
clans=Hội\: {0}
|
||||
this.player.is.already.banned=Người chơi này đã bị cấm
|
||||
player.is.not.a.leader=Bạn không phải là chủ clan
|
||||
clan.disband.vote.has.been.requested.from.all.leaders=Bỏ phiếu giải tán Clan đã được yêu cầu từ tất cả các thủ lĩnh
|
||||
friendy.fire.is.now.managed.by.your.clan=Friendy-fire hiện do nhóm của bạn quản lý
|
||||
@@ -239,6 +296,7 @@ has.been.given.untrusted.status.by={0} đã được đưa ra trạng thái khô
|
||||
the.clan.does.not.exist=Clan không tồn tại
|
||||
the.clan.is.already.verified=Clan đã được xác thực
|
||||
the.clan.has.been.verified=Clan đã được xác minh thành công
|
||||
clans.already.at.war=Hội của bạn đã ở trong trận chiến
|
||||
start=bắt đầu
|
||||
end=kết thúc
|
||||
add=thêm
|
||||
@@ -247,6 +305,12 @@ allow=cho phép
|
||||
block=khóa
|
||||
auto=tự động
|
||||
war=cuộc chiến
|
||||
diamond=kim cương
|
||||
gold=vàng
|
||||
wood=gỗ
|
||||
hunger=Đói
|
||||
stone=đá
|
||||
iron=sắt
|
||||
on=bật
|
||||
off=tắt
|
||||
player.rank.changed=Chức vụ đã được đặt
|
||||
@@ -260,6 +324,11 @@ player.clan.deposit=Số tiền bạn gửi vô quỹ clan\: {0}
|
||||
player.clan.withdraw=Bạn đã rút\: {0}
|
||||
resign.confirmation=Bạn có chắc chắn muốn từ chức không? {0}
|
||||
resign.success=Bạn đã từ chức thành công khỏi nhóm của mình
|
||||
bb.days= ngày
|
||||
allowed=cho phép
|
||||
blocked=đã chặn
|
||||
chat.joined=đã tham gia
|
||||
gui.warning.no.permission.plugin.lore=&7Bạn không có quyền làm điều này\!
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
# suppress inspection "TrailingSpacesInProperty"
|
||||
|
||||
@@ -520,6 +520,7 @@ clan.admin.bank.not.enough.money=玩家 {0} 银行余额不足\!
|
||||
clan.bank.not.enough.money=你的帮派银行资金不足
|
||||
your.clans.are.not.rivals=你的帮派不是敌对
|
||||
the.clan.members.reached.limit=你的宗派已达到成员上限
|
||||
this.clan.has.reached.the.member.limit=&b此部族已达到成员限制
|
||||
you.have.reseted.your.kdr=您已经重置您的 KD 比
|
||||
you.have.reseted.0.kdr=您已经重置 {0} 的 KD 比
|
||||
you.have.reseted.kdr.of.all.players=您已重置所有玩家的 KD 比
|
||||
|
||||
@@ -103,12 +103,19 @@ permissions:
|
||||
description: Can use ally chat
|
||||
simpleclans.member.chat:
|
||||
description: Can use clan chat
|
||||
simpleclans.member.chat.color:
|
||||
description: Can use colors in chat
|
||||
simpleclans.member.chat.format:
|
||||
description: Can use formats in chat
|
||||
default: false
|
||||
simpleclans.member.can-join:
|
||||
description: Can join clans
|
||||
simpleclans.member.home:
|
||||
description: Can tp to home base
|
||||
simpleclans.vip.resetkdr:
|
||||
description: Can reset his kdr
|
||||
simpleclans.vip.teleport-delay:
|
||||
description: Bypasses the teleport delay
|
||||
simpleclans.leader.create:
|
||||
description: Can create simpleclans
|
||||
simpleclans.leader.verify:
|
||||
@@ -296,6 +303,7 @@ permissions:
|
||||
simpleclans.member.kills: true
|
||||
simpleclans.member.bank: true
|
||||
simpleclans.member.fee-check: true
|
||||
simpleclans.member.chat.color: true
|
||||
simpleclans.leader.*:
|
||||
description: Permissions for those who can be clan leaders
|
||||
default: true
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.utils;
|
||||
|
||||
import net.sacredlabyrinth.phaed.simpleclans.Clan;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ObjectUtilsTest {
|
||||
|
||||
private ClanPlayer cpOrigin;
|
||||
private ClanPlayer cpDest;
|
||||
private Clan clanOrigin;
|
||||
private Clan clanDest;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
cpOrigin = new ClanPlayer();
|
||||
cpOrigin.setName("Test");
|
||||
cpDest = new ClanPlayer();
|
||||
clanOrigin = new Clan();
|
||||
clanDest = new Clan();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateFields() throws IllegalAccessException {
|
||||
ObjectUtils.updateFields(cpOrigin, cpDest);
|
||||
Assert.assertEquals("Test", cpDest.getName());
|
||||
|
||||
clanOrigin.setMemberFee(0.222);
|
||||
|
||||
ObjectUtils.updateFields(clanOrigin, clanDest);
|
||||
Assert.assertEquals(0.222, clanDest.getMemberFee(), 0);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void updateFieldsDifferentType() throws IllegalAccessException {
|
||||
ObjectUtils.updateFields(clanOrigin, cpOrigin);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package net.sacredlabyrinth.phaed.simpleclans.uuid;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
public class UUIDFetcherTest {
|
||||
|
||||
private UUID ghostUUID;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
ghostUUID = UUID.fromString("bfe9a44f-e44d-453b-8219-74eb186c3932");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getUUIDOf() throws Exception {
|
||||
Assert.assertEquals(ghostUUID, UUIDFetcher.getUUIDOf("GhostTheWolf"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getUUIDOfThrottled() throws IOException, InterruptedException {
|
||||
Assert.assertEquals(ghostUUID, UUIDFetcher.getUUIDOfThrottled("GhostTheWolf"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user