Commits vergleichen
516 Commits
Autor | SHA1 | Datum | |
---|---|---|---|
|
47d5f29ae6 | ||
|
552a1ea7fc | ||
|
d77e8e829e | ||
|
bd06bce3dc | ||
|
76ecc8e6e4 | ||
|
820e7fcbb2 | ||
|
94958de2da | ||
|
2214b7dc3d | ||
75e6b28e0e | |||
a1dd919afa | |||
|
2b0b2a08d7 | ||
|
7fc76e5e2a | ||
|
5153609776 | ||
593113bbc3 | |||
|
a62c08b097 | ||
442ba6f483 | |||
|
e253e12994 | ||
|
38bb687c5b | ||
|
30ddf671ae | ||
|
2829706d6b | ||
|
ab6c762323 | ||
|
d5acfa3f5c | ||
|
3370e211f9 | ||
|
29c7732166 | ||
ec3a8a1421 | |||
|
f054710a95 | ||
67f6363852 | |||
7182635558 | |||
|
7d01ebf4ed | ||
|
595c45bb54 | ||
45a61e554f | |||
|
a43e141340 | ||
4a334d8693 | |||
|
6a6833a0e0 | ||
daedbb26a7 | |||
|
d5ab11addd | ||
|
aa22ccf5b4 | ||
|
723b86b955 | ||
|
a116f7e4b1 | ||
680f9d8b3f | |||
|
00dcb10451 | ||
c815cd52fb | |||
|
ddb701cbd6 | ||
929400b4d9 | |||
|
e9ff8a7dc5 | ||
|
a36bae3a8d | ||
|
7502270b96 | ||
|
0c91261d55 | ||
|
add259788d | ||
|
4568ceee36 | ||
106a13bd13 | |||
|
2aec97304d | ||
|
7fa31704f4 | ||
|
95132a17d3 | ||
|
e08e53a554 | ||
5ab6b8832b | |||
|
2861a4e19b | ||
|
18430e13fe | ||
|
e8eeeb729a | ||
792b089e4f | |||
|
b602fb06d0 | ||
18769a6931 | |||
|
f1b3b27c14 | ||
|
fd17b8315f | ||
2ed6008aea | |||
|
a5b90be2db | ||
|
c278b1cfe1 | ||
|
486d04dd66 | ||
f1d929e33b | |||
6f6b61b310 | |||
|
f50d887da5 | ||
|
5d2886c0a5 | ||
|
9d96d5a2a8 | ||
|
07cd605d2c | ||
aeb5ebfc12 | |||
|
7e96d1c846 | ||
|
5595f3177c | ||
|
e931d7157e | ||
|
b64e06479f | ||
|
86cf7e8ca5 | ||
|
69b629d72e | ||
|
143ba020ed | ||
|
d0a08bc331 | ||
|
d81fb4e020 | ||
|
7ddfcb83ec | ||
|
09aa662171 | ||
|
56a72b1e83 | ||
|
295eb82fe9 | ||
|
f7727eb01c | ||
|
4e56760eea | ||
|
f69cbd2724 | ||
|
0d09db2284 | ||
|
47772ad23d | ||
|
83e5324986 | ||
|
8512a7bec5 | ||
|
35988bfcd3 | ||
|
67a34ee5ca | ||
|
5af9cfcaad | ||
|
8b07e93a70 | ||
|
4d9aacfc3e | ||
|
6a3f3f8b0a | ||
|
4e6755033a | ||
|
4422c249dc | ||
|
1a3850600c | ||
|
33d687b216 | ||
|
2eab79cf69 | ||
|
1bcf415186 | ||
|
27dc30619b | ||
|
17a8389703 | ||
|
d170e96542 | ||
|
356b14d49c | ||
|
7a9a2283a9 | ||
|
d5d8c52862 | ||
|
163967483f | ||
|
ed799b2937 | ||
|
d13c415565 | ||
|
39d2205b85 | ||
|
c4296a3781 | ||
|
31e0a0172f | ||
|
bcdad382c7 | ||
|
597c968463 | ||
|
43a04a68bf | ||
|
80967ab4e7 | ||
|
e06d612a0e | ||
|
224127eac6 | ||
|
1aa63255e7 | ||
|
7f4834412d | ||
|
e01ac8ac58 | ||
|
7ece12de47 | ||
|
af19931946 | ||
|
b8e79f9c55 | ||
|
c7b8b5d2da | ||
|
41d4ce2472 | ||
|
4ed5f40fed | ||
|
a6867cb4f9 | ||
|
7cd61fd9a4 | ||
|
3f9f3341a3 | ||
|
e7438029b0 | ||
3755395eab | |||
|
e64c50b566 | ||
|
207826ae8a | ||
9b70f2b365 | |||
|
ae470ffadd | ||
|
4a0cd6c51e | ||
|
3b53926195 | ||
|
687cb4451e | ||
|
41fab57e1a | ||
|
d8d049d5d9 | ||
|
e8db5d86c2 | ||
|
1fc9a43604 | ||
|
488866cee6 | ||
|
eefe92309d | ||
|
c369662a28 | ||
|
870578dcf9 | ||
|
987a00ae51 | ||
|
c0dcb99f7b | ||
|
d80e4cf3e0 | ||
|
2d7ae67335 | ||
|
be25b71cb8 | ||
|
a94f5747a0 | ||
|
5a59578a66 | ||
|
10a63f1876 | ||
|
5ec9fbb6e0 | ||
719b38f5af | |||
aa8d2bfcd0 | |||
|
cf329f4236 | ||
|
6abeed0b02 | ||
|
45cc3abd0a | ||
|
2cd3c3527e | ||
5a835acb80 | |||
5a991de55a | |||
|
827929382a | ||
|
1282f6066c | ||
|
8a78dcbc78 | ||
|
04b49fe827 | ||
|
8a3d8a9c33 | ||
|
dfd20f03b6 | ||
|
234f476672 | ||
|
b7cb909986 | ||
5b8d7bc28f | |||
|
f1db3c2047 | ||
|
2d5bedc63a | ||
|
8781da6a3d | ||
|
a91c352b15 | ||
|
f7481bfa0f | ||
|
2ccc7920d5 | ||
|
3ecd31e80c | ||
|
1da5b65460 | ||
|
1cbe614171 | ||
|
4620e83a82 | ||
|
6ec62d9720 | ||
|
335e2cc437 | ||
|
75edfc8375 | ||
|
ccf155d500 | ||
|
e4346a36e1 | ||
|
8aa0ee4d9d | ||
|
fccdcb2519 | ||
|
b47d85ebe9 | ||
|
0c37cfc3bb | ||
|
1094f4a979 | ||
|
c03fbb65e6 | ||
|
48175de8d8 | ||
|
eeb47f1d08 | ||
|
e71ccc3160 | ||
|
40f4af2a06 | ||
|
3c22840278 | ||
|
c621048014 | ||
|
1644b96886 | ||
|
f62d9e626b | ||
|
3a3c4819f9 | ||
|
5c96da9acd | ||
|
5a03623b14 | ||
|
f837b37b50 | ||
|
fd603f3c7f | ||
|
280b5b2613 | ||
|
7f62ad8005 | ||
|
d1196c6e4e | ||
|
009a1f3fa4 | ||
|
a05116a16c | ||
|
cc15781b44 | ||
|
8053796341 | ||
|
9466a8c981 | ||
|
338980f0d3 | ||
e4dc05ce02 | |||
|
de08488371 | ||
|
21e7bd89af | ||
|
953db69425 | ||
|
1d49a6981b | ||
d9dd64271e | |||
|
c2c686319d | ||
7ded9eefa4 | |||
|
b211f9cf79 | ||
|
2ba51e66e0 | ||
|
f83ba6ab96 | ||
|
b891c5adf1 | ||
|
78c0bc51b9 | ||
|
d1afb344d9 | ||
|
e77680d25a | ||
|
94bf2f3ae6 | ||
|
775d428671 | ||
|
ea5df6cee3 | ||
|
da1ea27f61 | ||
|
2bf0b0c6e8 | ||
85e6aab9e6 | |||
ad9b0aeab0 | |||
016a2a3469 | |||
c2bec98063 | |||
|
ada8fefd62 | ||
|
21aa22d75f | ||
|
a3f5098137 | ||
|
cdac4235f5 | ||
|
b166d8ff6b | ||
|
2c5a50bff3 | ||
|
beb49cdcd1 | ||
|
96b84a798b | ||
|
6e9693d838 | ||
|
2a55f607d3 | ||
|
0ac735c30f | ||
|
b00babdcbd | ||
|
f5e4d725fe | ||
|
ca8a916042 | ||
|
8da1fdac58 | ||
|
927ce1f495 | ||
|
0bf27db398 | ||
|
202e03c957 | ||
|
2cfed8b84d | ||
|
ec10b0fe71 | ||
|
bff63482ef | ||
|
4f266a30ab | ||
|
85512be3a8 | ||
|
67c9f66d13 | ||
|
f2a957c88f | ||
|
d1ff80b9dc | ||
|
41ed83dfe0 | ||
|
2bf3cfbb1d | ||
|
19bb7cc733 | ||
|
17c03f629a | ||
|
f6644d8ad8 | ||
|
4ff706e1ef | ||
|
3d0ebbe743 | ||
|
5556bd7875 | ||
|
5fe0079e30 | ||
|
006a0edef6 | ||
|
6305453e15 | ||
|
a61f1e2c8c | ||
|
78f7e42629 | ||
|
3dddb48d0c | ||
|
37e6628aaa | ||
|
bcb8b31ba9 | ||
|
832484c2a2 | ||
|
7802a03f48 | ||
|
20af36a4a2 | ||
|
0cec90c55c | ||
|
0b70bdfe97 | ||
|
ec93dfd8ec | ||
|
1a6c0de502 | ||
|
b73af3e2ec | ||
27627c3b41 | |||
4f592e754c | |||
|
52fcb69e1e | ||
|
a0ff726fb4 | ||
|
61282c0f84 | ||
|
1ed10c8c86 | ||
|
f94aeeda01 | ||
|
4c7f56be7c | ||
|
36e0c4c910 | ||
|
bdeb7da4c6 | ||
b58e418ea4 | |||
|
979428d493 | ||
|
84150aadd2 | ||
|
32fb859764 | ||
|
b886745113 | ||
|
27a542590c | ||
|
fdc201e99d | ||
|
06a68a7004 | ||
|
11fdd08f79 | ||
|
8fb4a4669a | ||
|
5686b6bc40 | ||
|
98455a29ce | ||
|
08839343c3 | ||
|
a0859923f0 | ||
|
b379f8457d | ||
|
402de21c47 | ||
|
c05724efda | ||
|
c050046820 | ||
|
b49c75d6bd | ||
|
61d1f0bd45 | ||
|
61f7218fc0 | ||
|
4ee93b59dd | ||
|
21ec66b4e2 | ||
|
20b116f228 | ||
|
d09c3548a7 | ||
|
c0551c0cf8 | ||
|
648482183a | ||
|
4e6ee3b95b | ||
|
3506083416 | ||
|
834039c4d4 | ||
|
327dded73b | ||
|
933e4fe7d9 | ||
|
f6ee55c44f | ||
|
9ceb8b40ae | ||
|
647ef97bfb | ||
aef8edca07 | |||
|
b090b31503 | ||
|
e47cf80d60 | ||
4eb3a310a7 | |||
68f81c8c3e | |||
0f7c19da5a | |||
b5a81eb6db | |||
|
6e39f3e92a | ||
|
1b2d19c31d | ||
|
f067e55d1f | ||
|
273fba879e | ||
|
420cf4a5b8 | ||
|
148761fa63 | ||
|
fbe4f00ac0 | ||
|
7980f49dfa | ||
|
0f1a8f5531 | ||
|
077a9854a5 | ||
|
44f6d1c15d | ||
|
0be117c001 | ||
|
758c32e353 | ||
|
8f1cac6f1f | ||
|
5de070c90e | ||
|
c330fdcc1d | ||
|
40dcee6eee | ||
|
04e7c5f565 | ||
|
89e8148158 | ||
|
d281860b81 | ||
|
05c01e25e2 | ||
|
f0741dbc19 | ||
|
e18b2622eb | ||
|
2b3f2a72d7 | ||
|
8128aa7324 | ||
|
83a281b278 | ||
|
6197fd81c1 | ||
|
fcb1ce4e4b | ||
|
f82d5815ee | ||
|
71f1a1244e | ||
|
3183d71478 | ||
cf569d6e76 | |||
|
cc8c6ba61d | ||
|
b8c74db0f3 | ||
|
643486cfe5 | ||
|
1a93f2fc41 | ||
|
8217e9645b | ||
|
925ba19ff3 | ||
|
c0b40d00a5 | ||
|
b1cd4604eb | ||
|
2f5eb080cf | ||
|
910762126f | ||
|
207953cb98 | ||
|
9982804a20 | ||
|
898d6269e5 | ||
|
8da3c7bcf7 | ||
|
71c8b7c062 | ||
|
a0c7f024ad | ||
|
cbe41f7e7f | ||
|
06cc2bb35b | ||
|
b956f34a7e | ||
|
c08bb9d702 | ||
|
33e070bc43 | ||
|
22334ab15a | ||
|
438010a7fb | ||
|
c0880fc62a | ||
|
d810d50d22 | ||
|
451c47d3ed | ||
|
5abd29056b | ||
|
b47210a5ae | ||
|
110172a98a | ||
|
292907b735 | ||
|
a59bf7345f | ||
|
952d2f03dc | ||
|
7cd8d40e11 | ||
|
c20eb8c331 | ||
|
f7cfe5d2bd | ||
|
b59a4a637e | ||
|
23fba7074d | ||
|
42e8df6b53 | ||
|
91960f501b | ||
|
9c9d7bc533 | ||
|
adc394e660 | ||
|
13afc55b1f | ||
|
8ecb6e173f | ||
|
bf2de904dc | ||
|
f2978a16c0 | ||
|
9e9c653aba | ||
|
1da569c41b | ||
|
ce6c101df3 | ||
c6a045fe94 | |||
|
e2779ba107 | ||
|
ce1de0dfdf | ||
|
6096d48a05 | ||
|
db349c2a05 | ||
|
6400e20bbb | ||
|
a8aa431210 | ||
|
85b383c596 | ||
|
b434a406e0 | ||
4ec83673cf | |||
d3a49bbeb0 | |||
|
0c6b1b7f68 | ||
|
ecc24470f6 | ||
|
56f7fddb0e | ||
|
8e4b383655 | ||
|
a0fe836616 | ||
|
213667541c | ||
5897b1da75 | |||
|
9af09f5863 | ||
|
59caeca6f7 | ||
|
f6e71a03c1 | ||
|
88e772896c | ||
|
11ce513ec2 | ||
|
4afaec91bb | ||
|
98b5b8605e | ||
dce679afa2 | |||
eec5e97842 | |||
|
ed862ba6b2 | ||
|
ca907a7478 | ||
|
00dcfe3a49 | ||
|
02c095a946 | ||
|
7f3c0d2fd0 | ||
|
fc03ba67e5 | ||
|
3e27a0b366 | ||
|
c398ad239d | ||
|
82b385e5ff | ||
|
a1c45b86af | ||
|
b5e67bc576 | ||
|
9ca83f02d9 | ||
|
13ec64a4fa | ||
|
bae39e2921 | ||
|
814a5f4364 | ||
|
b02eda9fe8 | ||
|
ad55b25cf0 | ||
|
8a01394092 | ||
|
86df9ceef6 | ||
|
d8b93e976f | ||
|
6ab820ad71 | ||
|
c3f75cdc2a | ||
|
bdd437eebd | ||
|
531fb013aa | ||
|
b1e376d47f | ||
|
3584b83b28 | ||
|
3c30f57e08 | ||
|
edfc331d03 | ||
|
9ad455ea2d | ||
|
1fe2394e01 | ||
|
9003884dad | ||
8ebef6d097 | |||
542adab804 | |||
|
69347e652f | ||
|
d4c38367c7 | ||
|
966a7336e1 | ||
|
65f11dc917 | ||
|
6afc5f3e81 | ||
|
3e703c8b06 | ||
fdd579af5a | |||
|
040f0373c8 | ||
|
361d96ddf3 | ||
|
df882e3382 | ||
|
de2a393bf8 | ||
|
37559ca688 | ||
|
f53f0cedd9 | ||
|
a1880a61e9 | ||
|
040b25d601 | ||
|
f9c61808bb | ||
|
9d644782a8 | ||
|
2f66580e60 | ||
|
5d55784f79 | ||
|
55a63dacaf | ||
|
4bae6b8d43 | ||
|
5c8b70fc12 | ||
|
d2a3483d31 | ||
|
cdc0dbea86 | ||
|
3d8a6e95fa | ||
|
8a425cc435 | ||
|
50d4e7ef2f |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,5 +1,7 @@
|
|||||||
# Package Files
|
# Build files
|
||||||
*.jar
|
*.jar
|
||||||
|
**/bin
|
||||||
|
**/build
|
||||||
|
|
||||||
# Gradle
|
# Gradle
|
||||||
.gradle
|
.gradle
|
||||||
@ -10,6 +12,10 @@ steamwar.properties
|
|||||||
# IntelliJ IDEA
|
# IntelliJ IDEA
|
||||||
.idea
|
.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
plugin.yml
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
lib
|
lib
|
||||||
|
|
||||||
|
#linkage
|
||||||
|
LinkageUtils.java
|
@ -27,8 +27,8 @@ version '1.0'
|
|||||||
|
|
||||||
compileJava.options.encoding = 'UTF-8'
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 17
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 17
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.tracer.record;
|
|
||||||
|
|
||||||
import net.minecraft.server.v1_15_R1.EntityTNTPrimed;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
|
|
||||||
import org.bukkit.entity.TNTPrimed;
|
|
||||||
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
public class TNTPrimedIterator15 implements TNTPrimedIterator {
|
|
||||||
|
|
||||||
private static final CraftWorld WORLD = (CraftWorld) Bukkit.getWorlds().get(0);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Stream<TNTPrimed> iterator() {
|
|
||||||
return WORLD.getHandle().entitiesById.values().stream()
|
|
||||||
.filter(EntityTNTPrimed.class::isInstance)
|
|
||||||
.map(entity -> (TNTPrimed) entity.getBukkitEntity());
|
|
||||||
}
|
|
||||||
}
|
|
@ -37,14 +37,11 @@ import com.sk89q.worldedit.function.operation.Operations;
|
|||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.math.transform.AffineTransform;
|
import com.sk89q.worldedit.math.transform.AffineTransform;
|
||||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||||
import com.sk89q.worldedit.regions.Region;
|
|
||||||
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
||||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import de.steamwar.bausystem.region.Color;
|
|
||||||
import de.steamwar.bausystem.region.PasteOptions;
|
|
||||||
import de.steamwar.bausystem.region.Point;
|
import de.steamwar.bausystem.region.Point;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -60,7 +57,12 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
import java.util.function.BiPredicate;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class FlatteningWrapper15 implements FlatteningWrapper {
|
public class FlatteningWrapper15 implements FlatteningWrapper {
|
||||||
@ -104,56 +106,55 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
|
|
||||||
private static final WorldEditPlugin WORLDEDIT_PLUGIN = Objects.requireNonNull((WorldEditPlugin) Bukkit.getPluginManager().getPlugin("WorldEdit"));
|
private static final WorldEditPlugin WORLDEDIT_PLUGIN = Objects.requireNonNull((WorldEditPlugin) Bukkit.getPluginManager().getPlugin("WorldEdit"));
|
||||||
private static final World BUKKITWORLD = new BukkitWorld(Bukkit.getWorlds().get(0));
|
private static final World BUKKITWORLD = new BukkitWorld(Bukkit.getWorlds().get(0));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSelection(Player p, Point minPoint, Point maxPoint) {
|
public void setSelection(Player p, Point minPoint, Point maxPoint) {
|
||||||
WORLDEDIT_PLUGIN.getSession(p).setRegionSelector(BUKKITWORLD, new CuboidRegionSelector(BUKKITWORLD, toBlockVector3(minPoint), toBlockVector3(maxPoint)));
|
WORLDEDIT_PLUGIN.getSession(p).setRegionSelector(BUKKITWORLD, new CuboidRegionSelector(BUKKITWORLD, toBlockVector3(minPoint), toBlockVector3(maxPoint)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final BaseBlock WOOL = Objects.requireNonNull(BlockTypes.PINK_WOOL).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock CLAY = Objects.requireNonNull(BlockTypes.PINK_TERRACOTTA).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock GLAZED = Objects.requireNonNull(BlockTypes.PINK_GLAZED_TERRACOTTA).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock GLASS = Objects.requireNonNull(BlockTypes.PINK_STAINED_GLASS).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock GLASS_PANE = Objects.requireNonNull(BlockTypes.PINK_STAINED_GLASS_PANE).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock CONCRETE = Objects.requireNonNull(BlockTypes.PINK_CONCRETE).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock CONCRETE_POWDER = Objects.requireNonNull(BlockTypes.PINK_CONCRETE_POWDER).getDefaultState().toBaseBlock();
|
|
||||||
private static final BaseBlock CARPET = Objects.requireNonNull(BlockTypes.PINK_CARPET).getDefaultState().toBaseBlock();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EditSession paste(File file, Point pastePoint, PasteOptions pasteOptions) {
|
public Clipboard loadSchematic(File file) {
|
||||||
Clipboard clipboard;
|
Clipboard clipboard;
|
||||||
try (ClipboardReader reader = Objects.requireNonNull(ClipboardFormats.findByFile(file)).getReader(new FileInputStream(file))) {
|
try (ClipboardReader reader = Objects.requireNonNull(ClipboardFormats.findByFile(file)).getReader(new FileInputStream(file))) {
|
||||||
clipboard = reader.read();
|
clipboard = reader.read();
|
||||||
} catch (NullPointerException | IOException e) {
|
} catch (NullPointerException | IOException e) {
|
||||||
throw new SecurityException("Bausystem schematic not found", e);
|
throw new SecurityException("Bausystem schematic not found", e);
|
||||||
}
|
}
|
||||||
|
return clipboard;
|
||||||
EditSession editSession = paste(clipboard, pastePoint, pasteOptions);
|
|
||||||
return editSession;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EditSession paste(Clipboard clipboard, Point pastePoint, PasteOptions pasteOptions) {
|
public EditSession paste(PasteBuilder pasteBuilder) {
|
||||||
try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) {
|
try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) {
|
||||||
if (pasteOptions.getColor() != Color.PINK) {
|
Clipboard clipboard = pasteBuilder.getClipboard();
|
||||||
changeColor(clipboard, pasteOptions.getColor());
|
|
||||||
}
|
|
||||||
if (pasteOptions.isOnlyColors()) {
|
|
||||||
Set<String> blocks = new HashSet<>();
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_wool");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_terracotta");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_glazed_terracotta");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_stained_glass");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_stained_glass_pane");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_concrete");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_concrete_powder");
|
|
||||||
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_carpet");
|
|
||||||
|
|
||||||
|
if (!pasteBuilder.getMappers().isEmpty()) {
|
||||||
|
BlockVector3 minimum = clipboard.getRegion().getMinimumPoint();
|
||||||
|
for (int x = 0; x < clipboard.getDimensions().getX(); x++) {
|
||||||
|
for (int y = 0; y < clipboard.getDimensions().getY(); y++) {
|
||||||
|
for (int z = 0; z < clipboard.getDimensions().getZ(); z++) {
|
||||||
|
BlockVector3 pos = minimum.add(x, y, z);
|
||||||
|
pasteBuilder.getMappers().forEach(mapper -> mapper.accept(clipboard, pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AtomicReference<BlockVector3> pastePoint = new AtomicReference<>();
|
||||||
|
if (!pasteBuilder.getPredicates().isEmpty()) {
|
||||||
e.setMask(new Mask() {
|
e.setMask(new Mask() {
|
||||||
@Override
|
@Override
|
||||||
public boolean test(BlockVector3 blockVector3) {
|
public boolean test(BlockVector3 blockVector3) {
|
||||||
BaseBlock block = clipboard.getFullBlock(blockVector3);
|
BaseBlock block = clipboard.getFullBlock(blockVector3.subtract(pastePoint.get()).add(clipboard.getRegion().getMinimumPoint()));
|
||||||
String blockName = block.toString().toLowerCase();
|
String blockName = block.getBlockType().toString().toLowerCase();
|
||||||
return blocks.contains(blockName);
|
for (BiPredicate<BaseBlock, String> predicate : pasteBuilder.getPredicates()) {
|
||||||
|
if (!predicate.test(block, blockName)) return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mask copy() {
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -161,31 +162,28 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
public Mask2D toMask2D() {
|
public Mask2D toMask2D() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mask copy() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ClipboardHolder ch = new ClipboardHolder(clipboard);
|
ClipboardHolder ch = new ClipboardHolder(clipboard);
|
||||||
BlockVector3 dimensions = clipboard.getDimensions();
|
BlockVector3 dimensions = clipboard.getDimensions();
|
||||||
BlockVector3 v = BlockVector3.at(pastePoint.getX(), pastePoint.getY(), pastePoint.getZ());
|
BlockVector3 v = BlockVector3.at(pasteBuilder.getPastPoint().getX(), pasteBuilder.getPastPoint().getY(), pasteBuilder.getPastPoint().getZ());
|
||||||
BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
|
BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
|
||||||
if (pasteOptions.isRotate()) {
|
if (pasteBuilder.isRotate()) {
|
||||||
ch.setTransform(new AffineTransform().rotateY(180));
|
ch.setTransform(new AffineTransform().rotateY(180));
|
||||||
v = v.add(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset.multiply(-1, 1, -1)).subtract(0, 0, 1);
|
v = v.add(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset.multiply(-1, 1, -1)).subtract(0, 0, 1);
|
||||||
} else {
|
} else {
|
||||||
v = v.subtract(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset);
|
v = v.subtract(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset);
|
||||||
}
|
}
|
||||||
|
pastePoint.set(v);
|
||||||
|
|
||||||
if (pasteOptions.isReset()) {
|
if (pasteBuilder.isReset()) {
|
||||||
e.setBlocks((Region) new CuboidRegion(toBlockVector3(pasteOptions.getMinPoint()), toBlockVector3(pasteOptions.getMaxPoint())), Objects.requireNonNull(BlockTypes.AIR).getDefaultState().toBaseBlock());
|
e.setBlocks(new CuboidRegion(toBlockVector3(pasteBuilder.getMinPoint()), toBlockVector3(pasteBuilder.getMaxPoint())), Objects.requireNonNull(BlockTypes.AIR).getDefaultState().toBaseBlock());
|
||||||
if (pasteOptions.getWaterLevel() != 0) {
|
if (pasteBuilder.getWaterLevel() != 0) {
|
||||||
e.setBlocks((Region) new CuboidRegion(toBlockVector3(pasteOptions.getMinPoint()), toBlockVector3(pasteOptions.getMaxPoint()).withY(pasteOptions.getWaterLevel())), Objects.requireNonNull(BlockTypes.WATER).getDefaultState().toBaseBlock());
|
e.setBlocks(new CuboidRegion(toBlockVector3(pasteBuilder.getMinPoint()), toBlockVector3(pasteBuilder.getMaxPoint()).withY(pasteBuilder.getWaterLevel())), Objects.requireNonNull(BlockTypes.WATER).getDefaultState().toBaseBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Operations.completeBlindly(ch.createPaste(e).to(v).ignoreAirBlocks(pasteOptions.isIgnoreAir()).build());
|
Operations.completeBlindly(ch.createPaste(e).to(v).ignoreAirBlocks(pasteBuilder.isIgnoreAir()).build());
|
||||||
return e;
|
return e;
|
||||||
} catch (WorldEditException e) {
|
} catch (WorldEditException e) {
|
||||||
throw new SecurityException(e.getMessage(), e);
|
throw new SecurityException(e.getMessage(), e);
|
||||||
@ -193,46 +191,7 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void changeColor(Clipboard clipboard, Color color) throws WorldEditException {
|
public Clipboard copy(Point minPoint, Point maxPoint, Point copyPoint) {
|
||||||
BlockVector3 minimum = clipboard.getRegion().getMinimumPoint();
|
|
||||||
BaseBlock wool = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_wool")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock clay = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_terracotta")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock glazed = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_glazed_terracotta")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock glass = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_stained_glass")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock glassPane = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_stained_glass_pane")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock carpet = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_carpet")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock concrete = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_concrete")).getDefaultState().toBaseBlock();
|
|
||||||
BaseBlock concretePowder = Objects.requireNonNull(BlockTypes.get(color.name().toLowerCase() + "_concrete_powder")).getDefaultState().toBaseBlock();
|
|
||||||
|
|
||||||
for (int x = 0; x < clipboard.getDimensions().getX(); x++) {
|
|
||||||
for (int y = 0; y < clipboard.getDimensions().getY(); y++) {
|
|
||||||
for (int z = 0; z < clipboard.getDimensions().getZ(); z++) {
|
|
||||||
BlockVector3 pos = minimum.add(x, y, z);
|
|
||||||
BaseBlock block = clipboard.getFullBlock(pos);
|
|
||||||
if (block.equals(WOOL)) {
|
|
||||||
clipboard.setBlock(pos, wool);
|
|
||||||
} else if (block.equals(CLAY)) {
|
|
||||||
clipboard.setBlock(pos, clay);
|
|
||||||
} else if (block.equals(GLAZED)) {
|
|
||||||
clipboard.setBlock(pos, glazed);
|
|
||||||
} else if (block.equals(GLASS)) {
|
|
||||||
clipboard.setBlock(pos, glass);
|
|
||||||
} else if (block.equals(GLASS_PANE)) {
|
|
||||||
clipboard.setBlock(pos, glassPane);
|
|
||||||
} else if (block.equals(CARPET)) {
|
|
||||||
clipboard.setBlock(pos, carpet);
|
|
||||||
} else if (block.equals(CONCRETE)) {
|
|
||||||
clipboard.setBlock(pos, concrete);
|
|
||||||
} else if (block.equals(CONCRETE_POWDER)) {
|
|
||||||
clipboard.setBlock(pos, concretePowder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean backup(Point minPoint, Point maxPoint, File file) {
|
|
||||||
BukkitWorld bukkitWorld = new BukkitWorld(Bukkit.getWorlds().get(0));
|
BukkitWorld bukkitWorld = new BukkitWorld(Bukkit.getWorlds().get(0));
|
||||||
CuboidRegion region = new CuboidRegion(bukkitWorld, toBlockVector3(minPoint), toBlockVector3(maxPoint));
|
CuboidRegion region = new CuboidRegion(bukkitWorld, toBlockVector3(minPoint), toBlockVector3(maxPoint));
|
||||||
BlockArrayClipboard clipboard = new BlockArrayClipboard(region);
|
BlockArrayClipboard clipboard = new BlockArrayClipboard(region);
|
||||||
@ -245,12 +204,21 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
copy.setCopyingBiomes(false);
|
copy.setCopyingBiomes(false);
|
||||||
|
|
||||||
Operations.complete(copy);
|
Operations.complete(copy);
|
||||||
|
clipboard.setOrigin(toBlockVector3(copyPoint));
|
||||||
|
return clipboard;
|
||||||
|
} catch (WorldEditException e) {
|
||||||
|
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean backup(Point minPoint, Point maxPoint, File file) {
|
||||||
|
Clipboard clipboard = copy(minPoint, maxPoint, minPoint);
|
||||||
try (ClipboardWriter writer = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(file))) {
|
try (ClipboardWriter writer = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(file))) {
|
||||||
writer.write(clipboard);
|
writer.write(clipboard);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
} catch (WorldEditException | IOException e) {
|
} catch (IOException e) {
|
||||||
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -272,19 +240,4 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
|||||||
|
|
||||||
return ((Waterlogged) data).isWaterlogged();
|
return ((Waterlogged) data).isWaterlogged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Material getTraceShowMaterial() {
|
|
||||||
return Material.LIME_CONCRETE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Material getTraceHideMaterial() {
|
|
||||||
return Material.RED_CONCRETE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Material getTraceXZMaterial() {
|
|
||||||
return Material.QUARTZ_SLAB;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -63,38 +63,6 @@ public class NMSWrapper15 implements NMSWrapper {
|
|||||||
player.updateInventory();
|
player.updateInventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(LongSupplier longSupplier) {
|
|
||||||
SystemUtils.a = () -> System.nanoTime() + longSupplier.getAsLong();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final List<Packet<?>> packets = new ArrayList<>();
|
|
||||||
private static final Vec3D noMotion = new Vec3D(0, 0, 0);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createTickCache(World world) {
|
|
||||||
packets.clear();
|
|
||||||
world.getEntities().stream().filter(entity -> !(entity instanceof Player)).forEach(entity -> {
|
|
||||||
packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), noMotion));
|
|
||||||
packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle()));
|
|
||||||
|
|
||||||
if (entity instanceof TNTPrimed) {
|
|
||||||
net.minecraft.server.v1_15_R1.Entity serverEntity = ((CraftEntity) entity).getHandle();
|
|
||||||
packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendTickPackets() {
|
|
||||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
|
||||||
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
|
|
||||||
for (Packet<?> p : packets) {
|
|
||||||
connection.sendPacket(p);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Reflection.FieldAccessor<Integer> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, int.class, 0);
|
private static final Reflection.FieldAccessor<Integer> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, int.class, 0);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
43
BauSystem_15/src/de/steamwar/bausystem/utils/PlaceItemWrapper15.java
Normale Datei
43
BauSystem_15/src/de/steamwar/bausystem/utils/PlaceItemWrapper15.java
Normale Datei
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
|
||||||
|
public class PlaceItemWrapper15 implements PlaceItemWrapper {
|
||||||
|
|
||||||
|
public PlaceItemWrapper15() {
|
||||||
|
for (Material material : Material.values()) {
|
||||||
|
if (!material.isBlock()) continue;
|
||||||
|
if (material.isLegacy()) continue;
|
||||||
|
|
||||||
|
String nonWall = material.name().replace("_WALL_", "").replace("WALL_", "").replace("_WALL", "");
|
||||||
|
try {
|
||||||
|
Material nonWallMaterial = Material.valueOf(nonWall);
|
||||||
|
if (nonWallMaterial != material && nonWallMaterial.isItem() && !nonWallMaterial.isBlock()) {
|
||||||
|
BLOCK_MATERIAL_TO_WALL_BLOCK_MATERIAL.put(nonWallMaterial, material);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ITEM_MATERIAL_TO_BLOCK_MATERIAL.put(Material.REDSTONE, Material.REDSTONE_WIRE);
|
||||||
|
}
|
||||||
|
}
|
@ -19,9 +19,12 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.utils;
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.comphenix.tinyprotocol.Reflection;
|
||||||
import de.steamwar.bausystem.utils.PlayerMovementWrapper;
|
import de.steamwar.bausystem.utils.PlayerMovementWrapper;
|
||||||
import net.minecraft.server.v1_15_R1.EntityPlayer;
|
import net.minecraft.server.v1_15_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_15_R1.PacketPlayInFlying;
|
import net.minecraft.server.v1_15_R1.PacketPlayInFlying;
|
||||||
|
import net.minecraft.server.v1_15_R1.PacketPlayOutEntity;
|
||||||
|
import net.minecraft.server.v1_15_R1.PacketPlayOutEntityTeleport;
|
||||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -37,4 +40,20 @@ public class PlayerMovementWrapper15 implements PlayerMovementWrapper {
|
|||||||
entityPlayer.setLocation(packetPlayInFlying.a(0.0), packetPlayInFlying.b(0.0), packetPlayInFlying.c(0.0), packetPlayInFlying.a(0F), packetPlayInFlying.b(0F));
|
entityPlayer.setLocation(packetPlayInFlying.a(0.0), packetPlayInFlying.b(0.0), packetPlayInFlying.c(0.0), packetPlayInFlying.a(0F), packetPlayInFlying.b(0F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object convertToOut(Player player, Object object) {
|
||||||
|
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
||||||
|
Object packet = Reflection.newInstance(teleportPacket);
|
||||||
|
teleportEntity.set(packet, player.getEntityId());
|
||||||
|
teleportPosition.set(packet, packetPlayInFlying.a(0.0), packetPlayInFlying.b(0.0), packetPlayInFlying.c(0.0));
|
||||||
|
if (Float.isNaN(packetPlayInFlying.a(Float.NaN))) {
|
||||||
|
teleportYaw.set(packet, rotToByte(player.getLocation().getYaw()));
|
||||||
|
teleportPitch.set(packet, rotToByte(player.getLocation().getPitch()));
|
||||||
|
} else {
|
||||||
|
teleportYaw.set(packet, rotToByte(packetPlayInFlying.a(0.0F)));
|
||||||
|
teleportPitch.set(packet, rotToByte(packetPlayInFlying.b(0.0F)));
|
||||||
|
}
|
||||||
|
return packet;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
23
BauSystem_15/src/de/steamwar/bausystem/utils/TickListener15.java
Normale Datei
23
BauSystem_15/src/de/steamwar/bausystem/utils/TickListener15.java
Normale Datei
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
public class TickListener15 implements TickListener {
|
||||||
|
}
|
@ -27,8 +27,8 @@ version '1.0'
|
|||||||
|
|
||||||
compileJava.options.encoding = 'UTF-8'
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 17
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 17
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.tracer.record;
|
|
||||||
|
|
||||||
import net.minecraft.world.entity.item.EntityTNTPrimed;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
|
|
||||||
import org.bukkit.entity.TNTPrimed;
|
|
||||||
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
import java.util.stream.StreamSupport;
|
|
||||||
|
|
||||||
public class TNTPrimedIterator18 implements TNTPrimedIterator {
|
|
||||||
|
|
||||||
private static final CraftWorld WORLD = (CraftWorld) Bukkit.getWorlds().get(0);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Stream<TNTPrimed> iterator() {
|
|
||||||
return StreamSupport.stream(WORLD.getHandle().H().a().spliterator(), false)
|
|
||||||
.filter(EntityTNTPrimed.class::isInstance)
|
|
||||||
.map(entity -> (TNTPrimed) entity.getBukkitEntity());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -73,37 +73,6 @@ public class NMSWrapper18 implements NMSWrapper {
|
|||||||
player.updateInventory();
|
player.updateInventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(LongSupplier longSupplier) {
|
|
||||||
SystemUtils.a = () -> System.nanoTime() + longSupplier.getAsLong();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final List<Packet<?>> packets = new ArrayList<>();
|
|
||||||
private static final Vec3D noMotion = new Vec3D(0, 0, 0);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createTickCache(World world) {
|
|
||||||
packets.clear();
|
|
||||||
world.getEntities().stream().filter(entity -> !(entity instanceof Player)).forEach(entity -> {
|
|
||||||
packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), noMotion));
|
|
||||||
packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle()));
|
|
||||||
|
|
||||||
if (entity instanceof TNTPrimed) {
|
|
||||||
net.minecraft.world.entity.Entity serverEntity = ((CraftEntity) entity).getHandle();
|
|
||||||
packets.add(new PacketPlayOutEntityMetadata(serverEntity.ae(), serverEntity.ai(), true));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendTickPackets() {
|
|
||||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
|
||||||
for (Packet<?> p : packets) {
|
|
||||||
TinyProtocol.instance.sendPacket(player, p);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Reflection.FieldAccessor<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
|
private static final Reflection.FieldAccessor<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.utils;
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.comphenix.tinyprotocol.Reflection;
|
||||||
import de.steamwar.bausystem.utils.PlayerMovementWrapper;
|
import de.steamwar.bausystem.utils.PlayerMovementWrapper;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayInFlying;
|
import net.minecraft.network.protocol.game.PacketPlayInFlying;
|
||||||
import net.minecraft.server.level.EntityPlayer;
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
@ -37,4 +38,20 @@ public class PlayerMovementWrapper18 implements PlayerMovementWrapper {
|
|||||||
entityPlayer.e(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
entityPlayer.e(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object convertToOut(Player player, Object object) {
|
||||||
|
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
||||||
|
Object packet = Reflection.newInstance(teleportPacket);
|
||||||
|
teleportEntity.set(packet, player.getEntityId());
|
||||||
|
teleportPosition.set(packet, packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
||||||
|
if (packetPlayInFlying.h) {
|
||||||
|
teleportYaw.set(packet, rotToByte(player.getLocation().getYaw()));
|
||||||
|
teleportPitch.set(packet, rotToByte(player.getLocation().getPitch()));
|
||||||
|
} else {
|
||||||
|
teleportYaw.set(packet, rotToByte(packetPlayInFlying.d));
|
||||||
|
teleportPitch.set(packet, rotToByte(packetPlayInFlying.e));
|
||||||
|
}
|
||||||
|
return packet;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,8 @@ version '1.0'
|
|||||||
|
|
||||||
compileJava.options.encoding = 'UTF-8'
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 17
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 17
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@ -51,6 +51,7 @@ dependencies {
|
|||||||
implementation project(":BauSystem_Main")
|
implementation project(":BauSystem_Main")
|
||||||
|
|
||||||
compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
|
compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
|
||||||
|
compileOnly 'io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT'
|
||||||
compileOnly 'it.unimi.dsi:fastutil:8.5.6'
|
compileOnly 'it.unimi.dsi:fastutil:8.5.6'
|
||||||
compileOnly 'com.mojang:datafixerupper:4.0.26'
|
compileOnly 'com.mojang:datafixerupper:4.0.26'
|
||||||
compileOnly 'io.netty:netty-all:4.1.68.Final'
|
compileOnly 'io.netty:netty-all:4.1.68.Final'
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.tracer.record;
|
|
||||||
|
|
||||||
import net.minecraft.world.entity.item.EntityTNTPrimed;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.craftbukkit.v1_19_R2.CraftWorld;
|
|
||||||
import org.bukkit.entity.TNTPrimed;
|
|
||||||
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
import java.util.stream.StreamSupport;
|
|
||||||
|
|
||||||
public class TNTPrimedIterator19 implements TNTPrimedIterator {
|
|
||||||
|
|
||||||
private static final CraftWorld WORLD = (CraftWorld) Bukkit.getWorlds().get(0);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Stream<TNTPrimed> iterator() {
|
|
||||||
return StreamSupport.stream(WORLD.getHandle().F().a().spliterator(), false)
|
|
||||||
.filter(EntityTNTPrimed.class::isInstance)
|
|
||||||
.map(entity -> (TNTPrimed) entity.getBukkitEntity());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -55,7 +55,6 @@ public class NMSWrapper19 implements NMSWrapper {
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void setInternalGameMode(Player player, GameMode gameMode) {
|
public void setInternalGameMode(Player player, GameMode gameMode) {
|
||||||
playerGameMode.set(((CraftPlayer) player).getHandle().d, EnumGamemode.a(gameMode.getValue()));
|
playerGameMode.set(((CraftPlayer) player).getHandle().d, EnumGamemode.a(gameMode.getValue()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -74,39 +73,6 @@ public class NMSWrapper19 implements NMSWrapper {
|
|||||||
player.updateInventory();
|
player.updateInventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(LongSupplier longSupplier) {
|
|
||||||
SystemUtils.a = () -> System.nanoTime() + longSupplier.getAsLong();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final List<Packet<?>> packets = new ArrayList<>();
|
|
||||||
private static final Vec3D noMotion = new Vec3D(0, 0, 0);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createTickCache(World world) {
|
|
||||||
packets.clear();
|
|
||||||
world.getEntities().stream().filter(entity -> !(entity instanceof Player)).forEach(entity -> {
|
|
||||||
packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), noMotion));
|
|
||||||
packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle()));
|
|
||||||
|
|
||||||
if (entity instanceof TNTPrimed) {
|
|
||||||
net.minecraft.world.entity.Entity serverEntity = ((CraftEntity) entity).getHandle();
|
|
||||||
List<DataWatcher.b<?>> list = serverEntity.al().c();
|
|
||||||
if(list != null)
|
|
||||||
packets.add(new PacketPlayOutEntityMetadata(serverEntity.ah(), list));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendTickPackets() {
|
|
||||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
|
||||||
for (Packet<?> p : packets) {
|
|
||||||
TinyProtocol.instance.sendPacket(player, p);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Reflection.FieldAccessor<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
|
private static final Reflection.FieldAccessor<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.utils;
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.comphenix.tinyprotocol.Reflection;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayInFlying;
|
import net.minecraft.network.protocol.game.PacketPlayInFlying;
|
||||||
import net.minecraft.server.level.EntityPlayer;
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -31,50 +32,30 @@ import java.util.UUID;
|
|||||||
|
|
||||||
public class PlayerMovementWrapper19 implements PlayerMovementWrapper {
|
public class PlayerMovementWrapper19 implements PlayerMovementWrapper {
|
||||||
|
|
||||||
private static class Position {
|
|
||||||
private double x;
|
|
||||||
private double y;
|
|
||||||
private double z;
|
|
||||||
private float yaw;
|
|
||||||
private float pitch;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Map<UUID, Position> playerLocationMap = new HashMap<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPosition(Player player, Object object) {
|
public void setPosition(Player player, Object object) {
|
||||||
Position position = playerLocationMap.computeIfAbsent(player.getUniqueId(), uuid -> {
|
|
||||||
Position pos = new Position();
|
|
||||||
Location location = player.getLocation();
|
|
||||||
pos.x = location.getX();
|
|
||||||
pos.y = location.getY();
|
|
||||||
pos.z = location.getZ();
|
|
||||||
pos.yaw = location.getYaw();
|
|
||||||
pos.pitch = location.getPitch();
|
|
||||||
return pos;
|
|
||||||
});
|
|
||||||
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
||||||
EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
|
EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
|
||||||
if (packetPlayInFlying.h) {
|
if (packetPlayInFlying.h) {
|
||||||
entityPlayer.b(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c, packetPlayInFlying.d, packetPlayInFlying.e);
|
entityPlayer.b(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c, packetPlayInFlying.d, packetPlayInFlying.e);
|
||||||
position.x = packetPlayInFlying.a;
|
|
||||||
position.y = packetPlayInFlying.b;
|
|
||||||
position.z = packetPlayInFlying.c;
|
|
||||||
position.yaw = packetPlayInFlying.d;
|
|
||||||
position.pitch = packetPlayInFlying.e;
|
|
||||||
} else {
|
} else {
|
||||||
entityPlayer.e(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
entityPlayer.e(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
||||||
position.x = packetPlayInFlying.a;
|
|
||||||
position.y = packetPlayInFlying.b;
|
|
||||||
position.z = packetPlayInFlying.c;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disable(Player player) {
|
public Object convertToOut(Player player, Object object) {
|
||||||
Position position = playerLocationMap.remove(player.getUniqueId());
|
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
||||||
if (position != null) {
|
Object packet = Reflection.newInstance(teleportPacket);
|
||||||
player.teleport(new Location(player.getWorld(), position.x, position.y, position.z, position.yaw, position.pitch));
|
teleportEntity.set(packet, player.getEntityId());
|
||||||
}
|
teleportPosition.set(packet, packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
||||||
|
if (packetPlayInFlying.h) {
|
||||||
|
teleportYaw.set(packet, rotToByte(player.getLocation().getYaw()));
|
||||||
|
teleportPitch.set(packet, rotToByte(player.getLocation().getPitch()));
|
||||||
|
} else {
|
||||||
|
teleportYaw.set(packet, rotToByte(packetPlayInFlying.d));
|
||||||
|
teleportPitch.set(packet, rotToByte(packetPlayInFlying.e));
|
||||||
|
}
|
||||||
|
return packet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
51
BauSystem_19/src/de/steamwar/bausystem/utils/TickListener19.java
Normale Datei
51
BauSystem_19/src/de/steamwar/bausystem/utils/TickListener19.java
Normale Datei
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.destroystokyo.paper.event.server.ServerTickEndEvent;
|
||||||
|
import com.destroystokyo.paper.event.server.ServerTickStartEvent;
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.features.tpslimit.TPSFreezeUtils;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
|
public class TickListener19 implements TickListener, Listener {
|
||||||
|
|
||||||
|
private boolean tickStartRan = false;
|
||||||
|
|
||||||
|
public TickListener19() {
|
||||||
|
Bukkit.getPluginManager().registerEvents(this, BauSystem.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onServerTickStart(ServerTickStartEvent event) {
|
||||||
|
if (TPSFreezeUtils.isFrozen()) return;
|
||||||
|
Bukkit.getPluginManager().callEvent(new TickStartEvent());
|
||||||
|
tickStartRan = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onServerTickEnd(ServerTickEndEvent event) {
|
||||||
|
if (!tickStartRan) return;
|
||||||
|
Bukkit.getPluginManager().callEvent(new TickEndEvent());
|
||||||
|
tickStartRan = false;
|
||||||
|
}
|
||||||
|
}
|
62
BauSystem_20/build.gradle
Normale Datei
62
BauSystem_20/build.gradle
Normale Datei
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'base'
|
||||||
|
id 'java'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'steamwar'
|
||||||
|
version '1.0'
|
||||||
|
|
||||||
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
||||||
|
sourceCompatibility = 17
|
||||||
|
targetCompatibility = 17
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
java {
|
||||||
|
srcDirs = ['src/']
|
||||||
|
}
|
||||||
|
resources {
|
||||||
|
srcDirs = ['src/']
|
||||||
|
exclude '**/*.java', '**/*.kt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly 'org.projectlombok:lombok:1.18.22'
|
||||||
|
testCompileOnly 'org.projectlombok:lombok:1.18.22'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||||
|
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||||
|
|
||||||
|
implementation project(":BauSystem_Main")
|
||||||
|
|
||||||
|
compileOnly 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT'
|
||||||
|
compileOnly 'it.unimi.dsi:fastutil:8.5.6'
|
||||||
|
compileOnly 'com.mojang:datafixerupper:4.0.26'
|
||||||
|
compileOnly 'io.netty:netty-all:4.1.68.Final'
|
||||||
|
compileOnly 'com.mojang:authlib:1.5.25'
|
||||||
|
compileOnly 'com.mojang:brigadier:1.0.18'
|
||||||
|
|
||||||
|
compileOnly swdep('Spigot-1.20')
|
||||||
|
compileOnly swdep('SpigotCore')
|
||||||
|
}
|
136
BauSystem_20/src/de/steamwar/bausystem/utils/NMSWrapper20.java
Normale Datei
136
BauSystem_20/src/de/steamwar/bausystem/utils/NMSWrapper20.java
Normale Datei
@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.comphenix.tinyprotocol.Reflection;
|
||||||
|
import de.steamwar.bausystem.features.util.NoClipCommand;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayInSetCreativeSlot;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutExplosion;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutGameStateChange;
|
||||||
|
import net.minecraft.server.level.PlayerInteractManager;
|
||||||
|
import net.minecraft.world.level.EnumGamemode;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer;
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R1.inventory.CraftItemStack;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class NMSWrapper20 implements NMSWrapper {
|
||||||
|
|
||||||
|
private static final Reflection.FieldAccessor<EnumGamemode> playerGameMode = Reflection.getField(PlayerInteractManager.class, EnumGamemode.class, 0);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public void setInternalGameMode(Player player, GameMode gameMode) {
|
||||||
|
playerGameMode.set(((CraftPlayer) player).getHandle().e, EnumGamemode.a(gameMode.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSlotToItemStack(Player player, Object o) {
|
||||||
|
PacketPlayInSetCreativeSlot packetPlayInSetCreativeSlot = (PacketPlayInSetCreativeSlot) o;
|
||||||
|
int index = packetPlayInSetCreativeSlot.a();
|
||||||
|
if (index >= 36 && index <= 44) {
|
||||||
|
index -= 36;
|
||||||
|
} else if (index > 44) {
|
||||||
|
index -= 5;
|
||||||
|
} else if (index <= 8) {
|
||||||
|
index = index - 8 + 36;
|
||||||
|
}
|
||||||
|
player.getInventory().setItem(index, CraftItemStack.asBukkitCopy(packetPlayInSetCreativeSlot.c()));
|
||||||
|
if (index < 9) player.getInventory().setHeldItemSlot(index);
|
||||||
|
player.updateInventory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Reflection.FieldAccessor<PacketPlayOutGameStateChange.a> gameStateChangeReason = Reflection.getField(NoClipCommand.gameStateChange, PacketPlayOutGameStateChange.a.class, 12);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGameStateChangeReason(Object packet) {
|
||||||
|
gameStateChangeReason.set(packet, PacketPlayOutGameStateChange.d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPlayerBuildAbilities(Player player) {
|
||||||
|
((CraftPlayer) player).getHandle().fO().d = true;
|
||||||
|
((CraftPlayer) player).getHandle().fO().e = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Material pathMaterial() {
|
||||||
|
return Material.DIRT_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int threshold = 2048;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkItemStack(ItemStack item) {
|
||||||
|
net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
|
||||||
|
NBTTagCompound tag = nmsItem.v();
|
||||||
|
if (tag != null && tag.e("BlockEntityTag")) {
|
||||||
|
NBTTagCompound blockTag = tag.p("BlockEntityTag");
|
||||||
|
if (blockTag.e("Items")) {
|
||||||
|
return drillDown(blockTag.c("Items", 10), 0, 0) > threshold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int drillDown(NBTTagList items, int layer, int start) {
|
||||||
|
if (layer > 2) return start + threshold;
|
||||||
|
int invalid = start;
|
||||||
|
for (NBTBase nbtBase : items) {
|
||||||
|
if (!(nbtBase instanceof NBTTagCompound))
|
||||||
|
continue;
|
||||||
|
NBTTagCompound slot = (NBTTagCompound) nbtBase;
|
||||||
|
if (slot.e("tag")) {
|
||||||
|
invalid += slot.f("Count");
|
||||||
|
NBTTagCompound iTag = slot.p("tag");
|
||||||
|
if (iTag.e("BlockEntityTag")) {
|
||||||
|
NBTTagCompound blockTag = iTag.p("BlockEntityTag");
|
||||||
|
if (blockTag.e("Items")) {
|
||||||
|
invalid = drillDown(blockTag.c("Items", 10), layer + 1, invalid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (invalid > threshold)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Class<?> explosionPacket = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutExplosion");
|
||||||
|
private final Reflection.FieldAccessor<Double> a = Reflection.getField(explosionPacket, double.class, 0);
|
||||||
|
private final Reflection.FieldAccessor<Double> b = Reflection.getField(explosionPacket, double.class, 1);
|
||||||
|
private final Reflection.FieldAccessor<Double> c = Reflection.getField(explosionPacket, double.class, 2);
|
||||||
|
private final Reflection.FieldAccessor<Float> d = Reflection.getField(explosionPacket, float.class, 0);
|
||||||
|
private final Reflection.FieldAccessor<List> e = Reflection.getField(explosionPacket, List.class, 0);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object resetExplosionKnockback(Object packet) {
|
||||||
|
PacketPlayOutExplosion packetPlayOutExplosion = (PacketPlayOutExplosion) packet;
|
||||||
|
return new PacketPlayOutExplosion(a.get(packetPlayOutExplosion), b.get(packetPlayOutExplosion), c.get(packetPlayOutExplosion), d.get(packetPlayOutExplosion), e.get(packetPlayOutExplosion), null);
|
||||||
|
}
|
||||||
|
}
|
43
BauSystem_20/src/de/steamwar/bausystem/utils/PlaceItemWrapper20.java
Normale Datei
43
BauSystem_20/src/de/steamwar/bausystem/utils/PlaceItemWrapper20.java
Normale Datei
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.data.BlockData;
|
||||||
|
|
||||||
|
public class PlaceItemWrapper20 implements PlaceItemWrapper {
|
||||||
|
|
||||||
|
public PlaceItemWrapper20() {
|
||||||
|
for (Material material : Material.values()) {
|
||||||
|
if (!material.isBlock()) continue;
|
||||||
|
if (material.isLegacy()) continue;
|
||||||
|
BlockData blockData = material.createBlockData();
|
||||||
|
Material placementMaterial = blockData.getPlacementMaterial();
|
||||||
|
if (material == placementMaterial) continue;
|
||||||
|
if (placementMaterial == Material.AIR) continue;
|
||||||
|
if (placementMaterial.isItem() && !placementMaterial.isBlock()) {
|
||||||
|
ITEM_MATERIAL_TO_BLOCK_MATERIAL.put(placementMaterial, material);
|
||||||
|
}
|
||||||
|
if (material.name().contains("WALL")) {
|
||||||
|
BLOCK_MATERIAL_TO_WALL_BLOCK_MATERIAL.put(placementMaterial, material);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.utils;
|
||||||
|
|
||||||
|
import com.comphenix.tinyprotocol.Reflection;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayInFlying;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutEntityTeleport;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class PlayerMovementWrapper20 implements PlayerMovementWrapper {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPosition(Player player, Object object) {
|
||||||
|
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
||||||
|
EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
|
||||||
|
if (packetPlayInFlying.h) {
|
||||||
|
entityPlayer.b(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c, packetPlayInFlying.d, packetPlayInFlying.e);
|
||||||
|
} else {
|
||||||
|
entityPlayer.e(packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object convertToOut(Player player, Object object) {
|
||||||
|
PacketPlayInFlying packetPlayInFlying = ((PacketPlayInFlying) object);
|
||||||
|
Object packet = Reflection.newInstance(teleportPacket);
|
||||||
|
teleportEntity.set(packet, player.getEntityId());
|
||||||
|
teleportPosition.set(packet, packetPlayInFlying.a, packetPlayInFlying.b, packetPlayInFlying.c);
|
||||||
|
if (packetPlayInFlying.h) {
|
||||||
|
teleportYaw.set(packet, rotToByte(player.getLocation().getYaw()));
|
||||||
|
teleportPitch.set(packet, rotToByte(player.getLocation().getPitch()));
|
||||||
|
} else {
|
||||||
|
teleportYaw.set(packet, rotToByte(packetPlayInFlying.d));
|
||||||
|
teleportPitch.set(packet, rotToByte(packetPlayInFlying.e));
|
||||||
|
}
|
||||||
|
return packet;
|
||||||
|
}
|
||||||
|
}
|
@ -27,8 +27,8 @@ version '1.0'
|
|||||||
|
|
||||||
compileJava.options.encoding = 'UTF-8'
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 17
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 17
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
|
@ -35,6 +35,6 @@ public class ScoreboardElement_GENERIC implements LinkageType {
|
|||||||
@Override
|
@Override
|
||||||
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
||||||
buildPlan.addImport("de.steamwar.bausystem.features.world.BauScoreboard");
|
buildPlan.addImport("de.steamwar.bausystem.features.world.BauScoreboard");
|
||||||
methodBuilder.addLine("BauScoreboard.ELEMENTS.add(" + s + ");");
|
methodBuilder.addLine("BauScoreboard.addElement(" + s + ");");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.linkage.types;
|
|
||||||
|
|
||||||
import de.steamwar.linkage.LinkageType;
|
|
||||||
import de.steamwar.linkage.plan.BuildPlan;
|
|
||||||
import de.steamwar.linkage.plan.MethodBuilder;
|
|
||||||
|
|
||||||
import javax.lang.model.element.TypeElement;
|
|
||||||
|
|
||||||
public class SmartPlaceBehaviour_GENERIC implements LinkageType {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String method() {
|
|
||||||
return "linkSmartPlace";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void generateCode(BuildPlan buildPlan, MethodBuilder methodBuilder, String s, TypeElement typeElement) {
|
|
||||||
buildPlan.addImport("de.steamwar.bausystem.features.smartplace.SmartPlaceListener");
|
|
||||||
methodBuilder.addLine("SmartPlaceListener.add(" + s + ");");
|
|
||||||
}
|
|
||||||
}
|
|
@ -27,8 +27,8 @@ version '1.0'
|
|||||||
|
|
||||||
compileJava.options.encoding = 'UTF-8'
|
compileJava.options.encoding = 'UTF-8'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 17
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 17
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
@ -43,6 +43,9 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
// implementation 'yoyosource:YAPION:0.25.3'
|
||||||
|
implementation files("${projectDir}/../libs/YAPION-SNAPSHOT.jar")
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok:1.18.22'
|
compileOnly 'org.projectlombok:lombok:1.18.22'
|
||||||
testCompileOnly 'org.projectlombok:lombok:1.18.22'
|
testCompileOnly 'org.projectlombok:lombok:1.18.22'
|
||||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||||
@ -51,16 +54,16 @@ dependencies {
|
|||||||
implementation project(":BauSystem_Linkage")
|
implementation project(":BauSystem_Linkage")
|
||||||
annotationProcessor project(":BauSystem_Linkage")
|
annotationProcessor project(":BauSystem_Linkage")
|
||||||
|
|
||||||
compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
|
compileOnly 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT'
|
||||||
compileOnly 'com.mojang:authlib:1.5.25'
|
compileOnly 'com.mojang:authlib:1.5.25'
|
||||||
compileOnly 'io.netty:netty-all:4.1.68.Final'
|
compileOnly 'io.netty:netty-all:4.1.68.Final'
|
||||||
|
|
||||||
compileOnly swdep('Spigot-1.19')
|
compileOnly swdep('Spigot-1.20')
|
||||||
// compileOnly swdep('WorldEdit-1.15')
|
|
||||||
compileOnly swdep('SpigotCore')
|
compileOnly swdep('SpigotCore')
|
||||||
annotationProcessor swdep('SpigotCore')
|
annotationProcessor swdep('SpigotCore')
|
||||||
|
|
||||||
compileOnly swdep('FastAsyncWorldEdit-1.18')
|
compileOnly swdep('FastAsyncWorldEdit-1.18')
|
||||||
|
compileOnly swdep('AxiomPaper')
|
||||||
|
|
||||||
implementation 'org.luaj:luaj-jse:3.0.1'
|
implementation 'org.luaj:luaj-jse:3.0.1'
|
||||||
}
|
}
|
@ -16,17 +16,17 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
PREFIX=§eBau§8System§8»
|
PREFIX=§eBau§8System§8»
|
||||||
TIME=HH:mm:ss
|
TIME=HH:mm:ss
|
||||||
DATE=........
|
DATE=........
|
||||||
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
|
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
|
||||||
ONLY_SCHEMS=§cFolders are unselectable
|
ONLY_SCHEMS=§cFolders are unselectable
|
||||||
|
|
||||||
PAGE_LIST=§e Page ({0}/{1}) »»
|
PAGE_LIST=§e Page ({0}/{1}) »»
|
||||||
LIST_PREVIOUS_PAGE=§ePrevious page
|
LIST_PREVIOUS_PAGE=§ePrevious page
|
||||||
LIST_NEXT_PAGE=§eNext page
|
LIST_NEXT_PAGE=§eNext page
|
||||||
|
# Permissions
|
||||||
|
NO_PERMISSION=You are not allowed to use that here
|
||||||
|
SPECTATOR=§fSpectator
|
||||||
# Scoreboard
|
# Scoreboard
|
||||||
SCOREBOARD_TIME=Time
|
SCOREBOARD_TIME=Time
|
||||||
SCOREBOARD_REGION=Region
|
SCOREBOARD_REGION=Region
|
||||||
@ -34,12 +34,13 @@ SCOREBOARD_TRACE = Trace
|
|||||||
SCOREBOARD_LOADER=Loader
|
SCOREBOARD_LOADER=Loader
|
||||||
SCOREBOARD_TPS=TPS
|
SCOREBOARD_TPS=TPS
|
||||||
SCOREBOARD_TPS_FROZEN=§eFrozen
|
SCOREBOARD_TPS_FROZEN=§eFrozen
|
||||||
|
|
||||||
SCOREBOARD_TRACE_TICKS=Ticks
|
SCOREBOARD_TRACE_TICKS=Ticks
|
||||||
|
|
||||||
SCOREBOARD_TECHHIDER=TechHider§8: §aOn
|
SCOREBOARD_TECHHIDER=TechHider§8: §aOn
|
||||||
SCOREBOARD_XRAY=XRay§8: §aOn
|
SCOREBOARD_XRAY=XRay§8: §aOn
|
||||||
|
SCOREBOARD_LOCK_TEAM=Bau Lock§8: §eTeam
|
||||||
|
SCOREBOARD_LOCK_TEAM_AND_SERVERTEAM=Bau Lock§8: §e(Server) Team
|
||||||
|
SCOREBOARD_LOCK_SERVERTEAM=Bau Lock§8: §eServer Team
|
||||||
|
SCOREBOARD_LOCK_NOBODY=Bau Lock§8: §cNobody
|
||||||
# Flags
|
# Flags
|
||||||
FLAG_COLOR=Color
|
FLAG_COLOR=Color
|
||||||
FLAG_TNT=TNT
|
FLAG_TNT=TNT
|
||||||
@ -47,23 +48,23 @@ FLAG_FIRE = Fire
|
|||||||
FLAG_FREEZE=Freeze
|
FLAG_FREEZE=Freeze
|
||||||
FLAG_PROTECT=Protect
|
FLAG_PROTECT=Protect
|
||||||
FLAG_ITEMS=Items
|
FLAG_ITEMS=Items
|
||||||
|
FLAG_NO_GRAVITY = No Gravity
|
||||||
|
FLAG_TESTBLOCK=Testblock
|
||||||
|
FLAG_CHANGED=Changed
|
||||||
FLAG_FIRE_ALLOW=§con
|
FLAG_FIRE_ALLOW=§con
|
||||||
FLAG_FIRE_DENY=§aoff
|
FLAG_FIRE_DENY=§aoff
|
||||||
|
|
||||||
FLAG_FREEZE_ACTIVE=§aon
|
FLAG_FREEZE_ACTIVE=§aon
|
||||||
FLAG_FREEZE_INACTIVE=§coff
|
FLAG_FREEZE_INACTIVE=§coff
|
||||||
|
|
||||||
FLAG_PROTECT_ACTIVE=§aon
|
FLAG_PROTECT_ACTIVE=§aon
|
||||||
FLAG_PROTECT_INACTIVE=§coff
|
FLAG_PROTECT_INACTIVE=§coff
|
||||||
|
FLAG_NO_GRAVITY_ACTIVE = §aon
|
||||||
|
FLAG_NO_GRAVITY_INACTIVE = §coff
|
||||||
FLAG_TNT_ALLOW=§aon
|
FLAG_TNT_ALLOW=§aon
|
||||||
FLAG_TNT_DENY=§coff
|
FLAG_TNT_DENY=§coff
|
||||||
FLAG_TNT_ONLY_TB=§7no §ebuild area
|
FLAG_TNT_ONLY_TB=§7no §ebuild area
|
||||||
|
FLAG_TNT_ONLY_BUILD=§7no §etestblock area
|
||||||
FLAG_ITEMS_ACTIVE=§aon
|
FLAG_ITEMS_ACTIVE=§aon
|
||||||
FLAG_ITEMS_INACTIVE=§coff
|
FLAG_ITEMS_INACTIVE=§coff
|
||||||
|
|
||||||
FLAG_COLOR_WHITE=§fWhite
|
FLAG_COLOR_WHITE=§fWhite
|
||||||
FLAG_COLOR_ORANGE=§6Orange
|
FLAG_COLOR_ORANGE=§6Orange
|
||||||
FLAG_COLOR_MAGENTA=§dMagenta
|
FLAG_COLOR_MAGENTA=§dMagenta
|
||||||
@ -82,22 +83,23 @@ FLAG_COLOR_BROWN = §eBrown
|
|||||||
FLAG_COLOR_GREEN=§2Green
|
FLAG_COLOR_GREEN=§2Green
|
||||||
FLAG_COLOR_RED=§cRed
|
FLAG_COLOR_RED=§cRed
|
||||||
FLAG_COLOR_BLACK=§0Black
|
FLAG_COLOR_BLACK=§0Black
|
||||||
|
FLAG_TESTBLOCK_NO_VALUE=§eNo Value
|
||||||
|
FLAG_TESTBLOCK_NORTH=§eNorth
|
||||||
|
FLAG_TESTBLOCK_SOUTH=§eSouth
|
||||||
|
FLAG_CHANGED_NO_CHANGE=§cNo
|
||||||
|
FLAG_CHANGED_HAS_CHANGE=§aYes
|
||||||
# Region
|
# Region
|
||||||
REGION_TYPE_NORMAL=Normal
|
REGION_TYPE_NORMAL=Normal
|
||||||
REGION_TYPE_BUILD=Build area
|
REGION_TYPE_BUILD=Build area
|
||||||
REGION_TYPE_ONLY_TB=Dummy
|
REGION_TYPE_ONLY_TB=Dummy
|
||||||
|
|
||||||
# AttributesCopy
|
# AttributesCopy
|
||||||
ATTRIBUTES_CANT_COPY=§cYou need to hold the same item type and hover over the same block to copy.
|
ATTRIBUTES_CANT_COPY=§cYou need to hold the same item type and hover over the same block to copy.
|
||||||
ATTRIBUTES_NO_COPY=§cNo attributes to copy.
|
ATTRIBUTES_NO_COPY=§cNo attributes to copy.
|
||||||
ATTRIBUTES_COPIED=§eAttributes copied.
|
ATTRIBUTES_COPIED=§eAttributes copied.
|
||||||
|
|
||||||
ATTRIBUTE_REMOVE_COMMAND_HELP=§8/§eattributeremove §8[§eattribute§8|§7all§8|§7*§8]
|
ATTRIBUTE_REMOVE_COMMAND_HELP=§8/§eattributeremove §8[§eattribute§8|§7all§8|§7*§8]
|
||||||
ATTRIBUTE_REMOVE_ALL=§eAll attributes removed.
|
ATTRIBUTE_REMOVE_ALL=§eAll attributes removed.
|
||||||
ATTRIBUTE_REMOVE_SINGLE=§eAttribute §7{0}§e removed.
|
ATTRIBUTE_REMOVE_SINGLE=§eAttribute §7{0}§e removed.
|
||||||
ATTRIBUTE_REMOVE_NOT_FOUND=§cAttribute not found
|
ATTRIBUTE_REMOVE_NOT_FOUND=§cAttribute not found
|
||||||
|
|
||||||
# AutoStart
|
# AutoStart
|
||||||
AUTOSTART_COMMAND_HELP=§8/§etimer §8- §7Retrieve AutostartTimer Tool
|
AUTOSTART_COMMAND_HELP=§8/§etimer §8- §7Retrieve AutostartTimer Tool
|
||||||
AUTOSTART_ITEM_NAME=§eAutostartTimer
|
AUTOSTART_ITEM_NAME=§eAutostartTimer
|
||||||
@ -105,18 +107,15 @@ AUTOSTART_ITEM_LORE = §eRight Click Block §8- §7Start Timer
|
|||||||
AUTOSTART_MESSAGE_NO_REGION=§cYou are not inside any region
|
AUTOSTART_MESSAGE_NO_REGION=§cYou are not inside any region
|
||||||
AUTOSTART_MESSAGE_RESET=§eAutostartTimer restarted
|
AUTOSTART_MESSAGE_RESET=§eAutostartTimer restarted
|
||||||
AUTOSTART_MESSAGE_START=§eAutostartTimer started
|
AUTOSTART_MESSAGE_START=§eAutostartTimer started
|
||||||
AUTOSTART_MESSAGE_RESULT1 = §eTime §7until §eexplosion §7at enemy§8:§e {0}
|
AUTOSTART_MESSAGE_RESULT1=§eTime §7until §eexplosion §7at enemy§8:§e {0}§7 game ticks
|
||||||
AUTOSTART_MESSAGE_DATE_PATTERN=mm:ss SSSS
|
AUTOSTART_MESSAGE_RESULT2=§7Time difference in §egame-ticks §7until {0} seconds§8:§e {1}
|
||||||
AUTOSTART_MESSAGE_RESULT2 = §eTime difference in game-ticks §7until {0} seconds§8:§e {1}
|
|
||||||
AUTOSTART_MESSAGE_RESULT3=§7positive, if too few, negative if too many
|
AUTOSTART_MESSAGE_RESULT3=§7positive, if too few, negative if too many
|
||||||
|
|
||||||
# Backup
|
# Backup
|
||||||
BACKUP_HELP_CREATE=§8/§ebackup create §8- §7Create a region backup
|
BACKUP_HELP_CREATE=§8/§ebackup create §8- §7Create a region backup
|
||||||
BACKUP_HELP_LOAD=§8/§ebackup load §8[§7BackupName§8] §8- §7Load a region backup
|
BACKUP_HELP_LOAD=§8/§ebackup load §8[§7BackupName§8] §8- §7Load a region backup
|
||||||
BACKUP_HELP_LIST=§8/§ebackup list §8- §7List all region backups
|
BACKUP_HELP_LIST=§8/§ebackup list §8- §7List all region backups
|
||||||
BACKUP_HELP_GUI=§8/§ebackup gui §8- §7Open the backup GUI
|
BACKUP_HELP_GUI=§8/§ebackup gui §8- §7Open the backup GUI
|
||||||
BACKUP_REGION_NO_REGION=§cYou are not inside any region
|
BACKUP_REGION_NO_REGION=§cYou are not inside any region
|
||||||
BACKUP_NO_PERMS=§You do not have permission to use the backup system
|
|
||||||
BACKUP_CREATE_SUCCESS=§7Backup created
|
BACKUP_CREATE_SUCCESS=§7Backup created
|
||||||
BACKUP_CREATE_FAILURE=§cBackup failed
|
BACKUP_CREATE_FAILURE=§cBackup failed
|
||||||
BACKUP_CREATE_NO_CHANGE=§7No changes to save
|
BACKUP_CREATE_NO_CHANGE=§7No changes to save
|
||||||
@ -127,36 +126,22 @@ BACKUP_LOAD=§7Backup loaded
|
|||||||
BACKUP_INV_NAME=§eBackup
|
BACKUP_INV_NAME=§eBackup
|
||||||
BACKUP_ITEM_NAME=§eBackup §7from §e{0}
|
BACKUP_ITEM_NAME=§eBackup §7from §e{0}
|
||||||
BACKUP_LORE=§eClick to load
|
BACKUP_LORE=§eClick to load
|
||||||
|
|
||||||
# Bau
|
# Bau
|
||||||
BAU_COMMAND_HELP_INFO=§8/§ebau info §8- §7Alias for §8/§ebauinfo
|
BAU_COMMAND_HELP_INFO=§8/§ebau info §8- §7Alias for §8/§ebauinfo
|
||||||
BAU_COMMAND_HELP_TOGGLEWE = §8/§ebau togglewe §8[§7Player§8] §8- §7Edit the WorldEdit permissions of a player
|
|
||||||
BAU_COMMAND_HELP_TOGGLEWORLD = §8/§ebau toggleworld §8[§7Player§8] §8- §7Edit the World permissions of a player
|
|
||||||
BAU_UNKNOWN_PLAYER = §cUnknown Player
|
|
||||||
BAU_NO_PLAYER = §cThe player is no member of your world!
|
|
||||||
BAU_NO_WORLD = §cThis is not your world!
|
|
||||||
|
|
||||||
BAU_INFO_ITEM_NAME=§eBau-Management
|
BAU_INFO_ITEM_NAME=§eBau-Management
|
||||||
## This is used in BauInfoBauGuiItem.java
|
## This is used in BauInfoBauGuiItem.java
|
||||||
BAU_INFO_ITEM_LORE_TNT=§7TNT§8: §e{0}
|
BAU_INFO_ITEM_LORE_TNT=§7TNT§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_FREEZE=§7Freeze§8: §e{0}
|
BAU_INFO_ITEM_LORE_FREEZE=§7Freeze§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_DAMAGE=
|
|
||||||
BAU_INFO_ITEM_LORE_FIRE=§7Fire§8: §e{0}
|
BAU_INFO_ITEM_LORE_FIRE=§7Fire§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_COLOR=§7Color§8: §e{0}
|
BAU_INFO_ITEM_LORE_COLOR=§7Color§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_PROTECT=§7Protect§8: §e{0}
|
BAU_INFO_ITEM_LORE_PROTECT=§7Protect§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_ITEMS=§7Items§8: §e{0}
|
BAU_INFO_ITEM_LORE_ITEMS=§7Items§8: §e{0}
|
||||||
|
BAU_INFO_ITEM_LORE_NO_GRAVITY = §8NoGravity§8: §e{0}
|
||||||
BAU_INFO_COMMAND_HELP=§8/§ebauinfo §8- §7Information regarding this build server
|
BAU_INFO_COMMAND_HELP=§8/§ebauinfo §8- §7Information regarding this build server
|
||||||
BAU_INFO_COMMAND_OWNER = §7Owner: §e{0}
|
BAU_INFO_COMMAND_OWNER=§7Owner§8: §e{0}
|
||||||
BAU_INFO_COMMAND_MEMBER = §7Member: §e
|
BAU_INFO_COMMAND_MEMBER=§7{0} §8[§7{1}§8]§8: §e{2}
|
||||||
BAU_INFO_MEMBER_INFO = §e{0}§8[{1}§8,{2}§8] §8
|
BAU_INFO_COMMAND_FLAG=§7{0}§8: §7{1}
|
||||||
BAU_INFO_MEMBER_WE_ALLOW = §aWE
|
BAU_INFO_COMMAND_TPS=§7TPS§8:§e
|
||||||
BAU_INFO_MEMBER_WE_DISALLOW = §cWE
|
|
||||||
BAU_INFO_MEMBER_WORLD_ALLOW = §aW
|
|
||||||
BAU_INFO_MEMBER_WORLD_DISALLOW = §cW
|
|
||||||
BAU_INFO_COMMAND_FLAG = §e{0} §8: §7{1}
|
|
||||||
BAU_INFO_COMMAND_TPS = TPS:§e
|
|
||||||
|
|
||||||
# Countingwand
|
# Countingwand
|
||||||
COUNTINGWAND_COMMAND_HELP=§8/§ecountingwand §8- §7Receive a CountingWand
|
COUNTINGWAND_COMMAND_HELP=§8/§ecountingwand §8- §7Receive a CountingWand
|
||||||
COUNTINGWAND_ITEM_NAME=§eMeterstick
|
COUNTINGWAND_ITEM_NAME=§eMeterstick
|
||||||
@ -166,13 +151,11 @@ COUNTINGWAND_MESSAGE_RCLICK = §7First position at: §8[§7{0}§8, §7{1}§8, §
|
|||||||
COUNTINGWAND_MESSAGE_LCLICK=§7Second position at: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) ({4}§8)
|
COUNTINGWAND_MESSAGE_LCLICK=§7Second position at: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) ({4}§8)
|
||||||
COUNTINGWAND_MESSAGE_VOLUME=§e{0}
|
COUNTINGWAND_MESSAGE_VOLUME=§e{0}
|
||||||
COUNTINGWAND_MESSAGE_DIMENSION=§e{0}§8, §e{1}§8, §e{2}
|
COUNTINGWAND_MESSAGE_DIMENSION=§e{0}§8, §e{1}§8, §e{2}
|
||||||
|
|
||||||
# Design Endstone
|
# Design Endstone
|
||||||
DESIGN_ENDSTONE_COMMAND_HELP = §8/§edesign endstone §8- §7Show where Endstone is
|
DESIGN_ENDSTONE_COMMAND_HELP=§8/§edesignendstone §8- §7Highlight endstone in design
|
||||||
DESIGN_ENDSTONE_REGION_ERROR=§cThis region has no build area
|
DESIGN_ENDSTONE_REGION_ERROR=§cThis region has no build area
|
||||||
DESIGN_ENDSTONE_ENABLE = §aEndstone is activated
|
DESIGN_ENDSTONE_ENABLE=§aEndstone is highlighted
|
||||||
DESIGN_ENDSTONE_DISABLE = §cEndstone is deactivated
|
DESIGN_ENDSTONE_DISABLE=§cEndstone is no longer hightlighted
|
||||||
|
|
||||||
# Detonator
|
# Detonator
|
||||||
DETONATOR_LOC_REMOVE=§e{0} removed
|
DETONATOR_LOC_REMOVE=§e{0} removed
|
||||||
DETONATOR_LOC_ADD=§e{0} added
|
DETONATOR_LOC_ADD=§e{0} added
|
||||||
@ -202,7 +185,7 @@ DETONATOR_INVALID_POINT=§cOne point could not be activated
|
|||||||
DETONATOR_INVALID_POINTS=§c{0} points could not be activated
|
DETONATOR_INVALID_POINTS=§c{0} points could not be activated
|
||||||
DETONATOR_INVALID_BLOCK=§eThe block could not be addded
|
DETONATOR_INVALID_BLOCK=§eThe block could not be addded
|
||||||
# Hotbar
|
# Hotbar
|
||||||
HOTBAR_HELP_GENERIC=§7Saves a hotbar. While joining a bau with an empty inventory this hotbar will be used
|
HOTBAR_HELP_GENERIC=§7Saves a hotbar. While joining a bau with an empty inventory this hotbar will be used.
|
||||||
HOTBAR_HELP_SAVE=§8/§ehotbar save §8-§7 Saves your current hotbar
|
HOTBAR_HELP_SAVE=§8/§ehotbar save §8-§7 Saves your current hotbar
|
||||||
HOTBAR_HELP_LOAD=§8/§ehotbar load §8-§7 Loads the saved hotbar
|
HOTBAR_HELP_LOAD=§8/§ehotbar load §8-§7 Loads the saved hotbar
|
||||||
HOTBAR_HELP_SHOW=§8/§ehotbar show §8-§7 Displays the saved hotbar
|
HOTBAR_HELP_SHOW=§8/§ehotbar show §8-§7 Displays the saved hotbar
|
||||||
@ -212,11 +195,6 @@ HOTBAR_INVENTORY=Standard hotbar
|
|||||||
# GUI
|
# GUI
|
||||||
GUI_EDITOR_ITEM_NAME=§eGui editor
|
GUI_EDITOR_ITEM_NAME=§eGui editor
|
||||||
GUI_NAME=Bau GUI
|
GUI_NAME=Bau GUI
|
||||||
GUI_NO_PERMISSION=§cYou do not have enough permissions for this
|
|
||||||
GUI_NO_OWNER=§cYou are not the owner of this World
|
|
||||||
GUI_NO_WORLD=§cYou do not have permissions to change the World
|
|
||||||
GUI_NO_WORLDEDIT=§cYou do not have permissions to use WorldEdit
|
|
||||||
GUI_NO_MEMBER=§cYou need to be a member of this World
|
|
||||||
GUI_ITEM_LORE1=§7Use this item to open the bau gui
|
GUI_ITEM_LORE1=§7Use this item to open the bau gui
|
||||||
GUI_ITEM_LORE2=§7or press swap hands twice.
|
GUI_ITEM_LORE2=§7or press swap hands twice.
|
||||||
GUI_EDITOR_TITLE=Bau GUI Editor
|
GUI_EDITOR_TITLE=Bau GUI Editor
|
||||||
@ -227,19 +205,16 @@ GUI_EDITOR_ITEM_TRASH_LORE=§7Drop item here
|
|||||||
GUI_EDITOR_ITEM_MORE=§eMore items
|
GUI_EDITOR_ITEM_MORE=§eMore items
|
||||||
GUI_EDITOR_ITEM_CLOSE=§eClose
|
GUI_EDITOR_ITEM_CLOSE=§eClose
|
||||||
GUI_EDITOR_TITLE_MORE=Select item
|
GUI_EDITOR_TITLE_MORE=Select item
|
||||||
|
|
||||||
# Script
|
# Script
|
||||||
## Errors
|
## Errors
|
||||||
SCRIPT_ERROR_GUI=§cError in parsing script: Line {0}
|
SCRIPT_ERROR_GUI=§cError in parsing script: Line {0}
|
||||||
SCRIPT_ERROR_GLOBAL=§cError in global script: Line {0}
|
SCRIPT_ERROR_GLOBAL=§cError in global script: Line {0}
|
||||||
SCRIPT_ERROR_CLICK=§cError in script: Line {0}
|
SCRIPT_ERROR_CLICK=§cError in script: Line {0}
|
||||||
SCRIPT_ERROR_ONLY_IN_GLOBAL=§cThis function is only available in global scripts
|
SCRIPT_ERROR_ONLY_IN_GLOBAL=§cThis function is only available in global scripts
|
||||||
|
|
||||||
## CustomScript
|
## CustomScript
|
||||||
SCRIPT_HOTKEY_ITEM_NAME=§7Hotkey§8: §e{0}
|
SCRIPT_HOTKEY_ITEM_NAME=§7Hotkey§8: §e{0}
|
||||||
SCRIPT_EVENT_ITEM_NAME=§7Event§8: §e{0}
|
SCRIPT_EVENT_ITEM_NAME=§7Event§8: §e{0}
|
||||||
SCRIPT_COMMAND_ITEM_NAME=§7Command§8: §e/{0}
|
SCRIPT_COMMAND_ITEM_NAME=§7Command§8: §e/{0}
|
||||||
|
|
||||||
## Script Menu GUI
|
## Script Menu GUI
|
||||||
SCRIPT_MENU_GUI_ITEM_LORE_1=§7Click to retrieve
|
SCRIPT_MENU_GUI_ITEM_LORE_1=§7Click to retrieve
|
||||||
SCRIPT_MENU_GUI_ITEM_LORE_2=§7Shift-Click to copy
|
SCRIPT_MENU_GUI_ITEM_LORE_2=§7Shift-Click to copy
|
||||||
@ -248,9 +223,8 @@ SCRIPT_MENU_GUI_ITEM_LORE_4 = §7Middle-Click to preview
|
|||||||
SCRIPT_MENU_GUI_NAME=§eScript-Menu
|
SCRIPT_MENU_GUI_NAME=§eScript-Menu
|
||||||
SCRIPT_MENU_GUI_ITEM_ADD_NAME=§eInsert
|
SCRIPT_MENU_GUI_ITEM_ADD_NAME=§eInsert
|
||||||
SCRIPT_MENU_GUI_ITEM_ADD_LORE=§7Click with a book to insert
|
SCRIPT_MENU_GUI_ITEM_ADD_LORE=§7Click with a book to insert
|
||||||
|
|
||||||
SCRIPT_MENU_GUI_ENTER_NAME=§eEnter a name
|
SCRIPT_MENU_GUI_ENTER_NAME=§eEnter a name
|
||||||
|
SCRIPT_DEPRECATED=§cThe function §8\'§e{0}§8\'§c is deprecated and will be removed in the future. Please use §8\'§e{1}§8\'§c instead.
|
||||||
# Shield Printing
|
# Shield Printing
|
||||||
SHIELD_PRINTING_HELP_START=§8/§eshieldprinting start §8- §7Starts the shield printing
|
SHIELD_PRINTING_HELP_START=§8/§eshieldprinting start §8- §7Starts the shield printing
|
||||||
SHIELD_PRINTING_HELP_COPY=§8/§eshieldprinting copy §8- §7Copies the shield configuration
|
SHIELD_PRINTING_HELP_COPY=§8/§eshieldprinting copy §8- §7Copies the shield configuration
|
||||||
@ -263,21 +237,33 @@ SHIELD_PRINTING_HELP_STEP_4 = §84. §7Edit the shields if necessary
|
|||||||
SHIELD_PRINTING_HELP_STEP_5=§85. §7Copy the shields printing with §8/§eshieldprinting copy
|
SHIELD_PRINTING_HELP_STEP_5=§85. §7Copy the shields printing with §8/§eshieldprinting copy
|
||||||
SHIELD_PRINTING_HELP_STEP_6=§86. §7Paste the original schematic
|
SHIELD_PRINTING_HELP_STEP_6=§86. §7Paste the original schematic
|
||||||
SHIELD_PRINTING_HELP_STEP_7=§87. §7Apply the shield printing with §8/§eshieldprinting apply
|
SHIELD_PRINTING_HELP_STEP_7=§87. §7Apply the shield printing with §8/§eshieldprinting apply
|
||||||
|
|
||||||
SHIELD_PRINTING_NO_REGION=§cYou are not in a region.
|
SHIELD_PRINTING_NO_REGION=§cYou are not in a region.
|
||||||
SHIELD_PRINTING_NOT_RUNNING=§cThe shield printing is not running.
|
SHIELD_PRINTING_NOT_RUNNING=§cThe shield printing is not running.
|
||||||
SHIELD_PRINTING_DISALLOWED = §cYou are not allowed to use shield printing here.
|
|
||||||
SHIELD_PRINTING_BOSSBAR=§fMovements: {0}
|
SHIELD_PRINTING_BOSSBAR=§fMovements: {0}
|
||||||
SHIELD_PRINTING_BOSSBAR_COPIED=§fMovements: {0} Copied: {1}
|
SHIELD_PRINTING_BOSSBAR_COPIED=§fMovements: {0} Copied: {1}
|
||||||
|
SHIELD_PRINTING_GUI_NAME=§7Shield Printing
|
||||||
|
SHIELD_PRINTING_GUI_APPLY=§aApply
|
||||||
|
SHIELD_PRINTING_GUI_STATE_PREVIOUS=§7R-Click§8: §7Previous
|
||||||
|
SHIELD_PRINTING_GUI_STATE_NEXT=§7L-Click§8: §7Next
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ACTIVE=§e> §7{0}
|
||||||
|
SHIELD_PRINTING_GUI_STATE_INACTIVE=§8> §7{0}
|
||||||
|
SHIELD_PRINTING_GUI_STATE_FROM_ORIGINAL=Original
|
||||||
|
SHIELD_PRINTING_GUI_STATE_FROM_COPY=Copy
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_ON=On
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_OFF=Off
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_OPEN=Open
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_CLOSED=Closed
|
||||||
|
SHIELD_PRINTING_GUI_STATE_FENCE=§7{0} §fFence Connections
|
||||||
|
SHIELD_PRINTING_GUI_STATE_OPENABLE=§7{0} §fOpened
|
||||||
|
SHIELD_PRINTING_GUI_STATE_PISTON=§7{0} §fExtended
|
||||||
|
SHIELD_PRINTING_GUI_STATE_POWERABLE=§7{0} §fPowered
|
||||||
|
SHIELD_PRINTING_GUI_STATE_WALL=§7{0} §fWall Connections
|
||||||
SHIELD_PRINTING_START=§aThe shield printing has been started.
|
SHIELD_PRINTING_START=§aThe shield printing has been started.
|
||||||
SHIELD_PRINTING_COPY=§aThe shield has been copied.
|
SHIELD_PRINTING_COPY=§aThe shield has been copied.
|
||||||
SHIELD_PRINTING_APPLY=§aThe shield has been applied.
|
SHIELD_PRINTING_APPLY=§aThe shield has been applied.
|
||||||
SHIELD_PRINTING_STOP=§aThe shield printing has been stopped.
|
SHIELD_PRINTING_STOP=§aThe shield printing has been stopped.
|
||||||
|
|
||||||
# Unsign Book
|
# Unsign Book
|
||||||
UNSIGN_HELP=§8/§eunsign §8- §7Make a signed book writable again
|
UNSIGN_HELP=§8/§eunsign §8- §7Make a signed book writable again
|
||||||
|
|
||||||
# Simulator
|
# Simulator
|
||||||
SIMULATOR_HELP=§8/§esimulator §8-§7 Gives you the simulator wand
|
SIMULATOR_HELP=§8/§esimulator §8-§7 Gives you the simulator wand
|
||||||
SIMULATOR_CREATE_HELP=§8/§esimulator create §8[§7name§8] §8-§7 Create a new simulator
|
SIMULATOR_CREATE_HELP=§8/§esimulator create §8[§7name§8] §8-§7 Create a new simulator
|
||||||
@ -285,35 +271,29 @@ SIMULATOR_CHANGE_HELP = §8/§esimulator change §8-§7 Change your simulator wa
|
|||||||
SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Deletes the simulator
|
SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Deletes the simulator
|
||||||
SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator
|
SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator
|
||||||
SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Copy the simulator
|
SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Copy the simulator
|
||||||
SIMULATOR_NO_PERMS = §cYou are not allowed to use the simulator here
|
|
||||||
|
|
||||||
SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator
|
SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator
|
||||||
|
|
||||||
SIMULATOR_NO_SIM_IN_HAND=§cNo simulator item selected
|
SIMULATOR_NO_SIM_IN_HAND=§cNo simulator item selected
|
||||||
SIMULATOR_GUI_SELECT_SIM=Simulator selection
|
SIMULATOR_GUI_SELECT_SIM=Simulator selection
|
||||||
SIMULATOR_GUI_CREATE_SIM=§eCreate simulator
|
SIMULATOR_GUI_CREATE_SIM=§eCreate simulator
|
||||||
SIMULATOR_GUI_CREATE_SIM_GUI=Create simulator
|
SIMULATOR_GUI_CREATE_SIM_GUI=Create simulator
|
||||||
SIMULATOR_NAME_ALREADY_EXISTS=§cSimulator already exists
|
SIMULATOR_NAME_ALREADY_EXISTS=§cSimulator already exists
|
||||||
SIMULATOR_NAME_INVALID=§cInvalid name
|
SIMULATOR_NAME_INVALID=§cInvalid name
|
||||||
|
SIMULATOR_ERROR_COPY=§cCopy failed
|
||||||
SIMULATOR_NOT_EXISTS=§cSimulator does not exist
|
SIMULATOR_NOT_EXISTS=§cSimulator does not exist
|
||||||
SIMULATOR_CREATE=§aSimulator created
|
SIMULATOR_CREATE=§aSimulator created
|
||||||
SIMULATOR_EDIT_LOCATION=§7Edit position
|
SIMULATOR_EDIT_LOCATION=§7Edit position
|
||||||
SIMULATOR_EDIT_PROPERTIES=§7Edit properties
|
SIMULATOR_EDIT_PROPERTIES=§7Edit properties
|
||||||
SIMULATOR_EDIT_OTHER=§7Edit other
|
SIMULATOR_EDIT_OTHER=§7Edit other
|
||||||
SIMULATOR_EDIT_GROUP=§7Edit group
|
SIMULATOR_EDIT_GROUP=§7Edit group
|
||||||
|
|
||||||
SIMULATOR_EDIT_GROUP_MENU=§eEdit group
|
SIMULATOR_EDIT_GROUP_MENU=§eEdit group
|
||||||
|
|
||||||
SIMULATOR_WAND_NAME=§eSimulator
|
SIMULATOR_WAND_NAME=§eSimulator
|
||||||
SIMULATOR_WAND_NAME_SELECTED=§7Simulator §8- §e{0}
|
SIMULATOR_WAND_NAME_SELECTED=§7Simulator §8- §e{0}
|
||||||
SIMULATOR_WAND_LORE_1=§eRight click §8- §7Adds a position
|
SIMULATOR_WAND_LORE_1=§eRight click §8- §7Adds a position
|
||||||
SIMULATOR_WAND_LORE_2=§eSneaking §8- §7Free movement
|
SIMULATOR_WAND_LORE_2=§eSneaking §8- §7Free movement
|
||||||
SIMULATOR_WAND_LORE_3=§eLeft click §8- §7Start the simulation
|
SIMULATOR_WAND_LORE_3=§eLeft click §8- §7Start the simulation
|
||||||
SIMULATOR_WAND_LORE_4=§eRight click in air §8- §7Opens the gui
|
SIMULATOR_WAND_LORE_4=§eRight click in air §8- §7Opens the gui
|
||||||
SIMULATOR_WAND_LORE_5 = §eOffhand §8- §7Simulator preview
|
SIMULATOR_WAND_LORE_5=§eDouble Sneak §8- §7Swap between TNT and Redstone Block
|
||||||
|
|
||||||
SIMULATOR_REGION_FROZEN=§cSimulator cannot be used inside frozen regions
|
SIMULATOR_REGION_FROZEN=§cSimulator cannot be used inside frozen regions
|
||||||
|
|
||||||
## Other
|
## Other
|
||||||
SIMULATOR_PLUS_ONE=§7+1
|
SIMULATOR_PLUS_ONE=§7+1
|
||||||
SIMULATOR_PLUS_PIXEL_SHIFT=§eShift §7Click for §e+0,0625
|
SIMULATOR_PLUS_PIXEL_SHIFT=§eShift §7Click for §e+0,0625
|
||||||
@ -325,11 +305,8 @@ SIMULATOR_POSITION_X = §7x-Position
|
|||||||
SIMULATOR_POSITION_Y=§7y-Position
|
SIMULATOR_POSITION_Y=§7y-Position
|
||||||
SIMULATOR_POSITION_Z=§7z-Position
|
SIMULATOR_POSITION_Z=§7z-Position
|
||||||
SIMULATOR_BACK=§eBack
|
SIMULATOR_BACK=§eBack
|
||||||
|
|
||||||
SIMULATOR_GUI_TOTAL_TNT=§7Total TNT§8: §e{0}
|
SIMULATOR_GUI_TOTAL_TNT=§7Total TNT§8: §e{0}
|
||||||
|
|
||||||
SIMULATOR_DELETED=§cSimulator deleted
|
SIMULATOR_DELETED=§cSimulator deleted
|
||||||
|
|
||||||
## GUI
|
## GUI
|
||||||
SIMULATOR_POSITION_EDIT=§eEdit position
|
SIMULATOR_POSITION_EDIT=§eEdit position
|
||||||
SIMULATOR_POSITION_ADD=§eSet position
|
SIMULATOR_POSITION_ADD=§eSet position
|
||||||
@ -353,15 +330,12 @@ SIMULATOR_GUI_NAME = Simulator
|
|||||||
SIMULATOR_GUI_DELETE=§cDelete TNT
|
SIMULATOR_GUI_DELETE=§cDelete TNT
|
||||||
SIMULATOR_GUI_AUTO_TRACE=§eAutoTrace§8: §7{0}
|
SIMULATOR_GUI_AUTO_TRACE=§eAutoTrace§8: §7{0}
|
||||||
SIMULATOR_GUI_MOVE_ALL=§eMove all
|
SIMULATOR_GUI_MOVE_ALL=§eMove all
|
||||||
|
|
||||||
SIMULATOR_ALIGNMENT_CENTER=§7Alignment§8: §eCenter
|
SIMULATOR_ALIGNMENT_CENTER=§7Alignment§8: §eCenter
|
||||||
SIMULATOR_ALIGNMENT_POSITIVE_X=§7Alignment§8: §ePositive X
|
SIMULATOR_ALIGNMENT_POSITIVE_X=§7Alignment§8: §ePositive X
|
||||||
SIMULATOR_ALIGNMENT_NEGATIVE_X=§7Alignment§8: §eNegative X
|
SIMULATOR_ALIGNMENT_NEGATIVE_X=§7Alignment§8: §eNegative X
|
||||||
SIMULATOR_ALIGNMENT_POSITIVE_Z=§7Alignment§8: §ePositive Z
|
SIMULATOR_ALIGNMENT_POSITIVE_Z=§7Alignment§8: §ePositive Z
|
||||||
SIMULATOR_ALIGNMENT_NEGATIVE_Z=§7Alignment§8: §eNegative Z
|
SIMULATOR_ALIGNMENT_NEGATIVE_Z=§7Alignment§8: §eNegative Z
|
||||||
|
|
||||||
SIMULATOR_MOVE_ALL_GUI_NAME=Move TNT
|
SIMULATOR_MOVE_ALL_GUI_NAME=Move TNT
|
||||||
|
|
||||||
SIMULATOR_TNT_SPAWN_GUI_NAME=Configure TNT {0}
|
SIMULATOR_TNT_SPAWN_GUI_NAME=Configure TNT {0}
|
||||||
SIMULATOR_TNT_SPAWN_EDIT_LOCATION=- Location
|
SIMULATOR_TNT_SPAWN_EDIT_LOCATION=- Location
|
||||||
SIMULATOR_TNT_SPAWN_EDIT_PROPERTIES=- Properties
|
SIMULATOR_TNT_SPAWN_EDIT_PROPERTIES=- Properties
|
||||||
@ -403,19 +377,16 @@ SIMULATOR_TNT_SPAWN_ADD_IGNITION_PHASE = §eAdd prime phase
|
|||||||
SIMULATOR_TNT_SPAWN_ADD_TNT=§eAdd TNT
|
SIMULATOR_TNT_SPAWN_ADD_TNT=§eAdd TNT
|
||||||
SIMULATOR_TNT_SPAWN_REMOVE_TNT=§cRemove
|
SIMULATOR_TNT_SPAWN_REMOVE_TNT=§cRemove
|
||||||
SIMULATOR_TNT_SPAWN_POSITION_ANVIL_GUI_NAME=Position
|
SIMULATOR_TNT_SPAWN_POSITION_ANVIL_GUI_NAME=Position
|
||||||
|
|
||||||
# SmartPlace
|
# SmartPlace
|
||||||
SMART_PLACE_HELP=§8/§esmartplace §8-§7 Toggles SmartPlace
|
SMART_PLACE_HELP=§8/§esmartplace §8-§7 Toggles SmartPlace
|
||||||
SMART_PLACE_INFO=§7Places rotatable blocks §eaway§7 from you when §esneaking§7.
|
SMART_PLACE_INFO=§7Places rotatable blocks §eaway§7 from you when §esneaking§7.
|
||||||
SMART_PLACE_ENABLE=§aSmartPlace activated
|
SMART_PLACE_ENABLE=§aSmartPlace activated
|
||||||
SMART_PLACE_DISABLE=§cSmartPlace deactivated
|
SMART_PLACE_DISABLE=§cSmartPlace deactivated
|
||||||
|
|
||||||
# InventoryFiller
|
# InventoryFiller
|
||||||
INVENTORY_FILL_HELP=§8/§einventoryfill §8- §7Toggles InventoryFill
|
INVENTORY_FILL_HELP=§8/§einventoryfill §8- §7Toggles InventoryFill
|
||||||
INVENTORY_FILL_INFO=§7Helps you fill containers by looking at them while sneaking and dropping the item. Or just scroll on a container to change the amount of the item inside.
|
INVENTORY_FILL_INFO=§7Helps you fill containers by looking at them while sneaking and dropping the item. Or just scroll on a container to change the amount of the item inside.
|
||||||
INVENTORY_FILL_ENABLE=§aInventoryFiller activated
|
INVENTORY_FILL_ENABLE=§aInventoryFiller activated
|
||||||
INVENTORY_FILL_DISABLE=§cInventoryFiller deactivated
|
INVENTORY_FILL_DISABLE=§cInventoryFiller deactivated
|
||||||
|
|
||||||
# Killchecker
|
# Killchecker
|
||||||
KILLCHECKER_HELP_ENABLE=§8/§ekillchecker enable §8- §7Enables Killchecker / Recalculates kills
|
KILLCHECKER_HELP_ENABLE=§8/§ekillchecker enable §8- §7Enables Killchecker / Recalculates kills
|
||||||
KILLCHECKER_HELP_DISABLE=§8/§ekillchecker disable §8- §7Disables Killchecker
|
KILLCHECKER_HELP_DISABLE=§8/§ekillchecker disable §8- §7Disables Killchecker
|
||||||
@ -424,7 +395,6 @@ KILLCHECKER_INFO2 = §7Only colorable blocks like Wool, Terractotta, Stained Gla
|
|||||||
KILLCHECKER_ENABLE=§aKillchecker activated
|
KILLCHECKER_ENABLE=§aKillchecker activated
|
||||||
KILLCHECKER_DISABLE=§cKillchecker deactivated
|
KILLCHECKER_DISABLE=§cKillchecker deactivated
|
||||||
KILLCHECKER_BOSSBAR=§e§l{0} §7(§e{1}%§7) §e§l{2}§7 cannons
|
KILLCHECKER_BOSSBAR=§e§l{0} §7(§e{1}%§7) §e§l{2}§7 cannons
|
||||||
|
|
||||||
# BlockCounter
|
# BlockCounter
|
||||||
BLOCK_COUNTER_HELP_TOGGLE=§8/§eblockcounter §8- §7Toggle on/off
|
BLOCK_COUNTER_HELP_TOGGLE=§8/§eblockcounter §8- §7Toggle on/off
|
||||||
BLOCK_COUNTER_HELP_ENABLE=§8/§eblockcounter enable §8- §7Toggles BlockCounter on
|
BLOCK_COUNTER_HELP_ENABLE=§8/§eblockcounter enable §8- §7Toggles BlockCounter on
|
||||||
@ -433,69 +403,72 @@ BLOCK_COUNTER_MESSAGE = §7Damage §8> §e{0} §7Blocks §e{1} §7TNT §e{2}
|
|||||||
BLOCK_COUNTER_MESSAGE_SECOND=§7Damage §8> §e{0} §7Blocks §e{1} §7TNT §e{2} §7Blocks/TNT §e{3} §7Blocks/s
|
BLOCK_COUNTER_MESSAGE_SECOND=§7Damage §8> §e{0} §7Blocks §e{1} §7TNT §e{2} §7Blocks/TNT §e{3} §7Blocks/s
|
||||||
BLOCK_COUNTER_ENABLE=§7BlockCounter activated
|
BLOCK_COUNTER_ENABLE=§7BlockCounter activated
|
||||||
BLOCK_COUNTER_DISABLE=§7BlockCounter deactivated
|
BLOCK_COUNTER_DISABLE=§7BlockCounter deactivated
|
||||||
|
|
||||||
# DepthCounter
|
# DepthCounter
|
||||||
DEPTH_COUNTER_MESSAGE=§7Depth §8> §7
|
DEPTH_COUNTER_MESSAGE=§7Depth §8> §7
|
||||||
DEPTH_COUNTER_COUNT={0}{1}§8×{2}{3}§8×{4}{5}
|
DEPTH_COUNTER_COUNT={0}{1}§8×{2}{3}§8×{4}{5}
|
||||||
DEPTH_COUNTER_HOVER=§7X§8ק7Y§8ק7Z
|
DEPTH_COUNTER_HOVER=§7X§8ק7Y§8ק7Z
|
||||||
DEPTH_COUNTER_TNT=§7 TNT§8: §e{0}
|
DEPTH_COUNTER_TNT=§7 TNT§8: §e{0}
|
||||||
|
|
||||||
# TPSLimit
|
# TPSLimit
|
||||||
TICK_STEP_HELP = §8/§etick step §8<§7Ticks§8> §8- §7Step n ticks
|
TPSLIMIT_FREEZE_HELP=§8/§etpslimit 0 §8-§7 Freeze TPS
|
||||||
TICK_STEP_SINGLE_HELP = §8/§etick step §8- §7Step one tick
|
TPSLIMIT_LIMIT_HELP=§8/§etpslimit §8[§720>x>0.5§8] §8-§7 Slow TPS down
|
||||||
TICK_WARP_HELP = §8/§etick warp §8<§7Ticks§8> §8- §7Warp n ticks
|
TPSLIMIT_WARP_HELP=§8/§etpslimit §8[§7x>20§8] §8-§7 Speed TPS up
|
||||||
TICK_CANCEL_HELP = §8/§etick cancel §8- §7Cancels tick step/warp
|
TPSLIMIT_DEFAULT_HELP=§8/§etpslimit default §8-§7 Set TPS to 20
|
||||||
TICK_ERROR = §cYou can not activate another §8'§e/tick step§8'§c or §8'§e/tick warp§8'§c
|
TPSLIMIT_HELP=§8/§etpslimit §8-§7 Show current TPS
|
||||||
TICK_CANCEL_ERROR = §cYou have no §8'§e/tick step§8'§c or §8'§e/tick warp§8'§c active
|
TICK_FREEZE_HELP=§8/§etick rate 0 §8-§7 Freeze TPS
|
||||||
TICK_STEP = §eSkipping {0} ticks
|
TICK_FREEZE_HELP_2=§8/§etick freeze §8-§7 Freeze TPS
|
||||||
TICK_STEP_LEFT = §eSkipping {0} more ticks
|
TICK_UNFREEZE_HELP=§8/§etick unfreeze §8-§7 Set TPS to 20
|
||||||
TICK_WARP = §eWarping {0} ticks
|
TICK_LIMIT_HELP=§8/§etick rate §8[§720>x>0.5§8] §8-§7 Slow TPS down
|
||||||
TICK_WARP_LEFT = §eWarping {0} more ticks
|
TICK_WARP_HELP=§8/§etick rate §8[§7x>20§8] §8-§7 Speed TPS up
|
||||||
TICK_CANCEL = §eWarps and Steps canceled
|
TICK_DEFAULT_HELP=§8/§etick rate default §8-§7 Set TPS to 20
|
||||||
|
TICK_HELP=§8/§etick rate §8-§7 Show current TPS
|
||||||
|
TICK_STEPPING_HELP=§8/§etick step §8<§7Ticks§8> §8-§7 Step n ticks or 1 forward
|
||||||
|
TICK_WARPING_HELP=§8/§etick warp §8<§7Ticks§8> §8<§7TPS§8> §8-§7 Warp n ticks or 1 forward
|
||||||
|
TICK_BOSSBAR=§7Skipped §e{0}§8/§7{1}
|
||||||
TPSLIMIT_GUI_ITEM_NAME=§eTPS limiter
|
TPSLIMIT_GUI_ITEM_NAME=§eTPS limiter
|
||||||
TPSLIMIT_GUI_ITEM_LORE=§7Currently: §e{0}
|
TPSLIMIT_GUI_ITEM_LORE=§7Currently: §e{0}
|
||||||
TPSLIMIT_ANVIL_GUI=New TPS limit
|
TPSLIMIT_ANVIL_GUI=New TPS limit
|
||||||
TPSLIMIT_HELP = §8/§etpslimit §8[§7TPS§8|§edefault§8] §8- §7Sets TPS on Build
|
|
||||||
TPSLIMIT_CURRENT=§7Current TPS limit§8: §e{0}
|
TPSLIMIT_CURRENT=§7Current TPS limit§8: §e{0}
|
||||||
TPSLIMIT_NO_PERMS = §cYou are not allowed to use the TPS-Limiter here
|
|
||||||
TPSLIMIT_SET=§eSet TPS limit to {0}
|
TPSLIMIT_SET=§eSet TPS limit to {0}
|
||||||
TPSLIMIT_FROZEN=§eTPS frozen
|
TPSLIMIT_FROZEN=§eTPS frozen
|
||||||
TPSLIMIT_INVALID = §cOnly numbers between 0,5 and {0}, and 'default'{1} allowed.
|
|
||||||
TPSLIMIT_INVALID_FROZEN = §c and '0'
|
|
||||||
|
|
||||||
# Trace
|
# Trace
|
||||||
TRACE_RECORD=§aon
|
TRACE_RECORD=§aon
|
||||||
TRACE_HAS_TRACES=§ehas Traces
|
TRACE_HAS_TRACES=§ehas Traces
|
||||||
TRACE_IDLE_SINGLE=§esingle
|
TRACE_IDLE_AUTO=§eauto
|
||||||
TRACE_IDLE_AUTO_EXPLODE=§eauto §8(§7explode§8)
|
|
||||||
TRACE_IDLE_AUTO_IGNITE=§eauto §8(§7ignite§8)
|
|
||||||
TRACE_MESSAGE_AUTO_IDLE_EXPLODE = §aAuto-Tracer explode started
|
|
||||||
TRACE_MESSAGE_AUTO_IDLE_IGNITE = §aAuto-Tracer ignite started
|
|
||||||
TRACE_MESSAGE_START=§aTNT-Tracer started
|
TRACE_MESSAGE_START=§aTNT-Tracer started
|
||||||
TRACE_MESSAGE_SINGLE = §aSingle-Tracer started
|
TRACE_MESSAGE_AUTO_START=§eAuto TNT-Tracer started
|
||||||
|
TRACE_MESSAGE_AUTO_STOP=§cAuto TNT-Tracer stopped
|
||||||
TRACE_MESSAGE_STOP=§cTNT-Tracer stopped
|
TRACE_MESSAGE_STOP=§cTNT-Tracer stopped
|
||||||
TRACE_MESSAGE_DELETE = §cAll TNT-positions deleted
|
TRACE_MESSAGE_CLEAR=§cAll TNT-positions deleted
|
||||||
|
TRACE_MESSAGE_DELETE=§cTrace TNT-positions deleted
|
||||||
TRACE_MESSAGE_SHOW=§aAll TNT-positions shown
|
TRACE_MESSAGE_SHOW=§aAll TNT-positions shown
|
||||||
TRACE_MESSAGE_HIDE=§cAll TNT-positions hidden
|
TRACE_MESSAGE_HIDE=§cAll TNT-positions hidden
|
||||||
TRACE_MESSAGE_ISOLATE = §aTNT-positions isolated
|
TRACE_MESSAGE_SHOW_AT=§aTNT-positions shown at {0}
|
||||||
TRACE_MESSAGE_UNISOLATE = §cTNT-positions hidden
|
TRACE_MESSAGE_SHOW_FROM=§aAll TNT-positions shown from {0}
|
||||||
|
TRACE_MESSAGE_SHOW_FROM_TO=§aAll TNT-positions shown from {0} to {1}
|
||||||
|
TRACE_MESSAGE_SHOW_TO_SMALLER=§cTo must be bigger then from
|
||||||
TRACE_MESSAGE_CLICK_ISOLATE=§eClick to §aisolate§8/§cunisolate
|
TRACE_MESSAGE_CLICK_ISOLATE=§eClick to §aisolate§8/§cunisolate
|
||||||
TRACE_MESSAGE_DISALLOWED = §cYou are not allowed to use the TNT-Tracer here
|
TRACE_MESSAGE_ISOLATE=§eTNT Positions have been isolated
|
||||||
|
TRACE_MESSAGE_BROADCAST=§e{0} shared his trace show state.
|
||||||
|
TRACE_MESSAGE_BROADCAST_HOVER=§eClick to view
|
||||||
|
TRACE_MESSAGE_FOLLOW=§aYou are now following {0} Trace show state
|
||||||
|
TRACE_MESSAGE_FOLLOW_SELF=§cYou cannot follow yourself!
|
||||||
|
TRACE_MESSAGE_UNFOLLOW=§cYou are no longer following a Trace show state
|
||||||
TRACE_COMMAND_HELP_START=§8/§etrace start §8- §7Starts recording of all TNT-positions
|
TRACE_COMMAND_HELP_START=§8/§etrace start §8- §7Starts recording of all TNT-positions
|
||||||
TRACE_COMMAND_HELP_SINGLE = §8/§etrace single §8- §7Starts a single recording of all TNT-positions
|
|
||||||
TRACE_COMMAND_HELP_STOP=§8/§etrace stop §8- §7Stops the TNT-Tracer
|
TRACE_COMMAND_HELP_STOP=§8/§etrace stop §8- §7Stops the TNT-Tracer
|
||||||
TRACE_COMMAND_HELP_AUTO=§8/§etrace toggleauto §8- §7Automatic start of recording
|
TRACE_COMMAND_HELP_AUTO=§8/§etrace toggleauto §8- §7Automatic start of recording
|
||||||
TRACE_COMMAND_HELP_SHOW=§8/§etrace show §8<§eParameter§8> - §7Shows all TNT-positions
|
TRACE_COMMAND_HELP_SHOW=§8/§etrace show §8<§eParameter§8> - §7Shows all TNT-positions
|
||||||
|
TRACE_COMMAND_HELP_SHOW_AT=§8/§etrace show §7at §8<§eTIME§8> - §7Shows all Trace Positions at §8<§eTIME§8>
|
||||||
|
TRACE_COMMAND_HELP_SHOW_AT_WITH=§8/§etrace show §7at §8<§eTIME§8> §7with §8<§eParameter§8> - §7Shows all Trace Positions at §8<§eTIME§8>
|
||||||
|
TRACE_COMMAND_HELP_SHOW_FROM=§8/§etrace show §7from §8<§eFROM§8> - §7Shows all Trace Positions from §8<§eFROM§8>
|
||||||
|
TRACE_COMMAND_HELP_SHOW_FROM_WITH=§8/§etrace show §7from §8<§eFROM§8> §7with §8<§eParameter§8> - §7Shows all Trace Positions from §8<§eFROM§8>
|
||||||
|
TRACE_COMMAND_HELP_SHOW_FROM_TO=§8/§etrace show §7from §8<§eFROM§8> §7to §8<§eTO§8> - §7Shows all Trace Positions from §8<§eFROM§8> to §8<§eTO§8>
|
||||||
|
TRACE_COMMAND_HELP_SHOW_FROM_TO_WITH=§8/§etrace show §7from §8<§eFROM§8> §7to §8<§eTO§8> §7with §8<§eParameter§8> - §7Shows all Trace Positions from §8<§eFROM§8> to §8<§eTO§8>
|
||||||
TRACE_COMMAND_HELP_HIDE=§8/§etrace hide §8- §7Hides all TNT-positions
|
TRACE_COMMAND_HELP_HIDE=§8/§etrace hide §8- §7Hides all TNT-positions
|
||||||
TRACE_COMMAND_HELP_DELETE = §8/§etrace delete §8- §7Deletes all TNT-positions
|
TRACE_COMMAND_HELP_DELETE=§8/§etrace delete §8[§eTrace§8] §8- §7Deletes all TNT-positions or a Trace
|
||||||
TRACE_COMMAND_HELP_GUI = §8/§etrace gui §8- §7Shows the Trace GUI
|
TRACE_COMMAND_HELP_ISOLATE=§8/§etrace isolate §8[§eTrace§8] §8[§eTNT§8] §8- §7Isolates specific TNTs from the Trace
|
||||||
TRACE_COMMAND_HELP_REPLAY = §8/§etrace replay §8[§7tick§8] §8- §7Replays your recording
|
TRACE_COMMAND_HELP_BROADCAST=§8/§etrace broadcast §8- §7Share your current Trace show state with others
|
||||||
TRACE_COMMAND_HELP_REPLAY_DISABLE = §8/§etrace replay disable §8- §7Stops the replay
|
TRACE_COMMAND_HELP_FOLLOW=§8/§etrace follow §8[§ePlayer§8] §8- §7Follow a players Trace show state
|
||||||
TRACE_COMMAND_HELP_REPLAY_NEXT = §8/§etrace replay next §8[§7step§8] §8- §7Jump one§8/§7step tick forward
|
TRACE_COMMAND_HELP_UNFOLLOW=§8/§etrace unfollow §8- §7Unfollow the Trace show state
|
||||||
TRACE_COMMAND_HELP_REPLAY_PREVIOUS = §8/§etrace replay previous §8[§7step§8] §8- §7Jump one§8/§7step tick back
|
|
||||||
TRACE_COMMAND_HELP_REPLAY_LOOP = §8/§etrace replay loop §8<§7start§8> §8<§7end§8> §8[§7speed§8] §8- §7Loop the replay
|
|
||||||
|
|
||||||
TRACE_GUI_ITEM_NAME=§eTracer
|
TRACE_GUI_ITEM_NAME=§eTracer
|
||||||
TRACE_GUI_ITEM_LORE=§7Status§8: {0}
|
TRACE_GUI_ITEM_LORE=§7Status§8: {0}
|
||||||
TRACE_GUI_NAME=Trace Gui
|
TRACE_GUI_NAME=Trace Gui
|
||||||
@ -505,27 +478,14 @@ TRACE_GUI_TRACE_ACTIVE_AUTO = §eAuto-Trace is active
|
|||||||
TRACE_GUI_AUTO_TRACE_INACTIVE=§eacitvate Auto-Tracer
|
TRACE_GUI_AUTO_TRACE_INACTIVE=§eacitvate Auto-Tracer
|
||||||
TRACE_GUI_AUTO_TRACE_ACTIVE=§edeactivate Auto-Tracer
|
TRACE_GUI_AUTO_TRACE_ACTIVE=§edeactivate Auto-Tracer
|
||||||
TRACE_GUI_DELETE=§eDelete trace
|
TRACE_GUI_DELETE=§eDelete trace
|
||||||
|
|
||||||
TRACE_GUI_TITLE = Trace GUI
|
|
||||||
TRACE_GUI_ITEM_BACK = §eBack
|
|
||||||
TRACE_GUI_ITEM = §eTrace §8- §e{0} §7TNT
|
|
||||||
TRACE_GUI_CLEAR = §eDelete traces
|
|
||||||
TRACE_GUI_RECORD_ITEM = §eTNT §8- §e{0} §7Positions
|
|
||||||
TRACE_GUI_RECORD_CLEAR = §eDelete TNT
|
|
||||||
TRACE_GUI_POSITION_ITEM = §ePosition
|
|
||||||
TRACE_GUI_POSITION_X = §7X§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_Y = §7Y§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_Z = §7Z§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_SOURCE = §7Source§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_EXPLODED = §7Exploded§8: §e{0}
|
|
||||||
|
|
||||||
# Loader
|
# Loader
|
||||||
LOADER_SETUP=§eSetup
|
LOADER_SETUP=§eSetup
|
||||||
LOADER_RUNNING=§aRunning
|
LOADER_RUNNING=§aRunning
|
||||||
LOADER_PAUSE=§7Pause
|
LOADER_PAUSE=§7Pause
|
||||||
LOADER_END=§8Finished
|
LOADER_END=§8Finished
|
||||||
|
LOADER_SINGLE=§aSingle
|
||||||
LOADER_MESSAGE_INTERACT=§e{0} added {1}
|
LOADER_MESSAGE_INTERACT=§e{0} added {1}
|
||||||
|
LOADER_MESSAGE_UNINTERACT=§eRemoved Element
|
||||||
LOADER_BUTTON_TNT=TNT
|
LOADER_BUTTON_TNT=TNT
|
||||||
LOADER_BUTTON_SWITCH=Lever
|
LOADER_BUTTON_SWITCH=Lever
|
||||||
LOADER_BUTTON_WOOD_BUTTON=Wooden Button
|
LOADER_BUTTON_WOOD_BUTTON=Wooden Button
|
||||||
@ -541,43 +501,50 @@ LOADER_BUTTON_LECTERN=Lectern
|
|||||||
LOADER_BUTTON_TRAPDOOR=Trapdoor
|
LOADER_BUTTON_TRAPDOOR=Trapdoor
|
||||||
LOADER_BUTTON_DOOR=Door
|
LOADER_BUTTON_DOOR=Door
|
||||||
LOADER_BUTTON_FENCEGATE=Fencegate
|
LOADER_BUTTON_FENCEGATE=Fencegate
|
||||||
|
|
||||||
LOADER_HELP_SETUP=§8/§eloader setup §8- §7Starts recording actions
|
LOADER_HELP_SETUP=§8/§eloader setup §8- §7Starts recording actions
|
||||||
LOADER_SETUP_STOP_FIRST=§cPlease stop the current loader first!
|
LOADER_SETUP_STOP_FIRST=§cPlease stop the current loader first!
|
||||||
LOADER_HELP_START=§8/§eloader start §8- §7Playback of previously recorded action
|
LOADER_HELP_START=§8/§eloader start §8- §7Playback of previously recorded actions
|
||||||
|
LOADER_HELP_SINGLE=§8/§7loader single - §7Single playback of previously recoded actions
|
||||||
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pauses Loader
|
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pauses Loader
|
||||||
LOADER_HELP_GUI=§8/§7loader gui §8- §7Shows Loader gui
|
LOADER_HELP_GUI=§8/§7loader gui §8- §7Shows Loader gui
|
||||||
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stops recording/playback
|
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stops recording/playback
|
||||||
|
LOADER_HELP_WAIT=§8/§7loader wait §8[§7Ticks§8] - §7Sets wait time between shots
|
||||||
|
LOADER_HELP_SPEED=§8/§7loader speed §8[§7Ticks§8] - §7Sets wait time between actions
|
||||||
LOADER_NO_LOADER=§cYou have no Laoder. Create one with /loader setup
|
LOADER_NO_LOADER=§cYou have no Laoder. Create one with /loader setup
|
||||||
LOADER_NEW=§7Load your cannon and fire it once, to initialise the loader.
|
LOADER_NEW=§7Load your cannon and fire it once, to initialise the loader.
|
||||||
LOADER_HOW_TO_START=§7Then, execute /§eloader start§7 to start the Loader
|
LOADER_HOW_TO_START=§7Then, execute /§eloader start§7 to start the Loader
|
||||||
LOADER_ACTIVE=§7The Loader is now active.
|
LOADER_ACTIVE=§7The Loader is now active.
|
||||||
LOADER_STOP=§7The Loader has been stopped.
|
LOADER_STOP=§7The Loader has been stopped.
|
||||||
|
LOADER_SINGLE_CMD=§7The Loader does a single playback.
|
||||||
LOADER_PAUSED=§7The Loader is now paused.
|
LOADER_PAUSED=§7The Loader is now paused.
|
||||||
LOADER_PERMS=§cYou are not allowed to use the Loader here
|
LOADER_SMALL_TIME=§cThe wait time is too small
|
||||||
|
LOADER_NEW_TIME=§7The wait time is now: {0}
|
||||||
|
LOADER_NEW_LOAD_TIME=§7The action wait time is now: {0}
|
||||||
LOADER_NOTHING_RECORDED=§cYou have not recorded anything yet!
|
LOADER_NOTHING_RECORDED=§cYou have not recorded anything yet!
|
||||||
LOADER_GUI_TITLE=Loader GUI
|
LOADER_GUI_TITLE=Loader GUI
|
||||||
LOADER_GUI_SHOW_INTERACTIONS=§eShow only Interactions
|
LOADER_GUI_SHOW_ALL=Show all
|
||||||
LOADER_GUI_SHOW_WAITS=§eShow only Waits
|
LOADER_GUI_SHOW_INTERACTIONS=Show only Interactions
|
||||||
LOADER_GUI_SHOW_WAITS_SET_BETWEEN_TNT=§7Wait Time between TNT
|
LOADER_GUI_SHOW_WAITS=Show only Waits
|
||||||
|
LOADER_GUI_SHOW_WAITS_BETWEEN_TNT=Show only Waits between TNT
|
||||||
|
LOADER_GUI_SHOW_TNT=Show TNT
|
||||||
LOADER_GUI_SHOW_WAITS_SET_ALL=§7Wait Time all
|
LOADER_GUI_SHOW_WAITS_SET_ALL=§7Wait Time all
|
||||||
LOADER_GUI_SHOW_WAITS_TITLE=§7Wait Time
|
LOADER_GUI_SHOW_WAITS_TITLE=§7Wait Time
|
||||||
LOADER_GUI_SETTINGS_TITLE=Settings
|
LOADER_GUI_SETTINGS_TITLE=Settings
|
||||||
|
LOADER_GUI_COPY_TITLE=Copy amount
|
||||||
LOADER_GUI_SETTINGS_BACK=§8Back
|
LOADER_GUI_SETTINGS_BACK=§8Back
|
||||||
|
LOADER_GUI_SETTINGS_COPY=§7Copy
|
||||||
LOADER_GUI_SETTINGS_DELETE=§cDelete
|
LOADER_GUI_SETTINGS_DELETE=§cDelete
|
||||||
LOADER_GUI_WAIT_TITLE=Settings
|
LOADER_GUI_WAIT_TITLE=Settings
|
||||||
LOADER_GUI_WAIT_BACK=§8Back
|
LOADER_GUI_WAIT_BACK=§8Back
|
||||||
|
LOADER_GUI_CLICK_TO_EDIT=§7Click to edit
|
||||||
LOADER_GUI_CLICK_TO_EDIT=§7Klicke zum editieren
|
|
||||||
LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1}
|
LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1}
|
||||||
LOADER_SETTING_NAME=§7{0}
|
LOADER_SETTING_NAME=§7{0}
|
||||||
LOADER_SETTING_MODES=§7Modi§8: §e{0}
|
LOADER_SETTING_MODES=§7Modes§8: §e{0}
|
||||||
LOADER_SETTING_POWER=§7Redstone Stärke§8: §e{0}
|
LOADER_SETTING_POWER=§7Power§8: §e{0}
|
||||||
LOADER_SETTING_TICKS=§7Ticks§8: §e{0}
|
LOADER_SETTING_TICKS=§7Ticks§8: §e{0}
|
||||||
LOADER_SETTING_REPEATER=§7Repeater§8: §e{0}
|
LOADER_SETTING_REPEATER=§7Repeater§8: §e{0}
|
||||||
LOADER_SETTING_WAIT=§7Wartezeit§8: §e{0} Tick(s)
|
LOADER_SETTING_WAIT=§7Wait§8: §e{0} Tick(s)
|
||||||
LOADER_SETTING_WAIT_NAME=Wartezeit
|
LOADER_SETTING_WAIT_NAME=Wait
|
||||||
LOADER_SETTING_TICKS_NAME=Ticks
|
LOADER_SETTING_TICKS_NAME=Ticks
|
||||||
LOADER_SETTING_TICKS_REMOVE_ONE=§c-1
|
LOADER_SETTING_TICKS_REMOVE_ONE=§c-1
|
||||||
LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5
|
LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5
|
||||||
@ -588,19 +555,21 @@ LOADER_SETTING_TNT_X=§7X§8: §e{0}
|
|||||||
LOADER_SETTING_TNT_Y=§7Y§8: §e{0}
|
LOADER_SETTING_TNT_Y=§7Y§8: §e{0}
|
||||||
LOADER_SETTING_TNT_Z=§7Z§8: §e{0}
|
LOADER_SETTING_TNT_Z=§7Z§8: §e{0}
|
||||||
LOADER_INTERACTION_NOOP=NOOP
|
LOADER_INTERACTION_NOOP=NOOP
|
||||||
LOADER_INTERACTION_INTERACT=Interagiere
|
LOADER_INTERACTION_PLACE=Place
|
||||||
LOADER_INTERACTION_POWERED=Aktiviert
|
LOADER_INTERACTION_INTERACT=Interact
|
||||||
LOADER_INTERACTION_UNPOWERED=Deaktiviert
|
LOADER_INTERACTION_POWERED=Powered
|
||||||
LOADER_INTERACTION_PAGE_PREV=Vorherige Seite
|
LOADER_INTERACTION_UNPOWERED=Unpowered
|
||||||
LOADER_INTERACTION_PAGE_NEXT=Nächste Seite
|
LOADER_INTERACTION_PAGE_PREV=Previous Page
|
||||||
LOADER_INTERACTION_PAGE=Seite {0}
|
LOADER_INTERACTION_PAGE_NEXT=Next Page
|
||||||
LOADER_INTERACTION_ACTIVE=Aktiviert
|
LOADER_INTERACTION_PAGE=Page {0}
|
||||||
LOADER_INTERACTION_INACTIVE=Deaktiviert
|
LOADER_INTERACTION_ACTIVE=Active
|
||||||
LOADER_INTERACTION_WAIT_FOR=Darauf warten
|
LOADER_INTERACTION_INACTIVE=Inactive
|
||||||
LOADER_INTERACTION_NO_WAIT_FOR=Nicht darauf warten
|
LOADER_INTERACTION_WAIT_FOR=Wait for
|
||||||
LOADER_INTERACTION_OPEN=Geöffnet
|
LOADER_INTERACTION_NO_WAIT_FOR=No wait for
|
||||||
LOADER_INTERACTION_CLOSED=Geschlossen
|
LOADER_INTERACTION_OPEN=Open
|
||||||
|
LOADER_INTERACTION_CLOSED=Closed
|
||||||
|
LOADER_INTERACTION_COMPARE=Compare
|
||||||
|
LOADER_INTERACTION_SUBTRACT=Subtract
|
||||||
# Loadtimer
|
# Loadtimer
|
||||||
LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon
|
LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon
|
||||||
LOADTIMER_HELP_START_1=§8/§eloadtimer start §8-§7 Starts the simple Loadtimer
|
LOADTIMER_HELP_START_1=§8/§eloadtimer start §8-§7 Starts the simple Loadtimer
|
||||||
@ -630,7 +599,6 @@ LOADTIMER_SUMARY_TIMES_LAST=§7\\/
|
|||||||
LOADTIMER_SUMARY_STATS_HEAD=§7Cannon-Stats§8:
|
LOADTIMER_SUMARY_STATS_HEAD=§7Cannon-Stats§8:
|
||||||
LOADTIMER_SUMARY_STATS_TNT=§7TNT: §e{0}
|
LOADTIMER_SUMARY_STATS_TNT=§7TNT: §e{0}
|
||||||
LOADTIMER_SUMARY_STATS_FREQ=§7Loading frequency: §e{0}/m§8, §7Shot frequency: §e{1}/m
|
LOADTIMER_SUMARY_STATS_FREQ=§7Loading frequency: §e{0}/m§8, §7Shot frequency: §e{1}/m
|
||||||
|
|
||||||
# Observer
|
# Observer
|
||||||
OBSERVER_HELP=§7Right-Click an Observer to get the Trace. Flame particles have to be enabled. The Particles will be shown in the block.
|
OBSERVER_HELP=§7Right-Click an Observer to get the Trace. Flame particles have to be enabled. The Particles will be shown in the block.
|
||||||
OBSERVER_HELP_ENABLE=§8/§eobserver enable §8-§7 Activates the Observer-Tracer
|
OBSERVER_HELP_ENABLE=§8/§eobserver enable §8-§7 Activates the Observer-Tracer
|
||||||
@ -642,7 +610,6 @@ OBSERVER_DISABLE = §7Observer trace stopped
|
|||||||
OBSERVER_DELETE=§7Observer trace deleted
|
OBSERVER_DELETE=§7Observer trace deleted
|
||||||
OBSERVER_RETRACE_DONE=§7Observer trace retraced
|
OBSERVER_RETRACE_DONE=§7Observer trace retraced
|
||||||
OBSERVER_RETRACE_NO_TRACE=§7No Observer trace to retrace
|
OBSERVER_RETRACE_NO_TRACE=§7No Observer trace to retrace
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
OTHER_ITEMS_TELEPORT_NAME=§eTeleporter
|
OTHER_ITEMS_TELEPORT_NAME=§eTeleporter
|
||||||
OTHER_ITEMS_TELEPORT_GUI_NAME=Teleport
|
OTHER_ITEMS_TELEPORT_GUI_NAME=Teleport
|
||||||
@ -664,10 +631,9 @@ OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Take the faced block into
|
|||||||
OTHER_NOCLIP_SLOT_HELP_DROP=§8/§eslot drop §8-§7 Clears your slot
|
OTHER_NOCLIP_SLOT_HELP_DROP=§8/§eslot drop §8-§7 Clears your slot
|
||||||
OTHER_CLEAR_HELP_SELF=§8/§eclear §8- §7Clears your inventory
|
OTHER_CLEAR_HELP_SELF=§8/§eclear §8- §7Clears your inventory
|
||||||
OTHER_CLEAR_HELP_PLAYER=§8/§eclear §8[§7Player§8] §8- §7Clears a player inventory
|
OTHER_CLEAR_HELP_PLAYER=§8/§eclear §8[§7Player§8] §8- §7Clears a player inventory
|
||||||
OTHER_CLEAR_CLEARED=Your inventory was cleared.
|
OTHER_CLEAR_CLEARED=§7Your inventory was cleared.
|
||||||
OTHER_CLEAR_FROM=Your invetnory was cleared by {0}.
|
OTHER_CLEAR_FROM=§7Your invetnory was cleared by {0}.
|
||||||
OTHER_CLEAR_TO=The inventory of {0} §7was cleared.
|
OTHER_CLEAR_TO=§7The inventory of {0} §7was cleared.
|
||||||
OTHER_CLEAR_NO_PERMS=§cYou are not allowed to clear other's inventory here.
|
|
||||||
OTHER_DECLUTTER_HELP=§8/§edeclutter §8- §7Organise your inventory
|
OTHER_DECLUTTER_HELP=§8/§edeclutter §8- §7Organise your inventory
|
||||||
OTHER_DECLUTTER_DONE=§aYour inventory was organised.
|
OTHER_DECLUTTER_DONE=§aYour inventory was organised.
|
||||||
OTHER_GAMEMODE_UNKNOWN=§cUnknown gamemode.
|
OTHER_GAMEMODE_UNKNOWN=§cUnknown gamemode.
|
||||||
@ -683,13 +649,18 @@ OTHER_TELEPORT_SELF_2=§cBlocks left to travel: 0; ETA: 0:00
|
|||||||
OTHER_TELEPORT_SELF_3=§cA little Movement is important.
|
OTHER_TELEPORT_SELF_3=§cA little Movement is important.
|
||||||
OTHER_TELEPORT_SELF_4=§cFor such a distance?
|
OTHER_TELEPORT_SELF_4=§cFor such a distance?
|
||||||
OTHER_TIME_HELP=§8/§etime §8<§7Time 0=Morining§8, §76000=Midday§8, §718000=Midnight§8> - §7Sets the time on the Build
|
OTHER_TIME_HELP=§8/§etime §8<§7Time 0=Morining§8, §76000=Midday§8, §718000=Midnight§8> - §7Sets the time on the Build
|
||||||
OTHER_TIME_NO_PERM=§cYou are not allowed to change the time here
|
|
||||||
OTHER_TIME_INVALID=§cPlease input a time between 0 and 24000
|
OTHER_TIME_INVALID=§cPlease input a time between 0 and 24000
|
||||||
OTHER_TIME_RESULT=§7§oWhooosh
|
OTHER_TIME_RESULT=§7§oWhooosh
|
||||||
OTHER_TPS_HEAD=§7TPS: 1s 10s 1m 5m 10m
|
OTHER_TPS_HEAD=§7TPS: 1s 10s 1m 5m 10m
|
||||||
OTHER_TPS_MESSAGE=§7 §e{0}§7 §e{1}§7 §e{2}§7 §e{3}§7 §e{4}
|
OTHER_TPS_MESSAGE=§7 §e{0}§7 §e{1}§7 §e{2}§7 §e{3}§7 §e{4}
|
||||||
OTHER_TPS_SINGLE=§8TPS: §e{0}
|
OTHER_TPS_SINGLE=§8TPS: §e{0}
|
||||||
OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleport to the spawn
|
OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleport to the spawn
|
||||||
|
OTHER_BIND_HELP=§8/§ebind §8[§7Command§8] §8-§e Bind a command on item interaction
|
||||||
|
OTHER_BIND_ERROR=§cInvalid or unknown command
|
||||||
|
OTHER_BIND_UNBINDABLE=§cCould not bind command
|
||||||
|
OTHER_BIND_LORE=§eCommand§8:§7 {0}
|
||||||
|
OTHER_BIND_MESSAGE_BIND=§7Bound command §e{0} §7to item
|
||||||
|
OTHER_BIND_MESSAGE_UNBIND=§7Unbound command
|
||||||
# DebugStick
|
# DebugStick
|
||||||
DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 receive a debugstick
|
DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 receive a debugstick
|
||||||
DEBUG_STICK_NAME=§eDebugstick
|
DEBUG_STICK_NAME=§eDebugstick
|
||||||
@ -706,7 +677,6 @@ NIGHT_VISION_OFF=§eNightvision deactivated
|
|||||||
NIGHT_VISION_ON=§eNightvision activated
|
NIGHT_VISION_ON=§eNightvision activated
|
||||||
NIGHT_VISION_ITEM_ON=§7Nightvision: §eActivated
|
NIGHT_VISION_ITEM_ON=§7Nightvision: §eActivated
|
||||||
NIGHT_VISION_ITEM_OFF=§7Nightvision: §eDeactivated
|
NIGHT_VISION_ITEM_OFF=§7Nightvision: §eDeactivated
|
||||||
|
|
||||||
#Navigation Wand
|
#Navigation Wand
|
||||||
NAVIGATION_WAND=§eNavigation Wand
|
NAVIGATION_WAND=§eNavigation Wand
|
||||||
NAVIGATION_WAND_LEFT_CLICK=§eLeft click: jump to location
|
NAVIGATION_WAND_LEFT_CLICK=§eLeft click: jump to location
|
||||||
@ -743,17 +713,6 @@ MATERIAL_FLAMMABLE=§8- §eFlammable block
|
|||||||
MATERIAL_BURNABLE=§8- §eBurnable block
|
MATERIAL_BURNABLE=§8- §eBurnable block
|
||||||
MATERIAL_WATERLOGGABLE=§8- §eWaterloggable block
|
MATERIAL_WATERLOGGABLE=§8- §eWaterloggable block
|
||||||
MATERIAL_UNMOVABLE=§8- §eUnmovable block
|
MATERIAL_UNMOVABLE=§8- §eUnmovable block
|
||||||
# Redstonetester
|
|
||||||
RT_HELP=§8/§eredstonetester §8-§7 Gives you the redstone tester
|
|
||||||
RT_GIVEN=§7Measure the time between activation of components
|
|
||||||
RT_ITEM_NAME=§eRedstonetester
|
|
||||||
RT_ITEM_LORE_1=§eLeftclick block §8-§7 Sets the 1. Position
|
|
||||||
RT_ITEM_LORE_2=§eRightclick block §8-§7 Sets the 2. Position
|
|
||||||
RT_ITEM_LORE_3=§eShift-rightclick in air §8-§7 Reset
|
|
||||||
RT_LOC=§8: §e{0} {1} {2}
|
|
||||||
RT_INVALID_LOC=§cUnknown Position
|
|
||||||
RT_RESULT=§7Difference§8: §e{0}§7 Ticks §8,§7 R-Ticks §e{1}
|
|
||||||
RT_ACTIVATE=§7Positions deleted§8.
|
|
||||||
# Region Items
|
# Region Items
|
||||||
REGION_ITEM_COLOR=§7Color: §e{0}
|
REGION_ITEM_COLOR=§7Color: §e{0}
|
||||||
REGION_ITEM_COLOR_CHOOSE=Choose color
|
REGION_ITEM_COLOR_CHOOSE=Choose color
|
||||||
@ -767,35 +726,34 @@ REGION_ITEM_RESET=§eReset
|
|||||||
REGION_ITEM_TESTBLOCK=§eDummy
|
REGION_ITEM_TESTBLOCK=§eDummy
|
||||||
REGION_ITEM_TNT_OFF=§7TNT: §eDeactivated
|
REGION_ITEM_TNT_OFF=§7TNT: §eDeactivated
|
||||||
REGION_ITEM_TNT_ONLY_TB=§7TNT: §eonly dummy
|
REGION_ITEM_TNT_ONLY_TB=§7TNT: §eonly dummy
|
||||||
|
REGION_ITEM_TNT_ONLY_BUILD=§7TNT: §eonly build
|
||||||
REGION_ITEM_TNT_ON=§7TNT: §eActivated
|
REGION_ITEM_TNT_ON=§7TNT: §eActivated
|
||||||
REGION_ITEM_SELECTOR_TITLE=Tnt Mode
|
REGION_ITEM_SELECTOR_TITLE=Tnt Mode
|
||||||
REGION_ITEM_SELECTOR_ON=§eActivate
|
REGION_ITEM_SELECTOR_ON=§eActivate
|
||||||
REGION_ITEM_SELECTOR_ONLY_TB=§eonly dummy
|
REGION_ITEM_SELECTOR_ONLY_TB=§eonly dummy
|
||||||
|
REGION_ITEM_SELECTOR_ONLY_BUILD=§eonly build
|
||||||
REGION_ITEM_SELECTOR_OFF=§eDeactivate
|
REGION_ITEM_SELECTOR_OFF=§eDeactivate
|
||||||
#Region
|
#Region
|
||||||
REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Sets the color of the region
|
REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Sets the color of the region
|
||||||
REGION_COLOR_HELP_COLOR_TYPE=§8/§ecolor §8[§7Color§8] §8[§7Type§8] §8- §7Sets the color of the region or globally
|
REGION_COLOR_HELP_COLOR_TYPE=§8/§ecolor §8[§7Color§8] §8[§7Type§8] §8- §7Sets the color of the region or globally
|
||||||
REGION_COLOR_GLOBAL=§7All regions color set to §e{0}
|
REGION_COLOR_GLOBAL=§7All regions color set to §e{0}
|
||||||
REGION_COLOR_NO_REGION=§cYou are currently not in any region
|
REGION_COLOR_NO_REGION=§cYou are currently not in any region
|
||||||
REGION_COLOR_NO_PERMS=§cThis is not your world!
|
|
||||||
REGION_FIRE_HELP=§8/§efire §8- §7Toggle fire damage
|
REGION_FIRE_HELP=§8/§efire §8- §7Toggle fire damage
|
||||||
REGION_FIRE_NO_PERMS=§cYou are not allowed to toggle fire damage here
|
|
||||||
REGION_FIRE_ENABLED=§cFire damage deactivated in this region
|
REGION_FIRE_ENABLED=§cFire damage deactivated in this region
|
||||||
REGION_FIRE_DISABLED=§aFire damage activated in this region
|
REGION_FIRE_DISABLED=§aFire damage activated in this region
|
||||||
REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze
|
REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze
|
||||||
REGION_FREEZE_NO_PERMS=§cYou are not allowed to freeze this world
|
|
||||||
REGION_FREEZE_ENABLED=§cRegion frozen
|
REGION_FREEZE_ENABLED=§cRegion frozen
|
||||||
REGION_FREEZE_DISABLED=§aRegion thawed
|
REGION_FREEZE_DISABLED=§aRegion thawed
|
||||||
REGION_ITEMS_HELP=§8/§eitems §8- §7Toggle Items
|
REGION_ITEMS_HELP=§8/§eitems §8- §7Toggle Items
|
||||||
REGION_ITEMS_NO_PERMS=§cYou are not allowed to toggle items in this world
|
|
||||||
REGION_ITEMS_ENABLED=§aItems enabled in this region
|
REGION_ITEMS_ENABLED=§aItems enabled in this region
|
||||||
REGION_ITEMS_DISABLED_GLOBAL=§cItems disabled in this world
|
|
||||||
REGION_ITEMS_DISABLED=§cItems disabled in this region
|
REGION_ITEMS_DISABLED=§cItems disabled in this region
|
||||||
REGION_PROTECT_HELP=§8/§eprotect §8- §7Protect the region
|
REGION_PROTECT_HELP=§8/§eprotect §8- §7Protect the region
|
||||||
REGION_PROTECT_DISABLE=§cProtection disabled
|
REGION_PROTECT_DISABLE=§cProtection disabled
|
||||||
REGION_PROTECT_ENABLE=§aProtection enabled
|
REGION_PROTECT_ENABLE=§aProtection enabled
|
||||||
REGION_PROTECT_NO_PERMS=§cYou are not allowed to protect the floor here
|
|
||||||
REGION_PROTECT_FALSE_REGION=§cYou are not currently in a (M)WG-region
|
REGION_PROTECT_FALSE_REGION=§cYou are not currently in a (M)WG-region
|
||||||
|
REGION_NO_GRAVITY_HELP = §8/§enogravity §8- §7Toggle NoGravity
|
||||||
|
REGION_NO_GRAVITY_ENABLED = §aNoGravity enabled in this region
|
||||||
|
REGION_NO_GRAVITY_DISABLED = §cNoGravity disabled in this region
|
||||||
REGION_REGION_HELP_UNDO=§8/§eregion undo §8- §7undo the last 20 /testblock or /reset
|
REGION_REGION_HELP_UNDO=§8/§eregion undo §8- §7undo the last 20 /testblock or /reset
|
||||||
REGION_REGION_HELP_REDO=§8/§eregion redo §8- §7redo the last 20 §8/§7rg undo
|
REGION_REGION_HELP_REDO=§8/§eregion redo §8- §7redo the last 20 §8/§7rg undo
|
||||||
REGION_REGION_HELP_RESTORE=§8/§eregion restore §8- §7Resets the region, without removing your builds
|
REGION_REGION_HELP_RESTORE=§8/§eregion restore §8- §7Resets the region, without removing your builds
|
||||||
@ -804,6 +762,8 @@ REGION_REGION_HELP_COPYPOINT=§8/§eregion copypoint §8- §7Teleport to the reg
|
|||||||
REGION_REGION_HELP_TESTBLOCKPOINT=§8/§eregion testblockpoint §8- §7Teleport to the regions dummy point
|
REGION_REGION_HELP_TESTBLOCKPOINT=§8/§eregion testblockpoint §8- §7Teleport to the regions dummy point
|
||||||
REGION_REGION_HELP_CHANGESKIN_INFO=§8/§eregion changeskin §8- §7Returns the region skin
|
REGION_REGION_HELP_CHANGESKIN_INFO=§8/§eregion changeskin §8- §7Returns the region skin
|
||||||
REGION_REGION_HELP_CHANGESKIN=§8/§eregion changeskin §8[§7Skin§8] §8- §8Sets the region skin
|
REGION_REGION_HELP_CHANGESKIN=§8/§eregion changeskin §8[§7Skin§8] §8- §8Sets the region skin
|
||||||
|
REGION_REGION_HELP_COPY=§8/§eregion copy [-e] [-s] §8- §8Copy the build area optional with extensions or selection at the copypoint
|
||||||
|
REGION_REGION_HELP_PASTE=§8/§eregion paste [-a] [-s] §8[§7Skin§8] §8- §8Pastes at the copypoint optional without air and selecting the pasted region
|
||||||
REGION_REGION_NOTHING_UNDO=§cNothing left to undo
|
REGION_REGION_NOTHING_UNDO=§cNothing left to undo
|
||||||
REGION_REGION_UNDID=§7Last action undone
|
REGION_REGION_UNDID=§7Last action undone
|
||||||
REGION_REGION_NOTHING_REDO=§cNothing left to redo
|
REGION_REGION_NOTHING_REDO=§cNothing left to redo
|
||||||
@ -817,7 +777,9 @@ REGION_REGION_TP_COPY=§7Teleported to the copy point
|
|||||||
REGION_REGION_TP_TEST_BLOCK=§7Teleported to the tesblock
|
REGION_REGION_TP_TEST_BLOCK=§7Teleported to the tesblock
|
||||||
REGION_REGION_TP_UNKNOWN=§cUndefined teleport point
|
REGION_REGION_TP_UNKNOWN=§cUndefined teleport point
|
||||||
REGION_REGION_NO_REGION=§cYou are not inside any region
|
REGION_REGION_NO_REGION=§cYou are not inside any region
|
||||||
REGION_REGION_NO_PERMS=§cYou are not allowed to change the region
|
REGION_REGION_NO_BUILD=§cThis region has no build area
|
||||||
|
REGION_REGION_COPY_DONE=§eBuild region or selection copied
|
||||||
|
REGION_REGION_PASTE_DONE=§eBuild region or selection pasted
|
||||||
REGION_REGION_CHANGESKIN_INFO=§7Region skin is §e{0}
|
REGION_REGION_CHANGESKIN_INFO=§7Region skin is §e{0}
|
||||||
REGION_REGION_CHANGESKIN_INFO_CREATOR=§7Skin created by §e{0}
|
REGION_REGION_CHANGESKIN_INFO_CREATOR=§7Skin created by §e{0}
|
||||||
REGION_REGION_CHANGESKIN_UNKNOWN=§cRegion skin is invalid
|
REGION_REGION_CHANGESKIN_UNKNOWN=§cRegion skin is invalid
|
||||||
@ -829,7 +791,6 @@ REGION_RESET_HELP_RESET=§8/§ereset §8- §7Resets the region
|
|||||||
REGION_RESET_HELP_SCHEMATIC=§8/§ereset §8[§7Schematic§8] §8- §7Resets the region using a schematic
|
REGION_RESET_HELP_SCHEMATIC=§8/§ereset §8[§7Schematic§8] §8- §7Resets the region using a schematic
|
||||||
REGION_RESET_RESETED=§7Region reset
|
REGION_RESET_RESETED=§7Region reset
|
||||||
REGION_RESET_ERROR=§cError reseting the region
|
REGION_RESET_ERROR=§cError reseting the region
|
||||||
REGION_RESET_NO_PERMS=§cYou are not allowed to reset the region here
|
|
||||||
REGION_RESET_NO_REGION=§cYou are currently not in any region
|
REGION_RESET_NO_REGION=§cYou are currently not in any region
|
||||||
REGION_TB_HELP_RESET=§8/§etestblock §8- §7Reset the dummy
|
REGION_TB_HELP_RESET=§8/§etestblock §8- §7Reset the dummy
|
||||||
REGION_TB_HELP_RESET_EXTENSION=§8/§etestblock §8[§7ExtensionType§8] §8- §7Reset the dummy
|
REGION_TB_HELP_RESET_EXTENSION=§8/§etestblock §8[§7ExtensionType§8] §8- §7Reset the dummy
|
||||||
@ -837,63 +798,51 @@ REGION_TB_HELP_SCHEMATIC=§8/§etestblock §8[§7Schematic§8] §8- §7Reset the
|
|||||||
REGION_TB_HELP_SCHEMATIC_EXTENSION=§8/§etestblock §8[§7Schematic§8] §8[§7ExtensionType§8] §8- §7Reset the dummy using a schematic
|
REGION_TB_HELP_SCHEMATIC_EXTENSION=§8/§etestblock §8[§7Schematic§8] §8[§7ExtensionType§8] §8- §7Reset the dummy using a schematic
|
||||||
REGION_TB_DONE=§7Dummy reset
|
REGION_TB_DONE=§7Dummy reset
|
||||||
REGION_TB_ERROR=§cError resetting the dummy
|
REGION_TB_ERROR=§cError resetting the dummy
|
||||||
REGION_TB_NO_PERMS=§cYou are not allowed to reset the dummy here
|
|
||||||
REGION_TB_NO_REGION=§cYou are currently not in any region
|
REGION_TB_NO_REGION=§cYou are currently not in any region
|
||||||
|
REGION_TB_NO_SCHEMSHARING=§cYou currently cannot share schematics until {0}.
|
||||||
|
REGION_TB_NO_SCHEMRECEIVING=§cThe Owner of this build server cannot receive any schematics until {0}.
|
||||||
REGION_TNT_HELP=§8/§etnt §8- §7Change the TNT behaviour
|
REGION_TNT_HELP=§8/§etnt §8- §7Change the TNT behaviour
|
||||||
REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Set TNT behaviour to a given mode
|
REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Set TNT behaviour to a given mode
|
||||||
REGION_TNT_ON=§aTNT-Damage activated
|
REGION_TNT_ON=§aTNT-Damage activated
|
||||||
REGION_TNT_OFF=§cTNT-Damage deactivated
|
REGION_TNT_OFF=§cTNT-Damage deactivated
|
||||||
REGION_TNT_TB=§aTNT-Damage activated outside the building area
|
REGION_TNT_TB=§aTNT-Damage activated outside the building area
|
||||||
REGION_TNT_NO_PERMS=§cYou are not allowed to toggle tnt damage here
|
REGION_TNT_BUILD=§aTNT-Damage activated outside the testblok area
|
||||||
REGION_TNT_BUILD=§cAn explosion would have destroyed blocks in the building area
|
REGION_TNT_BUILD_DESTROY=§cAn explosion would have destroyed blocks in the building area
|
||||||
# Team
|
REGION_TNT_TB_DESTROY=§cAn explosion would have destroyed blocks in the testblock area
|
||||||
LOCK_SCHEM_NO_USER=§7This player does not exist!
|
AFK_KICK_MESSAGE=§cNothing happened on this server for 15 minutes.
|
||||||
LOCK_SCHEM_NO_SCHEM=§7This player does not have a schem with that name!
|
|
||||||
LOCK_SCHEM_DIR=§7The given schem is a directory
|
|
||||||
LOCK_SCHEM_LOCKED=§e{0} §7by §e{1} §7was reset from §e{2} §7to §eNORMAL §7.
|
|
||||||
LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] - §7Lock a schematic (Notify user about locking reason!)
|
|
||||||
AFK_KICK_MESSAGE=§cNothing happened on this server for 5 minutes.
|
|
||||||
AFK_WARNING_MESSAGE=§cThis server will stop in one minute if you remain inactive
|
AFK_WARNING_MESSAGE=§cThis server will stop in one minute if you remain inactive
|
||||||
|
|
||||||
SKIN_HELP=§8/§eskin §8[§7Shortform§8] §8[§7Creator§8|§epublic§8] §8[§7Name...§8] §8- §7Creates the skin schematic. Use 'public' as creator to have no creator, then copy the message to YoyoNow by clicking
|
SKIN_HELP=§8/§eskin §8[§7Shortform§8] §8[§7Creator§8|§epublic§8] §8[§7Name...§8] §8- §7Creates the skin schematic. Use 'public' as creator to have no creator, then copy the message to YoyoNow by clicking
|
||||||
SKIN_NO_REGION=§7You are not in a region with a changealbe skin
|
SKIN_NO_REGION=§7You are not in a region with a changealbe skin
|
||||||
SKIN_ALREADY_EXISTS=§cThis skin already exists like this
|
SKIN_ALREADY_EXISTS=§cThis skin already exists like this
|
||||||
SKIN_MESSAGE=§7Skin created
|
SKIN_MESSAGE=§7Skin created
|
||||||
SKIN_MESSAGE_HOVER=§eClick to copy for YoyoNow and send
|
SKIN_MESSAGE_HOVER=§eClick to copy for YoyoNow and send
|
||||||
|
|
||||||
# Panzern
|
# Panzern
|
||||||
PANZERN_HELP=§8/§epanzern §8[§7Block§8] §8[§7Slab§8] §8- §7Armor your WorldEdit selection
|
PANZERN_HELP=§8/§epanzern §8[§7Block§8] §8[§7Slab§8] §8- §7Armor your WorldEdit selection
|
||||||
PANZERN_PREPARE1=§71. Check, if barrels reach until border of armor.
|
PANZERN_PREPARE1=§71. Check, if barrels reach until border of armor.
|
||||||
PANZERN_PREPARE2=§72. Carpet on the floor in walkways helps with armoring.
|
PANZERN_PREPARE2=§72. Carpet on the floor in walkways helps with armoring.
|
||||||
PANZERN_PREPARE3=§73. Shieldtechnology should be encased.
|
PANZERN_PREPARE3=§73. Shieldtechnology should be encased.
|
||||||
PANZERN_PREPARE4=§74. Standing in the region that is being armored can improve armoring.
|
PANZERN_PREPARE4=§74. Standing in the region that is being armored can improve armoring.
|
||||||
PANZERN_NO_PERM = §cYou are not allowed to use the armoring system here
|
|
||||||
PANZERN_NO_WORLDEDIT=§cYou have no WorldEdit selcetion
|
PANZERN_NO_WORLDEDIT=§cYou have no WorldEdit selcetion
|
||||||
PANZERN_PROGRESS=§e{0} §7Blocks left, §e{1} §7Blocks per second, §e{2} §7block delta
|
PANZERN_PROGRESS=§e{0} §7Blocks left, §e{1} §7Blocks per second, §e{2} §7block delta
|
||||||
PANZERN_DONE=§aDone
|
PANZERN_DONE=§aDone
|
||||||
|
|
||||||
# Laufbau
|
# Laufbau
|
||||||
LAUFBAU_HELP=§8/§elaufbau §8[§7smallest§8|§7blastresistant§8] §8- §7Build a barrel in your WorldEdit selection using the traces
|
LAUFBAU_HELP=§8/§elaufbau §8[§7smallest§8|§7blastresistant§8] §8- §7Build a barrel in your WorldEdit selection using the traces
|
||||||
LAUFBAU_HELP_SETTINGS=§8/§elaufbau settings §8- §7Opens the settings GUI
|
LAUFBAU_HELP_SETTINGS=§8/§elaufbau settings §8- §7Opens the settings GUI
|
||||||
LAUFBAU_PREPARE1=§71. Trace the cannons as often as necessary, in all modes.
|
LAUFBAU_PREPARE1=§71. Trace the cannons as often as necessary, in all modes.
|
||||||
LAUFBAU_PREPARE2=§72. Try to delete all fails from the traces.
|
LAUFBAU_PREPARE2=§72. Try to delete all fails from the traces.
|
||||||
LAUFBAU_NO_PERM = §cYou are not allowed to use the barrel building system here
|
|
||||||
LAUFBAU_NO_WORLDEDIT=§cYou don't have a WorldEdit selection
|
LAUFBAU_NO_WORLDEDIT=§cYou don't have a WorldEdit selection
|
||||||
LAUFBAU_STATE_FILTERING_TRACES=Filtering traces
|
LAUFBAU_STATE_FILTERING_TRACES=Filtering traces
|
||||||
LAUFBAU_STATE_PROCESSING_TRACES=Connnecting traces
|
LAUFBAU_STATE_PROCESSING_TRACES=Connnecting traces
|
||||||
LAUFBAU_STATE_CREATE_LAUF=Create Barrel
|
LAUFBAU_STATE_CREATE_LAUF=Create Barrel
|
||||||
LAUFBAU_SIMPLE_PROGRESS=§e{0}§8: §e{1}§8/§e{2} §7Time left§8: §e{3}
|
LAUFBAU_SIMPLE_PROGRESS=§e{0}§8: §e{1}§8/§e{2} §7Time left§8: §e{3}
|
||||||
LAUFBAU_DONE=§aDone
|
LAUFBAU_DONE=§aDone
|
||||||
|
|
||||||
LAUFBAU_SETTINGS_GUI_NAME=§eLaufbau
|
LAUFBAU_SETTINGS_GUI_NAME=§eLaufbau
|
||||||
LAUFBAU_SETTINGS_ACTIVE=§aActive
|
LAUFBAU_SETTINGS_ACTIVE=§aActive
|
||||||
LAUFBAU_SETTINGS_INACTIVE=§cInactive
|
LAUFBAU_SETTINGS_INACTIVE=§cInactive
|
||||||
LAUFBAU_SETTINGS_MIXED=§e{0}§8/§e{1} §aActive
|
LAUFBAU_SETTINGS_MIXED=§e{0}§8/§e{1} §aActive
|
||||||
LAUFBAU_SETTINGS_GUI_BACK=§eBack
|
LAUFBAU_SETTINGS_GUI_BACK=§eBack
|
||||||
|
|
||||||
LAUFBAU_SETTINGS_TOGGLE=§eClick §8-§7 Toggle
|
LAUFBAU_SETTINGS_TOGGLE=§eClick §8-§7 Toggle
|
||||||
LAUFBAU_SETTINGS_ADVANCED=§eMiddle-Click §8-§7 Advanced settings
|
LAUFBAU_SETTINGS_ADVANCED=§eMiddle-Click §8-§7 Advanced settings
|
||||||
|
|
||||||
LAUFBAU_BLOCK_COBWEB=§eCobweb
|
LAUFBAU_BLOCK_COBWEB=§eCobweb
|
||||||
LAUFBAU_BLOCK_GRASS_PATH=§eGrass Path
|
LAUFBAU_BLOCK_GRASS_PATH=§eGrass Path
|
||||||
LAUFBAU_BLOCK_SOUL_SAND=§eSoul Sand
|
LAUFBAU_BLOCK_SOUL_SAND=§eSoul Sand
|
||||||
@ -936,39 +885,31 @@ LAUFBAU_BLOCK_AZALEA = §eAzalea
|
|||||||
LAUFBAU_BLOCK_CANDLE=§eCandle
|
LAUFBAU_BLOCK_CANDLE=§eCandle
|
||||||
LAUFBAU_BLOCK_CANDLE_CAKE=§eCake with Candle
|
LAUFBAU_BLOCK_CANDLE_CAKE=§eCake with Candle
|
||||||
LAUFBAU_BLOCK_LECTERN=§eLectern
|
LAUFBAU_BLOCK_LECTERN=§eLectern
|
||||||
|
|
||||||
LAUFBAU_FACING_NORTH=§8-§7 Facing North
|
LAUFBAU_FACING_NORTH=§8-§7 Facing North
|
||||||
LAUFBAU_FACING_SOUTH=§8-§7 Facing South
|
LAUFBAU_FACING_SOUTH=§8-§7 Facing South
|
||||||
LAUFBAU_FACING_WEST=§8-§7 Facing West
|
LAUFBAU_FACING_WEST=§8-§7 Facing West
|
||||||
LAUFBAU_FACING_EAST=§8-§7 Facing East
|
LAUFBAU_FACING_EAST=§8-§7 Facing East
|
||||||
LAUFBAU_FACING_UP=§8-§7 Facing Up
|
LAUFBAU_FACING_UP=§8-§7 Facing Up
|
||||||
LAUFBAU_FACING_DOWN=§8-§7 Facing Down
|
LAUFBAU_FACING_DOWN=§8-§7 Facing Down
|
||||||
|
|
||||||
LAUFBAU_COUNT_1=§8-§7 Count 1
|
LAUFBAU_COUNT_1=§8-§7 Count 1
|
||||||
LAUFBAU_COUNT_2=§8-§7 Count 2
|
LAUFBAU_COUNT_2=§8-§7 Count 2
|
||||||
LAUFBAU_COUNT_3=§8-§7 Count 3
|
LAUFBAU_COUNT_3=§8-§7 Count 3
|
||||||
LAUFBAU_COUNT_4=§8-§7 Count 4
|
LAUFBAU_COUNT_4=§8-§7 Count 4
|
||||||
|
|
||||||
LAUFBAU_LAYERS_8=§8-§7 Layers 8
|
LAUFBAU_LAYERS_8=§8-§7 Layers 8
|
||||||
LAUFBAU_LAYERS_7=§8-§7 Layers 7
|
LAUFBAU_LAYERS_7=§8-§7 Layers 7
|
||||||
LAUFBAU_LAYERS_6=§8-§7 Layers 6
|
LAUFBAU_LAYERS_6=§8-§7 Layers 6
|
||||||
LAUFBAU_LAYERS_3=§8-§7 Layers 3
|
LAUFBAU_LAYERS_3=§8-§7 Layers 3
|
||||||
LAUFBAU_LAYERS_2=§8-§7 Layers 2
|
LAUFBAU_LAYERS_2=§8-§7 Layers 2
|
||||||
|
|
||||||
LAUFBAU_TYPE_BOTTOM=§8-§7 Type bottom
|
LAUFBAU_TYPE_BOTTOM=§8-§7 Type bottom
|
||||||
LAUFBAU_TYPE_TOP=§8-§7 Type top
|
LAUFBAU_TYPE_TOP=§8-§7 Type top
|
||||||
|
|
||||||
LAUFBAU_HALF_BOTTOM=§8-§7 Half bottom
|
LAUFBAU_HALF_BOTTOM=§8-§7 Half bottom
|
||||||
LAUFBAU_HALF_TOP=§8-§7 Half top
|
LAUFBAU_HALF_TOP=§8-§7 Half top
|
||||||
|
|
||||||
LAUFBAU_OPEN=§8-§7 Opened
|
LAUFBAU_OPEN=§8-§7 Opened
|
||||||
|
|
||||||
LAUFBAU_ATTACHMENT_CEILING=§8-§7 Attachment Ceiling
|
LAUFBAU_ATTACHMENT_CEILING=§8-§7 Attachment Ceiling
|
||||||
LAUFBAU_ATTACHMENT_FLOOR=§8-§7 Attachment Floor
|
LAUFBAU_ATTACHMENT_FLOOR=§8-§7 Attachment Floor
|
||||||
LAUFBAU_ATTACHMENT_DOUBLE_WALL=§8-§7 Attachment double Wall
|
LAUFBAU_ATTACHMENT_DOUBLE_WALL=§8-§7 Attachment double Wall
|
||||||
LAUFBAU_ATTACHMENT_SINGLE_WALL=§8-§7 Attachment single Wall
|
LAUFBAU_ATTACHMENT_SINGLE_WALL=§8-§7 Attachment single Wall
|
||||||
LAUFBAU_ATTACHMENT_WALL=§8-§7 Attachment Wall
|
LAUFBAU_ATTACHMENT_WALL=§8-§7 Attachment Wall
|
||||||
|
|
||||||
LAUFBAU_CONNECTION_FLOOR=§8-§7 Connection Floor
|
LAUFBAU_CONNECTION_FLOOR=§8-§7 Connection Floor
|
||||||
LAUFBAU_CONNECTION_NORTH=§8-§7 Connection North
|
LAUFBAU_CONNECTION_NORTH=§8-§7 Connection North
|
||||||
LAUFBAU_CONNECTION_SOUTH=§8-§7 Connection South
|
LAUFBAU_CONNECTION_SOUTH=§8-§7 Connection South
|
||||||
@ -976,29 +917,22 @@ LAUFBAU_CONNECTION_EAST = §8-§7 Connection East
|
|||||||
LAUFBAU_CONNECTION_WEST=§8-§7 Connection West
|
LAUFBAU_CONNECTION_WEST=§8-§7 Connection West
|
||||||
LAUFBAU_CONNECTION_DOWN=§8-§7 Connection Bottom
|
LAUFBAU_CONNECTION_DOWN=§8-§7 Connection Bottom
|
||||||
LAUFBAU_CONNECTION_UP=§8-§7 Connection Top
|
LAUFBAU_CONNECTION_UP=§8-§7 Connection Top
|
||||||
|
|
||||||
LAUFBAU_HANGING=§8-§7 hanging
|
LAUFBAU_HANGING=§8-§7 hanging
|
||||||
|
|
||||||
LAUFBAU_SHAPE_STRAIGHT=§8-§7 Shape straight
|
LAUFBAU_SHAPE_STRAIGHT=§8-§7 Shape straight
|
||||||
LAUFBAU_SHAPE_OUTER_LEFT=§8-§7 Shape outer links
|
LAUFBAU_SHAPE_OUTER_LEFT=§8-§7 Shape outer links
|
||||||
LAUFBAU_SHAPE_INNER_LEFT=§8-§7 Shape inner left
|
LAUFBAU_SHAPE_INNER_LEFT=§8-§7 Shape inner left
|
||||||
|
|
||||||
LAUFBAU_TILT_NONE=§8-§7 Tilt none
|
LAUFBAU_TILT_NONE=§8-§7 Tilt none
|
||||||
LAUFBAU_TILT_PARTIAL=§8-§7 Tilt partial
|
LAUFBAU_TILT_PARTIAL=§8-§7 Tilt partial
|
||||||
|
|
||||||
# UTILS
|
# UTILS
|
||||||
SELECT_HELP=§8/§eselect §8[§7RegionsTyp§8] §8- §7Select a region type
|
SELECT_HELP=§8/§eselect §8[§7RegionsTyp§8] §8- §7Select a region type
|
||||||
SELECT_EXTENSION_HELP=§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Select a region type with or without extension
|
SELECT_EXTENSION_HELP=§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Select a region type with or without extension
|
||||||
SELECT_NO_PERMS = §cYou are not allowed to use the slection tool here
|
|
||||||
SELECT_GLOBAL_REGION=§cThe global region cannot be selected
|
SELECT_GLOBAL_REGION=§cThe global region cannot be selected
|
||||||
SELECT_NO_TYPE=§cThis region has no {0}
|
SELECT_NO_TYPE=§cThis region has no {0}
|
||||||
SELECT_NO_EXTENSION=§cThis region has no extension
|
SELECT_NO_EXTENSION=§cThis region has no extension
|
||||||
SELECT_MESSAGE=§7WorldEdit selection set to {0}, {1}, {2} and {3}, {4}, {5}
|
SELECT_MESSAGE=§7WorldEdit selection set to {0}, {1}, {2} and {3}, {4}, {5}
|
||||||
|
|
||||||
SKULL_HELP=§8/§eskull §8[§eplayer§8] §8-§7 Receive a player head
|
SKULL_HELP=§8/§eskull §8[§eplayer§8] §8-§7 Receive a player head
|
||||||
SKULL_INVALID=§cInvalid player name
|
SKULL_INVALID=§cInvalid player name
|
||||||
SKULL_ITEM=§e{0}§8s Head
|
SKULL_ITEM=§e{0}§8s Head
|
||||||
|
|
||||||
SPEED_HELP=§8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Set your flight and walking speed.
|
SPEED_HELP=§8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Set your flight and walking speed.
|
||||||
SPEED_CURRENT=§7Current speed§8: §e{0}
|
SPEED_CURRENT=§7Current speed§8: §e{0}
|
||||||
SPEED_TOO_SMALL=§c{0} is too small
|
SPEED_TOO_SMALL=§c{0} is too small
|
||||||
@ -1006,11 +940,9 @@ SPEED_TOO_HIGH = §c{0} is too big
|
|||||||
SPEED_ITEM=§eSpeed
|
SPEED_ITEM=§eSpeed
|
||||||
SPEED_ITEM_LORE=§7Currently: §e
|
SPEED_ITEM_LORE=§7Currently: §e
|
||||||
SPEED_TAB_NAME=Input speed
|
SPEED_TAB_NAME=Input speed
|
||||||
|
|
||||||
WORLDEDIT_WAND=WorldEdit Wand
|
WORLDEDIT_WAND=WorldEdit Wand
|
||||||
WORLDEDIT_LEFTCLICK=Left click: select pos #1
|
WORLDEDIT_LEFTCLICK=Left click: select pos #1
|
||||||
WORLDEDIT_RIGHTCLICK=Right click: select pos #2
|
WORLDEDIT_RIGHTCLICK=Right click: select pos #2
|
||||||
|
|
||||||
TNT_CLICK_HEADER=§8---=== §eTNT §8===---
|
TNT_CLICK_HEADER=§8---=== §eTNT §8===---
|
||||||
TNT_CLICK_ORDER=§eEntity Order§8: §e{0}
|
TNT_CLICK_ORDER=§eEntity Order§8: §e{0}
|
||||||
TNT_CLICK_FUSE_TIME=§eFuseTime§8: §e{0}
|
TNT_CLICK_FUSE_TIME=§eFuseTime§8: §e{0}
|
||||||
@ -1022,7 +954,6 @@ TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0}
|
|||||||
TNT_CLICK_VELOCITY_Z=§7Velocity §eZ§8: §e{0}
|
TNT_CLICK_VELOCITY_Z=§7Velocity §eZ§8: §e{0}
|
||||||
TNT_CLICK_COUNT=§7Count §8: §e{0}
|
TNT_CLICK_COUNT=§7Count §8: §e{0}
|
||||||
TNT_CLICK_ISOLATE=§eIsolate
|
TNT_CLICK_ISOLATE=§eIsolate
|
||||||
|
|
||||||
SELECT_ITEM_CHOOSE_EXTENSION=Choose extension
|
SELECT_ITEM_CHOOSE_EXTENSION=Choose extension
|
||||||
SELECT_ITEM_CHOOSE_SELECTION=Choose selection
|
SELECT_ITEM_CHOOSE_SELECTION=Choose selection
|
||||||
SELECT_ITEM_NORMAL_EXTENSION=§eNormal
|
SELECT_ITEM_NORMAL_EXTENSION=§eNormal
|
||||||
@ -1033,17 +964,13 @@ SELECT_ITEM_RIGHT_CLICK=§7Right-Click to change
|
|||||||
SELECT_ITEM_BAURAHMEN=§eBuild area
|
SELECT_ITEM_BAURAHMEN=§eBuild area
|
||||||
SELECT_ITEM_BAUPLATTFORM=§eBuild platform
|
SELECT_ITEM_BAUPLATTFORM=§eBuild platform
|
||||||
SELECT_ITEM_TESTBLOCK=§eDummy
|
SELECT_ITEM_TESTBLOCK=§eDummy
|
||||||
|
|
||||||
CHESTFILLER_FILLED=§eChest filled
|
CHESTFILLER_FILLED=§eChest filled
|
||||||
CHESTFILLER_COUNT=§7{0}§8: §e§l{1}
|
CHESTFILLER_COUNT=§7{0}§8: §e§l{1}
|
||||||
|
|
||||||
PISTON_HELP_1=§7Right click on piston with a slime ball to calculate the moved blocks.
|
PISTON_HELP_1=§7Right click on piston with a slime ball to calculate the moved blocks.
|
||||||
PISTON_HELP_2=§7Count is red, if one unmoveable block is present.
|
PISTON_HELP_2=§7Count is red, if one unmoveable block is present.
|
||||||
PISTON_HELP_3=§7Count is yellow, if too many blocks are present.
|
PISTON_HELP_3=§7Count is yellow, if too many blocks are present.
|
||||||
PISTON_INFO=§7Moved Blocks {0}{1}§8/§712
|
PISTON_INFO=§7Moved Blocks {0}{1}§8/§712
|
||||||
|
|
||||||
# Warp
|
# Warp
|
||||||
WARP_DISALLOWED = §cYou are not allowed to use the warp here
|
|
||||||
WARP_LOC_X=§7X§8: §e{0}
|
WARP_LOC_X=§7X§8: §e{0}
|
||||||
WARP_LOC_Y=§7Y§8: §e{0}
|
WARP_LOC_Y=§7Y§8: §e{0}
|
||||||
WARP_LOC_Z=§7Z§8: §e{0}
|
WARP_LOC_Z=§7Z§8: §e{0}
|
||||||
@ -1058,7 +985,7 @@ WARP_GUI_NAME=Warps
|
|||||||
WARP_GUI_NO=§cNo warps exist
|
WARP_GUI_NO=§cNo warps exist
|
||||||
WARP_GUI_DISTANCE=§7Distance: §e{0} §7blocks
|
WARP_GUI_DISTANCE=§7Distance: §e{0} §7blocks
|
||||||
WARP_GUI_LCLICK=§7Left click to teleport
|
WARP_GUI_LCLICK=§7Left click to teleport
|
||||||
WARP_GUI_RCLICK=§7Rickt click to edit
|
WARP_GUI_RCLICK=§7Right click to edit
|
||||||
WARP_INFO_NAME=§7Name: §e{0}
|
WARP_INFO_NAME=§7Name: §e{0}
|
||||||
WARP_HELP_ADD=§8/§ewarp add §8[§7name§8] §8- §7Create a new warp
|
WARP_HELP_ADD=§8/§ewarp add §8[§7name§8] §8- §7Create a new warp
|
||||||
WARP_HELP_TELEPORT=§8/§ewarp §8[§7name§8] §8- §7Teleport to a warp
|
WARP_HELP_TELEPORT=§8/§ewarp §8[§7name§8] §8- §7Teleport to a warp
|
||||||
@ -1066,33 +993,22 @@ WARP_HELP_INFO=§8/§ewarp info §8[§7name§8] §8- §7Information regarding on
|
|||||||
WARP_HELP_DELETE=§8/§ewarp delete §8[§7name§8] §8- §7Delete a warp
|
WARP_HELP_DELETE=§8/§ewarp delete §8[§7name§8] §8- §7Delete a warp
|
||||||
WARP_HELP_GUI=§8/§ewarp gui §8- §7Open the Warp-GUI
|
WARP_HELP_GUI=§8/§ewarp gui §8- §7Open the Warp-GUI
|
||||||
WARP_HELP_LIST=§8/§ewarp list §8- §7List all warps
|
WARP_HELP_LIST=§8/§ewarp list §8- §7List all warps
|
||||||
|
|
||||||
# WORLD
|
# WORLD
|
||||||
STOP_HELP=§8/§estop §8- §7Stops the server
|
STOP_HELP=§8/§estop §8- §7Stops the server
|
||||||
STOP_NO_PERMS = §cYou do not have the permission to stop the server
|
|
||||||
STOP_MESSAGE=§eServer is stopping
|
STOP_MESSAGE=§eServer is stopping
|
||||||
WORLD_EDIT_NO_PERMS = §cYou do not have the permission to use WorldEdit
|
|
||||||
|
|
||||||
KICKALL_HELP=§8/§ekickall §8- §7Kick all players from the server except the owner
|
KICKALL_HELP=§8/§ekickall §8- §7Kick all players from the server except the owner
|
||||||
KICKALL_NO_PERM = §cThis is not your world!
|
|
||||||
|
|
||||||
# Techhider
|
# Techhider
|
||||||
TECHHIDER_HELP=§8/§etechhider §8- §7Toggle Techhider
|
TECHHIDER_HELP=§8/§etechhider §8- §7Toggle Techhider
|
||||||
TECHHIDER_GLOBAL=§cNo techhider in global region
|
TECHHIDER_GLOBAL=§cNo techhider in global region
|
||||||
TECHHIDER_ON=§aTechhider activated
|
TECHHIDER_ON=§aTechhider activated
|
||||||
TECHHIDER_OFF=§cTechhider deactivated
|
TECHHIDER_OFF=§cTechhider deactivated
|
||||||
|
|
||||||
# XRAY
|
# XRAY
|
||||||
XRAY_HELP=§8/§exray §8- §7Toggle Xray
|
XRAY_HELP=§8/§exray §8- §7Toggle Xray
|
||||||
XRAY_GLOBAL=§cNo xray in global region
|
XRAY_GLOBAL=§cNo xray in global region
|
||||||
XRAY_ON=§aXray activated
|
XRAY_ON=§aXray activated
|
||||||
XRAY_OFF=§cXray deactivated
|
XRAY_OFF=§cXray deactivated
|
||||||
|
|
||||||
|
|
||||||
# WorldEdit
|
# WorldEdit
|
||||||
COLORREPLACE_HELP=§8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Replace all blocks of one color with another
|
COLORREPLACE_HELP=§8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Replace all blocks of one color with another
|
||||||
|
TYPEREPLACE_HELP=§8//§etypereplace §8[§7type§8] §8[§7type§8] §8- §7Replace all blocks of one type with another
|
||||||
TYPEREPLACE_HELP = §8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Replace all blocks of one type with another
|
|
||||||
|
|
||||||
# Schematic
|
# Schematic
|
||||||
SCHEMATIC_GUI_ITEM=§eSchematics
|
SCHEMATIC_GUI_ITEM=§eSchematics
|
||||||
|
@ -16,17 +16,17 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
PREFIX=§eBau§8System§8»
|
PREFIX=§eBau§8System§8»
|
||||||
TIME=HH:mm:ss
|
TIME=HH:mm:ss
|
||||||
DATE=........
|
DATE=........
|
||||||
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
|
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
|
||||||
ONLY_SCHEMS=§cDu kannst hier keinen Ordner angeben
|
ONLY_SCHEMS=§cDu kannst hier keinen Ordner angeben
|
||||||
|
|
||||||
PAGE_LIST=§e Seite ({0}/{1}) »»
|
PAGE_LIST=§e Seite ({0}/{1}) »»
|
||||||
LIST_PREVIOUS_PAGE=§eVorherige Seite
|
LIST_PREVIOUS_PAGE=§eVorherige Seite
|
||||||
LIST_NEXT_PAGE=§eNächste Seite
|
LIST_NEXT_PAGE=§eNächste Seite
|
||||||
|
# Permission
|
||||||
|
NO_PERMISSION=Du darfst dies hier nicht nutzen
|
||||||
|
SPECTATOR=§fZuschauer
|
||||||
# Scoreboard
|
# Scoreboard
|
||||||
SCOREBOARD_TIME=Uhrzeit
|
SCOREBOARD_TIME=Uhrzeit
|
||||||
SCOREBOARD_REGION=Region
|
SCOREBOARD_REGION=Region
|
||||||
@ -34,12 +34,13 @@ SCOREBOARD_TRACE = Trace
|
|||||||
SCOREBOARD_LOADER=Loader
|
SCOREBOARD_LOADER=Loader
|
||||||
SCOREBOARD_TPS=TPS
|
SCOREBOARD_TPS=TPS
|
||||||
SCOREBOARD_TPS_FROZEN=§eEingefroren
|
SCOREBOARD_TPS_FROZEN=§eEingefroren
|
||||||
|
|
||||||
SCOREBOARD_TRACE_TICKS=Ticks
|
SCOREBOARD_TRACE_TICKS=Ticks
|
||||||
|
|
||||||
SCOREBOARD_TECHHIDER=TechHider§8: §aAn
|
SCOREBOARD_TECHHIDER=TechHider§8: §aAn
|
||||||
SCOREBOARD_XRAY=XRay§8: §aAn
|
SCOREBOARD_XRAY=XRay§8: §aAn
|
||||||
|
SCOREBOARD_LOCK_TEAM=Bau Lock§8: §eTeam
|
||||||
|
SCOREBOARD_LOCK_TEAM_AND_SERVERTEAM=Bau Lock§8: §e(Server-) Team
|
||||||
|
SCOREBOARD_LOCK_SERVERTEAM=Bau Lock§8: §eServerteam
|
||||||
|
SCOREBOARD_LOCK_NOBODY=Bau Lock§8: §cNiemand
|
||||||
# Flags
|
# Flags
|
||||||
FLAG_COLOR=Color
|
FLAG_COLOR=Color
|
||||||
FLAG_TNT=TNT
|
FLAG_TNT=TNT
|
||||||
@ -47,23 +48,18 @@ FLAG_FIRE = Fire
|
|||||||
FLAG_FREEZE=Freeze
|
FLAG_FREEZE=Freeze
|
||||||
FLAG_PROTECT=Protect
|
FLAG_PROTECT=Protect
|
||||||
FLAG_ITEMS=Items
|
FLAG_ITEMS=Items
|
||||||
|
|
||||||
FLAG_FIRE_ALLOW=§can
|
FLAG_FIRE_ALLOW=§can
|
||||||
FLAG_FIRE_DENY=§aaus
|
FLAG_FIRE_DENY=§aaus
|
||||||
|
|
||||||
FLAG_FREEZE_ACTIVE=§aan
|
FLAG_FREEZE_ACTIVE=§aan
|
||||||
FLAG_FREEZE_INACTIVE=§caus
|
FLAG_FREEZE_INACTIVE=§caus
|
||||||
|
|
||||||
FLAG_PROTECT_ACTIVE=§aan
|
FLAG_PROTECT_ACTIVE=§aan
|
||||||
FLAG_PROTECT_INACTIVE=§caus
|
FLAG_PROTECT_INACTIVE=§caus
|
||||||
|
|
||||||
FLAG_TNT_ALLOW=§aan
|
FLAG_TNT_ALLOW=§aan
|
||||||
FLAG_TNT_DENY=§caus
|
FLAG_TNT_DENY=§caus
|
||||||
FLAG_TNT_ONLY_TB=§7Kein §eBaurahmen
|
FLAG_TNT_ONLY_TB=§7Kein §eBaurahmen
|
||||||
|
FLAG_TNT_ONLY_BUILD=§7Kein §eTestblock
|
||||||
FLAG_ITEMS_ACTIVE=§aan
|
FLAG_ITEMS_ACTIVE=§aan
|
||||||
FLAG_ITEMS_INACTIVE=§caus
|
FLAG_ITEMS_INACTIVE=§caus
|
||||||
|
|
||||||
FLAG_COLOR_WHITE=§fWeiß
|
FLAG_COLOR_WHITE=§fWeiß
|
||||||
FLAG_COLOR_ORANGE=§6Orange
|
FLAG_COLOR_ORANGE=§6Orange
|
||||||
FLAG_COLOR_MAGENTA=§dMagenta
|
FLAG_COLOR_MAGENTA=§dMagenta
|
||||||
@ -82,21 +78,17 @@ FLAG_COLOR_BROWN = §eBraun
|
|||||||
FLAG_COLOR_GREEN=§2Grün
|
FLAG_COLOR_GREEN=§2Grün
|
||||||
FLAG_COLOR_RED=§cRot
|
FLAG_COLOR_RED=§cRot
|
||||||
FLAG_COLOR_BLACK=§0Schwarz
|
FLAG_COLOR_BLACK=§0Schwarz
|
||||||
|
|
||||||
# Region
|
# Region
|
||||||
REGION_TYPE_NORMAL=Normal
|
REGION_TYPE_NORMAL=Normal
|
||||||
REGION_TYPE_BUILD=Baubereich
|
REGION_TYPE_BUILD=Baubereich
|
||||||
REGION_TYPE_ONLY_TB=Testblock
|
REGION_TYPE_ONLY_TB=Testblock
|
||||||
|
|
||||||
# AttributesCopy
|
# AttributesCopy
|
||||||
ATTRIBUTES_CANT_COPY=§cDu musst den Item Type in der Hand halten wo du auch drauf guckst.
|
ATTRIBUTES_CANT_COPY=§cDu musst den Item Type in der Hand halten wo du auch drauf guckst.
|
||||||
ATTRIBUTES_NO_COPY=§cKeine Attribute kopiert.
|
ATTRIBUTES_NO_COPY=§cKeine Attribute kopiert.
|
||||||
ATTRIBUTES_COPIED=§eAttribute kopiert.
|
ATTRIBUTES_COPIED=§eAttribute kopiert.
|
||||||
|
|
||||||
ATTRIBUTE_REMOVE_ALL=§eAlle Attribute entfernt.
|
ATTRIBUTE_REMOVE_ALL=§eAlle Attribute entfernt.
|
||||||
ATTRIBUTE_REMOVE_SINGLE=§eAttribut §7{0}§e entfernt.
|
ATTRIBUTE_REMOVE_SINGLE=§eAttribut §7{0}§e entfernt.
|
||||||
ATTRIBUTE_REMOVE_NOT_FOUND=§cAttribut nicht gefunden
|
ATTRIBUTE_REMOVE_NOT_FOUND=§cAttribut nicht gefunden
|
||||||
|
|
||||||
# AutoStart
|
# AutoStart
|
||||||
AUTOSTART_COMMAND_HELP=§8/§etimer §8- §7Legt den AutostartTimer ins Inventar
|
AUTOSTART_COMMAND_HELP=§8/§etimer §8- §7Legt den AutostartTimer ins Inventar
|
||||||
AUTOSTART_ITEM_NAME=§eAutostartTimer
|
AUTOSTART_ITEM_NAME=§eAutostartTimer
|
||||||
@ -104,17 +96,15 @@ AUTOSTART_ITEM_LORE = §eRechtsklick Block §8- §7Starte den Timer
|
|||||||
AUTOSTART_MESSAGE_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
AUTOSTART_MESSAGE_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
||||||
AUTOSTART_MESSAGE_RESET=§eDer AutostartTimer wurde zurückgesetzt
|
AUTOSTART_MESSAGE_RESET=§eDer AutostartTimer wurde zurückgesetzt
|
||||||
AUTOSTART_MESSAGE_START=§eAutostartTimer gestartet
|
AUTOSTART_MESSAGE_START=§eAutostartTimer gestartet
|
||||||
AUTOSTART_MESSAGE_RESULT1 = §eZeit §7bis zur §eExplosion §7am Gegner§8:§e {0}
|
AUTOSTART_MESSAGE_RESULT1=§eZeit §7bis zur §eExplosion §7am Gegner§8:§e {0}§7 in game ticks
|
||||||
AUTOSTART_MESSAGE_RESULT2 = §eZeitdifferenz in ticks §7bis {0} Sekunden§8:§e {1}
|
AUTOSTART_MESSAGE_RESULT2=§7Zeitdifferenz in §egame ticks §7bis {0} Sekunden§8:§e {1}
|
||||||
AUTOSTART_MESSAGE_RESULT3=§7Positiv, wenn zu wenig, negativ wenn zu viel
|
AUTOSTART_MESSAGE_RESULT3=§7Positiv, wenn zu wenig, negativ wenn zu viel
|
||||||
|
|
||||||
# Backup
|
# Backup
|
||||||
BACKUP_HELP_CREATE=§8/§ebackup create §8- §7Erstelle ein Backup der Region
|
BACKUP_HELP_CREATE=§8/§ebackup create §8- §7Erstelle ein Backup der Region
|
||||||
BACKUP_HELP_LOAD=§8/§ebackup load §8[§7BackupName§8] §8- §7 Lade ein Backup
|
BACKUP_HELP_LOAD=§8/§ebackup load §8[§7BackupName§8] §8- §7 Lade ein Backup
|
||||||
BACKUP_HELP_LIST=§8/§ebackup list §8- §7Liste alle Backups der Region auf
|
BACKUP_HELP_LIST=§8/§ebackup list §8- §7Liste alle Backups der Region auf
|
||||||
BACKUP_HELP_GUI=§8/§ebackup gui §8- §7Öffne die Backups in einer GUI
|
BACKUP_HELP_GUI=§8/§ebackup gui §8- §7Öffne die Backups in einer GUI
|
||||||
BACKUP_REGION_NO_REGION=§cDu bist in keiner Region
|
BACKUP_REGION_NO_REGION=§cDu bist in keiner Region
|
||||||
BACKUP_NO_PERMS=§cDu darfst hier nicht das Backup System verwenden
|
|
||||||
BACKUP_CREATE_SUCCESS=§7Das Backup wurde erstellt
|
BACKUP_CREATE_SUCCESS=§7Das Backup wurde erstellt
|
||||||
BACKUP_CREATE_FAILURE=§cDas Backup erstellen ist schiefgegangen
|
BACKUP_CREATE_FAILURE=§cDas Backup erstellen ist schiefgegangen
|
||||||
BACKUP_CREATE_NO_CHANGE=§7Die Region hat keine Veränderung
|
BACKUP_CREATE_NO_CHANGE=§7Die Region hat keine Veränderung
|
||||||
@ -125,15 +115,8 @@ BACKUP_LOAD=§7Backup geladen
|
|||||||
BACKUP_INV_NAME=§eBackup
|
BACKUP_INV_NAME=§eBackup
|
||||||
BACKUP_ITEM_NAME=§eBackup §7von §e{0}
|
BACKUP_ITEM_NAME=§eBackup §7von §e{0}
|
||||||
BACKUP_LORE=§eKlicken zum Laden
|
BACKUP_LORE=§eKlicken zum Laden
|
||||||
|
|
||||||
# Bau
|
# Bau
|
||||||
BAU_COMMAND_HELP_INFO=§8/§ebau info §8- §7Alias für §8/§ebauinfo
|
BAU_COMMAND_HELP_INFO=§8/§ebau info §8- §7Alias für §8/§ebauinfo
|
||||||
BAU_COMMAND_HELP_TOGGLEWE = §8/§ebau togglewe §8[§7Player§8] §8- §7Editiere die WorldEdit Rechte eines Spielers
|
|
||||||
BAU_COMMAND_HELP_TOGGLEWORLD = §8/§ebau toggleworld §8[§7Player§8] §8- §7Editiere die Welt Rechte eines Spielers
|
|
||||||
BAU_UNKNOWN_PLAYER = §cUnbekannter Spieler
|
|
||||||
BAU_NO_PLAYER = §cDer Spieler ist kein Mitglied deiner Welt!
|
|
||||||
BAU_NO_WORLD = §cDies ist nicht deine Welt!
|
|
||||||
|
|
||||||
BAU_INFO_ITEM_NAME=§eBau-Management
|
BAU_INFO_ITEM_NAME=§eBau-Management
|
||||||
## This is used in BauInfoBauGuiItem.java
|
## This is used in BauInfoBauGuiItem.java
|
||||||
BAU_INFO_ITEM_LORE_TNT=§7TNT§8: §e{0}
|
BAU_INFO_ITEM_LORE_TNT=§7TNT§8: §e{0}
|
||||||
@ -142,18 +125,11 @@ BAU_INFO_ITEM_LORE_DAMAGE = §7Damage§8: §e{0}
|
|||||||
BAU_INFO_ITEM_LORE_FIRE=§7Feuer§8: §e{0}
|
BAU_INFO_ITEM_LORE_FIRE=§7Feuer§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_COLOR=§7Farbe§8: §e{0}
|
BAU_INFO_ITEM_LORE_COLOR=§7Farbe§8: §e{0}
|
||||||
BAU_INFO_ITEM_LORE_PROTECT=§7Protect§8: §e{0}
|
BAU_INFO_ITEM_LORE_PROTECT=§7Protect§8: §e{0}
|
||||||
|
|
||||||
BAU_INFO_COMMAND_HELP=§8/§ebauinfo §8- §7Gibt Informationen über den Bau
|
BAU_INFO_COMMAND_HELP=§8/§ebauinfo §8- §7Gibt Informationen über den Bau
|
||||||
BAU_INFO_COMMAND_OWNER = §7Besitzer: §e{0}
|
BAU_INFO_COMMAND_OWNER=§7Besitzer§8: §e{0}
|
||||||
BAU_INFO_COMMAND_MEMBER = §7Mitglieder: §e
|
BAU_INFO_COMMAND_MEMBER=§7{0} §8[§7{1}§8]§8: §e{2}
|
||||||
BAU_INFO_MEMBER_INFO = §e{0}§8[{1}§8,{2}§8] §8
|
BAU_INFO_COMMAND_FLAG=§7{0}§8: §7{1}
|
||||||
BAU_INFO_MEMBER_WE_ALLOW = §aWE
|
BAU_INFO_COMMAND_TPS=§7TPS§8:§e
|
||||||
BAU_INFO_MEMBER_WE_DISALLOW = §cWE
|
|
||||||
BAU_INFO_MEMBER_WORLD_ALLOW = §aW
|
|
||||||
BAU_INFO_MEMBER_WORLD_DISALLOW = §cW
|
|
||||||
BAU_INFO_COMMAND_FLAG = §e{0} §8: §7{1}
|
|
||||||
BAU_INFO_COMMAND_TPS = TPS:§e
|
|
||||||
|
|
||||||
# Countingwand
|
# Countingwand
|
||||||
COUNTINGWAND_COMMAND_HELP=§8/§ecountingwand §8- §7Gibt dir ein CountingWand
|
COUNTINGWAND_COMMAND_HELP=§8/§ecountingwand §8- §7Gibt dir ein CountingWand
|
||||||
COUNTINGWAND_ITEM_NAME=§eZollstock
|
COUNTINGWAND_ITEM_NAME=§eZollstock
|
||||||
@ -163,13 +139,11 @@ COUNTINGWAND_MESSAGE_RCLICK = §7Erste Position bei: §8[§7{0}§8, §7{1}§8,
|
|||||||
COUNTINGWAND_MESSAGE_LCLICK=§7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) ({4}§8)
|
COUNTINGWAND_MESSAGE_LCLICK=§7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) ({4}§8)
|
||||||
COUNTINGWAND_MESSAGE_VOLUME=§e{0}
|
COUNTINGWAND_MESSAGE_VOLUME=§e{0}
|
||||||
COUNTINGWAND_MESSAGE_DIMENSION=§e{0}§8, §e{1}§8, §e{2}
|
COUNTINGWAND_MESSAGE_DIMENSION=§e{0}§8, §e{1}§8, §e{2}
|
||||||
|
|
||||||
# Design Endstone
|
# Design Endstone
|
||||||
DESIGN_ENDSTONE_COMMAND_HELP = §8/§edesign endstone §8- §7Zeige wo Endstone ist
|
DESIGN_ENDSTONE_COMMAND_HELP=§8/§edesign endstone §8- §7Zeige End Stone im Design
|
||||||
DESIGN_ENDSTONE_REGION_ERROR=§cDiese Region hat keinen Baubereich
|
DESIGN_ENDSTONE_REGION_ERROR=§cDiese Region hat keinen Baubereich
|
||||||
DESIGN_ENDSTONE_ENABLE = §aEndstone ist aktiviert
|
DESIGN_ENDSTONE_ENABLE=§aEndstone im Design ist angezeigt
|
||||||
DESIGN_ENDSTONE_DISABLE = §cEndstone ist deaktiviert
|
DESIGN_ENDSTONE_DISABLE=§cEndstone im Design ist versteckt
|
||||||
|
|
||||||
# Detonator
|
# Detonator
|
||||||
DETONATOR_LOC_REMOVE=§e{0} entfernt
|
DETONATOR_LOC_REMOVE=§e{0} entfernt
|
||||||
DETONATOR_LOC_ADD=§e{0} hinzugefügt
|
DETONATOR_LOC_ADD=§e{0} hinzugefügt
|
||||||
@ -209,11 +183,6 @@ HOTBAR_INVENTORY=Standard Hotbar
|
|||||||
# GUI
|
# GUI
|
||||||
GUI_EDITOR_ITEM_NAME=§eGui Editor
|
GUI_EDITOR_ITEM_NAME=§eGui Editor
|
||||||
GUI_NAME=Bau GUI
|
GUI_NAME=Bau GUI
|
||||||
GUI_NO_PERMISSION=§cDu hast nicht genug Rechte um dies zu tun
|
|
||||||
GUI_NO_OWNER=§cDas ist nicht deine Bauwelt
|
|
||||||
GUI_NO_WORLD=§cDu darfst hier die Welt nicht einstellen
|
|
||||||
GUI_NO_WORLDEDIT=§cDu darfst hier kein Worldedit benutzen
|
|
||||||
GUI_NO_MEMBER=§cDu musst ein Member der Bauwelt sein
|
|
||||||
GUI_ITEM_LORE1=§7Du kannst dieses Item zum Öffnen der BauGUI nutzen
|
GUI_ITEM_LORE1=§7Du kannst dieses Item zum Öffnen der BauGUI nutzen
|
||||||
GUI_ITEM_LORE2=§7oder Doppel F (Swap hands) drücken.
|
GUI_ITEM_LORE2=§7oder Doppel F (Swap hands) drücken.
|
||||||
GUI_EDITOR_TITLE=Bau GUI Editor
|
GUI_EDITOR_TITLE=Bau GUI Editor
|
||||||
@ -224,14 +193,12 @@ GUI_EDITOR_ITEM_TRASH_LORE=§7Item hier rein Legen
|
|||||||
GUI_EDITOR_ITEM_MORE=§eMehr Items
|
GUI_EDITOR_ITEM_MORE=§eMehr Items
|
||||||
GUI_EDITOR_ITEM_CLOSE=§eSchließen
|
GUI_EDITOR_ITEM_CLOSE=§eSchließen
|
||||||
GUI_EDITOR_TITLE_MORE=Item auswählen
|
GUI_EDITOR_TITLE_MORE=Item auswählen
|
||||||
|
|
||||||
# Script
|
# Script
|
||||||
## CustomScript
|
## CustomScript
|
||||||
SCRIPT_HOTKEY_ITEM_NAME=§7Hotkey§8: §e{0}
|
SCRIPT_HOTKEY_ITEM_NAME=§7Hotkey§8: §e{0}
|
||||||
SCRIPT_EVENT_ITEM_NAME=§7Event§8: §e{0}
|
SCRIPT_EVENT_ITEM_NAME=§7Event§8: §e{0}
|
||||||
SCRIPT_COMMAND_ITEM_NAME=§7Befehl§8: §e/{0}
|
SCRIPT_COMMAND_ITEM_NAME=§7Befehl§8: §e/{0}
|
||||||
SCRIPT_ERROR_ONLY_IN_GLOBAL=§cDieses Skript kann nur als globales Skript ausgeführt werden
|
SCRIPT_ERROR_ONLY_IN_GLOBAL=§cDieses Skript kann nur als globales Skript ausgeführt werden
|
||||||
|
|
||||||
## Script Menu GUI
|
## Script Menu GUI
|
||||||
SCRIPT_MENU_GUI_ITEM_LORE_1=§7Klicke zum rausnehmen
|
SCRIPT_MENU_GUI_ITEM_LORE_1=§7Klicke zum rausnehmen
|
||||||
SCRIPT_MENU_GUI_ITEM_LORE_2=§7Shiftklick zum kopieren
|
SCRIPT_MENU_GUI_ITEM_LORE_2=§7Shiftklick zum kopieren
|
||||||
@ -240,7 +207,7 @@ SCRIPT_MENU_GUI_ITEM_LORE_4 = §7Mittelklick zum anschauen
|
|||||||
SCRIPT_MENU_GUI_NAME=§eSkript-Menü
|
SCRIPT_MENU_GUI_NAME=§eSkript-Menü
|
||||||
SCRIPT_MENU_GUI_ITEM_ADD_NAME=§eHinzufügen
|
SCRIPT_MENU_GUI_ITEM_ADD_NAME=§eHinzufügen
|
||||||
SCRIPT_MENU_GUI_ITEM_ADD_LORE=§7Klicke mit einem Buch zum hinzufügen
|
SCRIPT_MENU_GUI_ITEM_ADD_LORE=§7Klicke mit einem Buch zum hinzufügen
|
||||||
|
SCRIPT_DEPRECATED=§cDie Funktion §e{0}§c ist veraltet und wird demnächst entfernt. Bitte benutze §e{1}§c.
|
||||||
# Shield Printing
|
# Shield Printing
|
||||||
SHIELD_PRINTING_HELP_START=§8/§eshieldprinting start §8- §7Starte das Schild drucken
|
SHIELD_PRINTING_HELP_START=§8/§eshieldprinting start §8- §7Starte das Schild drucken
|
||||||
SHIELD_PRINTING_HELP_COPY=§8/§eshieldprinting copy §8- §7Kopiert die Schilder
|
SHIELD_PRINTING_HELP_COPY=§8/§eshieldprinting copy §8- §7Kopiert die Schilder
|
||||||
@ -253,21 +220,33 @@ SHIELD_PRINTING_HELP_STEP_4 = §84. §7Editiere die Schilde wenn nötig
|
|||||||
SHIELD_PRINTING_HELP_STEP_5=§85. §7Kopiere das gedruckte mit §8/§eshieldprinting copy
|
SHIELD_PRINTING_HELP_STEP_5=§85. §7Kopiere das gedruckte mit §8/§eshieldprinting copy
|
||||||
SHIELD_PRINTING_HELP_STEP_6=§86. §7Füge die originale Schematic wieder ein
|
SHIELD_PRINTING_HELP_STEP_6=§86. §7Füge die originale Schematic wieder ein
|
||||||
SHIELD_PRINTING_HELP_STEP_7=§87. §7Wende das gedruckte mit §8/§eshieldprinting apply§7 an
|
SHIELD_PRINTING_HELP_STEP_7=§87. §7Wende das gedruckte mit §8/§eshieldprinting apply§7 an
|
||||||
|
|
||||||
SHIELD_PRINTING_NO_REGION=§cDu bist in keiner Region.
|
SHIELD_PRINTING_NO_REGION=§cDu bist in keiner Region.
|
||||||
SHIELD_PRINTING_NOT_RUNNING=§cShield printing ist nicht aktiv.
|
SHIELD_PRINTING_NOT_RUNNING=§cShield printing ist nicht aktiv.
|
||||||
SHIELD_PRINTING_DISALLOWED = §cDu darfst Shield printing nicht benutzen.
|
|
||||||
SHIELD_PRINTING_BOSSBAR=§fBewegungen: {0}
|
SHIELD_PRINTING_BOSSBAR=§fBewegungen: {0}
|
||||||
SHIELD_PRINTING_BOSSBAR_COPIED=§fBewegungen: {0} Kopiert: {1}
|
SHIELD_PRINTING_BOSSBAR_COPIED=§fBewegungen: {0} Kopiert: {1}
|
||||||
|
SHIELD_PRINTING_GUI_NAME=§7Schild Drucken
|
||||||
|
SHIELD_PRINTING_GUI_APPLY=§aAnwenden
|
||||||
|
SHIELD_PRINTING_GUI_STATE_PREVIOUS=§7R-Click§8: §7Vorherige
|
||||||
|
SHIELD_PRINTING_GUI_STATE_NEXT=§7L-Click§8: §7Nächste
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ACTIVE=§e> §7{0}
|
||||||
|
SHIELD_PRINTING_GUI_STATE_INACTIVE=§8> §7{0}
|
||||||
|
SHIELD_PRINTING_GUI_STATE_FROM_ORIGINAL=Original
|
||||||
|
SHIELD_PRINTING_GUI_STATE_FROM_COPY=Kopie
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_ON=An
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_OFF=Aus
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_OPEN=Offen
|
||||||
|
SHIELD_PRINTING_GUI_STATE_ALWAYS_CLOSED=Geschlossen
|
||||||
|
SHIELD_PRINTING_GUI_STATE_FENCE=§7{0} §fZaun Verbindungen
|
||||||
|
SHIELD_PRINTING_GUI_STATE_OPENABLE=§7{0} §fGeöffnet
|
||||||
|
SHIELD_PRINTING_GUI_STATE_PISTON=§7{0} §fAusgefahren
|
||||||
|
SHIELD_PRINTING_GUI_STATE_POWERABLE=§7{0} §fAktiviert
|
||||||
|
SHIELD_PRINTING_GUI_STATE_WALL=§7{0} §fWand Verbindungen
|
||||||
SHIELD_PRINTING_START=§aShield printing wurde gestartet.
|
SHIELD_PRINTING_START=§aShield printing wurde gestartet.
|
||||||
SHIELD_PRINTING_COPY=§aSchilde wurden kopiert.
|
SHIELD_PRINTING_COPY=§aSchilde wurden kopiert.
|
||||||
SHIELD_PRINTING_APPLY=§aSchilde wurden angewendet.
|
SHIELD_PRINTING_APPLY=§aSchilde wurden angewendet.
|
||||||
SHIELD_PRINTING_STOP=§aShield printing wurde gestoppt.
|
SHIELD_PRINTING_STOP=§aShield printing wurde gestoppt.
|
||||||
|
|
||||||
# Unsign Book
|
# Unsign Book
|
||||||
UNSIGN_HELP=§8/§eunsign §8- §7Mache ein Buch beschreibbar
|
UNSIGN_HELP=§8/§eunsign §8- §7Mache ein Buch beschreibbar
|
||||||
|
|
||||||
# Simulator
|
# Simulator
|
||||||
SIMULATOR_HELP=§8/§esimulator §8-§7 Legt dir den Simulatorstab ins Inventar
|
SIMULATOR_HELP=§8/§esimulator §8-§7 Legt dir den Simulatorstab ins Inventar
|
||||||
SIMULATOR_CREATE_HELP=§8/§esimulator create §8[§7name§8] §8-§7 Erstelle einen neuen Simulator
|
SIMULATOR_CREATE_HELP=§8/§esimulator create §8[§7name§8] §8-§7 Erstelle einen neuen Simulator
|
||||||
@ -275,35 +254,29 @@ SIMULATOR_CHANGE_HELP = §8/§esimulator change §8-§7 Wechsel zu einem anderen
|
|||||||
SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Löscht den Simulator
|
SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Löscht den Simulator
|
||||||
SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation
|
SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation
|
||||||
SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Kopiert einen Simulator
|
SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Kopiert einen Simulator
|
||||||
SIMULATOR_NO_PERMS = §cDu darfst hier nicht den Simulator nutzen
|
|
||||||
|
|
||||||
SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator
|
SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator
|
||||||
|
|
||||||
SIMULATOR_NO_SIM_IN_HAND=§cKein Simulator Item gewählt
|
SIMULATOR_NO_SIM_IN_HAND=§cKein Simulator Item gewählt
|
||||||
SIMULATOR_GUI_SELECT_SIM=Simulator wählen
|
SIMULATOR_GUI_SELECT_SIM=Simulator wählen
|
||||||
SIMULATOR_GUI_CREATE_SIM=§eSimulator erstellen
|
SIMULATOR_GUI_CREATE_SIM=§eSimulator erstellen
|
||||||
SIMULATOR_GUI_CREATE_SIM_GUI=Simulator erstellen
|
SIMULATOR_GUI_CREATE_SIM_GUI=Simulator erstellen
|
||||||
SIMULATOR_NAME_ALREADY_EXISTS=§cSimulator existiert bereits
|
SIMULATOR_NAME_ALREADY_EXISTS=§cSimulator existiert bereits
|
||||||
SIMULATOR_NAME_INVALID=§cUngültiger Name
|
SIMULATOR_NAME_INVALID=§cUngültiger Name
|
||||||
|
SIMULATOR_ERROR_COPY=§cFehler beim kopieren
|
||||||
SIMULATOR_NOT_EXISTS=§cSimulator existiert nicht
|
SIMULATOR_NOT_EXISTS=§cSimulator existiert nicht
|
||||||
SIMULATOR_CREATE=§aSimulator erstellt
|
SIMULATOR_CREATE=§aSimulator erstellt
|
||||||
SIMULATOR_EDIT_LOCATION=§7Editiere Positionen
|
SIMULATOR_EDIT_LOCATION=§7Editiere Positionen
|
||||||
SIMULATOR_EDIT_PROPERTIES=§7Editiere Eigenschaften
|
SIMULATOR_EDIT_PROPERTIES=§7Editiere Eigenschaften
|
||||||
SIMULATOR_EDIT_OTHER=§7Editiere Andere
|
SIMULATOR_EDIT_OTHER=§7Editiere Andere
|
||||||
SIMULATOR_EDIT_GROUP=§7Editiere Gruppe
|
SIMULATOR_EDIT_GROUP=§7Editiere Gruppe
|
||||||
|
|
||||||
SIMULATOR_EDIT_GROUP_MENU=§eEditiere Gruppe
|
SIMULATOR_EDIT_GROUP_MENU=§eEditiere Gruppe
|
||||||
|
|
||||||
SIMULATOR_WAND_NAME=§eKanonensimulator
|
SIMULATOR_WAND_NAME=§eKanonensimulator
|
||||||
SIMULATOR_WAND_NAME_SELECTED=§7Kanonensimulator §8- §e{0}
|
SIMULATOR_WAND_NAME_SELECTED=§7Kanonensimulator §8- §e{0}
|
||||||
SIMULATOR_WAND_LORE_1=§eRechtsklick §8- §7Füge eine Position hinzu
|
SIMULATOR_WAND_LORE_1=§eRechtsklick §8- §7Füge eine Position hinzu
|
||||||
SIMULATOR_WAND_LORE_2=§eSneaken §8- §7Freie Bewegung
|
SIMULATOR_WAND_LORE_2=§eSneaken §8- §7Freie Bewegung
|
||||||
SIMULATOR_WAND_LORE_3=§eLinksklick §8- §7Starte die Simulation
|
SIMULATOR_WAND_LORE_3=§eLinksklick §8- §7Starte die Simulation
|
||||||
SIMULATOR_WAND_LORE_4=§eRechtsklick Luft §8- §7Öffne die GUI
|
SIMULATOR_WAND_LORE_4=§eRechtsklick Luft §8- §7Öffne die GUI
|
||||||
SIMULATOR_WAND_LORE_5 = §eOffhand §8- §7Simulator Vorschau
|
SIMULATOR_WAND_LORE_5=§eDoppel Shift §8- §7Wechsel zwischen TNT und Redstone Block
|
||||||
|
|
||||||
SIMULATOR_REGION_FROZEN=§cSimulator kann nicht in eingefrorenen Regionen genutzt werden
|
SIMULATOR_REGION_FROZEN=§cSimulator kann nicht in eingefrorenen Regionen genutzt werden
|
||||||
|
|
||||||
## Other
|
## Other
|
||||||
SIMULATOR_PLUS_ONE=§7+1
|
SIMULATOR_PLUS_ONE=§7+1
|
||||||
SIMULATOR_PLUS_PIXEL_SHIFT=§eShift §7Click für §e+0,0625
|
SIMULATOR_PLUS_PIXEL_SHIFT=§eShift §7Click für §e+0,0625
|
||||||
@ -315,11 +288,8 @@ SIMULATOR_POSITION_X = §7x-Position
|
|||||||
SIMULATOR_POSITION_Y=§7y-Position
|
SIMULATOR_POSITION_Y=§7y-Position
|
||||||
SIMULATOR_POSITION_Z=§7z-Position
|
SIMULATOR_POSITION_Z=§7z-Position
|
||||||
SIMULATOR_BACK=§eZurück
|
SIMULATOR_BACK=§eZurück
|
||||||
|
|
||||||
SIMULATOR_GUI_TOTAL_TNT=§7Gesamt TNT§8: §e{0}
|
SIMULATOR_GUI_TOTAL_TNT=§7Gesamt TNT§8: §e{0}
|
||||||
|
|
||||||
SIMULATOR_DELETED=§cSimulator gelöscht
|
SIMULATOR_DELETED=§cSimulator gelöscht
|
||||||
|
|
||||||
## GUI
|
## GUI
|
||||||
SIMULATOR_POSITION_EDIT=§ePosition bearbeiten
|
SIMULATOR_POSITION_EDIT=§ePosition bearbeiten
|
||||||
SIMULATOR_POSITION_ADD=§ePosition setzen
|
SIMULATOR_POSITION_ADD=§ePosition setzen
|
||||||
@ -333,15 +303,12 @@ SIMULATOR_GUI_NAME = Kanonensimulator
|
|||||||
SIMULATOR_GUI_DELETE=§cTNT löschen
|
SIMULATOR_GUI_DELETE=§cTNT löschen
|
||||||
SIMULATOR_GUI_AUTO_TRACE=§eAutoTrace§8: §7{0}
|
SIMULATOR_GUI_AUTO_TRACE=§eAutoTrace§8: §7{0}
|
||||||
SIMULATOR_GUI_MOVE_ALL=§eAlle Verschieben
|
SIMULATOR_GUI_MOVE_ALL=§eAlle Verschieben
|
||||||
|
|
||||||
SIMULATOR_ALIGNMENT_CENTER=§7Verschiebung§8: §eMitte
|
SIMULATOR_ALIGNMENT_CENTER=§7Verschiebung§8: §eMitte
|
||||||
SIMULATOR_ALIGNMENT_POSITIVE_X=§7Verschiebung§8: §ePositive X
|
SIMULATOR_ALIGNMENT_POSITIVE_X=§7Verschiebung§8: §ePositive X
|
||||||
SIMULATOR_ALIGNMENT_NEGATIVE_X=§7Verschiebung§8: §eNegative X
|
SIMULATOR_ALIGNMENT_NEGATIVE_X=§7Verschiebung§8: §eNegative X
|
||||||
SIMULATOR_ALIGNMENT_POSITIVE_Z=§7Verschiebung§8: §ePositive Z
|
SIMULATOR_ALIGNMENT_POSITIVE_Z=§7Verschiebung§8: §ePositive Z
|
||||||
SIMULATOR_ALIGNMENT_NEGATIVE_Z=§7Verschiebung§8: §eNegative Z
|
SIMULATOR_ALIGNMENT_NEGATIVE_Z=§7Verschiebung§8: §eNegative Z
|
||||||
|
|
||||||
SIMULATOR_MOVE_ALL_GUI_NAME=TNT Verschieben
|
SIMULATOR_MOVE_ALL_GUI_NAME=TNT Verschieben
|
||||||
|
|
||||||
SIMULATOR_TNT_SPAWN_GUI_NAME=TNT konfigurieren {0}
|
SIMULATOR_TNT_SPAWN_GUI_NAME=TNT konfigurieren {0}
|
||||||
SIMULATOR_TNT_SPAWN_LORE=§eZum Ändern klicken
|
SIMULATOR_TNT_SPAWN_LORE=§eZum Ändern klicken
|
||||||
SIMULATOR_TNT_SPAWN_COUNT=§7TNT-Anzahl §8- §e{0}
|
SIMULATOR_TNT_SPAWN_COUNT=§7TNT-Anzahl §8- §e{0}
|
||||||
@ -373,19 +340,16 @@ SIMULATOR_TNT_SPAWN_ADD_IGNITION_PHASE = §eZündphase hinzufügen
|
|||||||
SIMULATOR_TNT_SPAWN_ADD_TNT=§eTNT hinzufügen
|
SIMULATOR_TNT_SPAWN_ADD_TNT=§eTNT hinzufügen
|
||||||
SIMULATOR_TNT_SPAWN_REMOVE_TNT=§cEntfernen
|
SIMULATOR_TNT_SPAWN_REMOVE_TNT=§cEntfernen
|
||||||
SIMULATOR_TNT_SPAWN_POSITION_ANVIL_GUI_NAME=Position
|
SIMULATOR_TNT_SPAWN_POSITION_ANVIL_GUI_NAME=Position
|
||||||
|
|
||||||
# SmartPlace
|
# SmartPlace
|
||||||
SMART_PLACE_HELP=§8/§esmartplace §8-§7 Toggled SmartPlace
|
SMART_PLACE_HELP=§8/§esmartplace §8-§7 Toggled SmartPlace
|
||||||
SMART_PLACE_INFO=§7Plaziert rotierbare Blöcke beim §esneaken§7 von dir §eweg§7.
|
SMART_PLACE_INFO=§7Plaziert rotierbare Blöcke beim §esneaken§7 von dir §eweg§7.
|
||||||
SMART_PLACE_ENABLE=§aSmartPlace aktiviert
|
SMART_PLACE_ENABLE=§aSmartPlace aktiviert
|
||||||
SMART_PLACE_DISABLE=§cSmartPlace deaktiviert
|
SMART_PLACE_DISABLE=§cSmartPlace deaktiviert
|
||||||
|
|
||||||
# InventoryFiller
|
# InventoryFiller
|
||||||
INVENTORY_FILL_HELP=§8/§einventoryfill §8- §7Toggled InventoryFill
|
INVENTORY_FILL_HELP=§8/§einventoryfill §8- §7Toggled InventoryFill
|
||||||
INVENTORY_FILL_INFO=§7Hilft dir, Behälter zu füllen, indem du sie beim sneaken ansiehst und den Gegenstand fallen lässt. Oder scrolle einfach auf einen Behälter, um die Menge des gehaltenen Gegenstandes darin zu ändern.
|
INVENTORY_FILL_INFO=§7Hilft dir, Behälter zu füllen, indem du sie beim sneaken ansiehst und den Gegenstand fallen lässt. Oder scrolle einfach auf einen Behälter, um die Menge des gehaltenen Gegenstandes darin zu ändern.
|
||||||
INVENTORY_FILL_ENABLE=§aInventoryFiller activated
|
INVENTORY_FILL_ENABLE=§aInventoryFiller activated
|
||||||
INVENTORY_FILL_DISABLE=§cInventoryFiller deactivated
|
INVENTORY_FILL_DISABLE=§cInventoryFiller deactivated
|
||||||
|
|
||||||
# Killchecker
|
# Killchecker
|
||||||
KILLCHECKER_HELP_ENABLE=§8/§ekillchecker enable §8- §7Aktiviert Killchecker / Berechnet kills neu
|
KILLCHECKER_HELP_ENABLE=§8/§ekillchecker enable §8- §7Aktiviert Killchecker / Berechnet kills neu
|
||||||
KILLCHECKER_HELP_DISABLE=§8/§ekillchecker disable §8- §7Deaktiviert Killchecker
|
KILLCHECKER_HELP_DISABLE=§8/§ekillchecker disable §8- §7Deaktiviert Killchecker
|
||||||
@ -394,7 +358,6 @@ KILLCHECKER_INFO2 = §7Nur farbige Blöcke wie Wolle, Terracotta, Stained Glass
|
|||||||
KILLCHECKER_ENABLE=§aKillchecker aktiviert
|
KILLCHECKER_ENABLE=§aKillchecker aktiviert
|
||||||
KILLCHECKER_DISABLE=§cKillchecker deaktiviert
|
KILLCHECKER_DISABLE=§cKillchecker deaktiviert
|
||||||
KILLCHECKER_BOSSBAR=§e§l{0} §7(§e{1}%§7) §e§l{2}§7 Kanonnen
|
KILLCHECKER_BOSSBAR=§e§l{0} §7(§e{1}%§7) §e§l{2}§7 Kanonnen
|
||||||
|
|
||||||
# BlockCounter
|
# BlockCounter
|
||||||
BLOCK_COUNTER_HELP_TOGGLE=§8/§eblockcounter §8- §7Wechsel zwischen an und aus
|
BLOCK_COUNTER_HELP_TOGGLE=§8/§eblockcounter §8- §7Wechsel zwischen an und aus
|
||||||
BLOCK_COUNTER_HELP_ENABLE=§8/§eblockcounter enable §8- §7Schalte den BlockCounter an
|
BLOCK_COUNTER_HELP_ENABLE=§8/§eblockcounter enable §8- §7Schalte den BlockCounter an
|
||||||
@ -403,66 +366,62 @@ BLOCK_COUNTER_MESSAGE = §7Schaden §8> §e{0} §7Blöcke §e{1} §7TNT §e{2}
|
|||||||
BLOCK_COUNTER_MESSAGE_SECOND=§7Schaden §8> §e{0} §7Blöcke §e{1} §7TNT §e{2} §7Blöcke/TNT §e{3} §7Blöcke/s
|
BLOCK_COUNTER_MESSAGE_SECOND=§7Schaden §8> §e{0} §7Blöcke §e{1} §7TNT §e{2} §7Blöcke/TNT §e{3} §7Blöcke/s
|
||||||
BLOCK_COUNTER_ENABLE=§7BlockCounter angemacht
|
BLOCK_COUNTER_ENABLE=§7BlockCounter angemacht
|
||||||
BLOCK_COUNTER_DISABLE=§7BlockCounter ausgemacht
|
BLOCK_COUNTER_DISABLE=§7BlockCounter ausgemacht
|
||||||
|
|
||||||
# DepthCounter
|
# DepthCounter
|
||||||
DEPTH_COUNTER_MESSAGE=§7Tiefe §8> §7
|
DEPTH_COUNTER_MESSAGE=§7Tiefe §8> §7
|
||||||
|
|
||||||
# TPSLimit
|
# TPSLimit
|
||||||
TICK_STEP_HELP = §8/§etick step §8<§7Ticks§8> §8- §7Spule n Ticks vor
|
TPSLIMIT_FREEZE_HELP=§8/§etpslimit 0 §8-§7 Friere TPS ein
|
||||||
TICK_STEP_SINGLE_HELP = §8/§etick step §8- §7Spule einen Ticks vor
|
TPSLIMIT_LIMIT_HELP=§8/§etpslimit §8[§720>x>0.5§8] §8-§7 Verlangsame die TPS
|
||||||
TICK_WARP_HELP = §8/§etick warp §8<§7Ticks§8> §8- §7Warpe n Ticks vor
|
TPSLIMIT_WARP_HELP=§8/§etpslimit §8[§7x>20§8] §8-§7 Beschleunige die TPS
|
||||||
TICK_CANCEL_HELP = §8/§etick cancel §8- §7Cancelt den Tick Warp oder Step
|
TPSLIMIT_DEFAULT_HELP=§8/§etpslimit default §8-§7 Setze die TPS auf 20
|
||||||
TICK_ERROR = §cDu kannst keinen weiteren §8'§e/tick step§8'§c oder §8'§e/tick warp§8'§c anmachen
|
TPSLIMIT_HELP=§8/§etpslimit §8-§7 Zeige die jetzige TPS
|
||||||
TICK_CANCEL_ERROR = §cDu hast keinen §8'§e/tick step§8'§c oder §8'§e/tick warp§8'§c aktiv
|
TICK_FREEZE_HELP=§8/§etick rate 0 §8-§7 Friere TPS ein
|
||||||
TICK_STEP = §eSpult {0} Ticks vor
|
TICK_FREEZE_HELP_2=§8/§etick freeze §8-§7 Friere TPS ein
|
||||||
TICK_STEP_LEFT = §eSpult noch {0} Ticks vor
|
TICK_UNFREEZE_HELP=§8/§etick unfreeze §8-§7 Setze die TPS auf 20
|
||||||
TICK_WARP = §eWarpe {0} Ticks vor
|
TICK_LIMIT_HELP=§8/§etick rate §8[§720>x>0.5§8] §8-§7 Verlangsame die TPS
|
||||||
TICK_WARP_LEFT = §eWarpe noch {0} Ticks vor
|
TICK_WARP_HELP=§8/§etick rate §8[§7x>20§8] §8-§7 Beschleunige die TPS
|
||||||
TICK_CANCEL = §eWarps und Steps abgebrochen
|
TICK_DEFAULT_HELP=§8/§etick rate default §8-§7 Setze die TPS auf 20
|
||||||
|
TICK_HELP=§8/§etick rate §8-§7 Zeige die jetzige TPS
|
||||||
|
TICK_STEPPING_HELP=§8/§etick step §8<§7Ticks§8> §8-§7 Spule n ticks oder 1 vor
|
||||||
|
TICK_WARPING_HELP=§8/§etick warp §8<§7Ticks§8> §8<§7TPS§8> §8-§7 Warpe n ticks oder 1 vor
|
||||||
|
TICK_BOSSBAR=§e{0}§8/§7{1} gesprungen
|
||||||
TPSLIMIT_GUI_ITEM_NAME=§eTPS Limiter
|
TPSLIMIT_GUI_ITEM_NAME=§eTPS Limiter
|
||||||
TPSLIMIT_GUI_ITEM_LORE=§7Aktuell: §e{0}
|
TPSLIMIT_GUI_ITEM_LORE=§7Aktuell: §e{0}
|
||||||
TPSLIMIT_ANVIL_GUI=Neues TPS Limit
|
TPSLIMIT_ANVIL_GUI=Neues TPS Limit
|
||||||
TPSLIMIT_HELP = §8/§etpslimit §8[§7TPS§8|§edefault§8] §8- §7Setzte die TPS auf dem Bau
|
|
||||||
TPSLIMIT_CURRENT=§7Jetziges TPS limit§8: §e{0}
|
TPSLIMIT_CURRENT=§7Jetziges TPS limit§8: §e{0}
|
||||||
TPSLIMIT_NO_PERMS = §cDu darfst hier nicht den TPS-Limiter nutzen
|
|
||||||
TPSLIMIT_SET=§eTPS limit auf {0} gesetzt.
|
TPSLIMIT_SET=§eTPS limit auf {0} gesetzt.
|
||||||
TPSLIMIT_FROZEN=§eTPS eingefroren.
|
TPSLIMIT_FROZEN=§eTPS eingefroren.
|
||||||
TPSLIMIT_INVALID = §cNur Zahlen zwischen 0,5 und {0}, und 'default'{1} erlaubt.
|
|
||||||
TPSLIMIT_INVALID_FROZEN = §c und '0'
|
|
||||||
|
|
||||||
# Trace
|
# Trace
|
||||||
TRACE_RECORD=§aan
|
TRACE_RECORD=§aan
|
||||||
TRACE_HAS_TRACES=§ehat Traces
|
TRACE_HAS_TRACES=§ehat Traces
|
||||||
TRACE_IDLE_SINGLE=§esingle
|
|
||||||
TRACE_IDLE_AUTO_EXPLODE=§eauto §8(§7explode§8)
|
|
||||||
TRACE_IDLE_AUTO_IGNITE=§eauto §8(§7ignite§8)
|
|
||||||
TRACE_MESSAGE_AUTO_IDLE_EXPLODE = §aAuto-Tracer explode gestartet
|
|
||||||
TRACE_MESSAGE_AUTO_IDLE_IGNITE = §aAuto-Tracer ignite gestartet
|
|
||||||
TRACE_MESSAGE_START=§aTNT-Tracer gestartet
|
TRACE_MESSAGE_START=§aTNT-Tracer gestartet
|
||||||
TRACE_MESSAGE_SINGLE = §aSingle-Tracer gestartet
|
TRACE_MESSAGE_AUTO_START=§eAuto TNT-Tracer gestartet
|
||||||
|
TRACE_MESSAGE_AUTO_STOP=§cAuto TNT-Tracer gestoppt
|
||||||
TRACE_MESSAGE_STOP=§cTNT-Tracer gestoppt
|
TRACE_MESSAGE_STOP=§cTNT-Tracer gestoppt
|
||||||
TRACE_MESSAGE_DELETE = §cAlle TNT-Positionen gelöscht
|
TRACE_MESSAGE_CLEAR=§cAlle TNT-Positionen gelöscht
|
||||||
TRACE_MESSAGE_SHOW = §aAlle TNT-Positionen angezeigt
|
|
||||||
TRACE_MESSAGE_HIDE = §cAlle TNT-Positionen ausgeblendet
|
|
||||||
TRACE_MESSAGE_ISOLATE = §aTNT-Positionen isoliert
|
|
||||||
TRACE_MESSAGE_UNISOLATE = §cTNT-Positionen ausgeblendet
|
|
||||||
TRACE_MESSAGE_CLICK_ISOLATE=§eKlicken zum §aisolieren§8/§causblenden
|
TRACE_MESSAGE_CLICK_ISOLATE=§eKlicken zum §aisolieren§8/§causblenden
|
||||||
TRACE_MESSAGE_DISALLOWED = §cDu darfst hier nicht den TNT-Tracer nutzen
|
TRACE_MESSAGE_SHOW_AT=§aTNT-positions angezeigt bei {0}
|
||||||
|
TRACE_MESSAGE_SHOW_FROM=§aAll TNT-positions angezeigt von {0}
|
||||||
|
TRACE_MESSAGE_SHOW_FROM_TO=§aAll TNT-positions angezeigt von {0} bis {1}
|
||||||
|
TRACE_MESSAGE_BROADCAST=§e{0} teilte seinen Trace-Show-Status.
|
||||||
|
TRACE_MESSAGE_BROADCAST_HOVER=§eZum Ansehen klicken.
|
||||||
|
TRACE_MESSAGE_FOLLOW=§aSie folgen nun {0} Trace show state
|
||||||
|
TRACE_MESSAGE_FOLLOW_SELF=§cSie können sich selbst nicht folgen!
|
||||||
|
TRACE_MESSAGE_UNFOLLOW=§cSie folgen nicht mehr dem Status einer Trace-Show
|
||||||
|
TRACE_MESSAGE_SHOW_TO_SMALLER=§cBis muss größer als von sein
|
||||||
|
TRACE_MESSAGE_ISOLATE=§eTNT Positionen wurden isoliert
|
||||||
|
TRACE_COMMAND_HELP_BROADCAST=§8/§etrace broadcast §8- §7Teilt den aktuellen Trace-Show-Status mit anderen
|
||||||
|
TRACE_COMMAND_HELP_FOLLOW=§8/§etrace follow §8[§ePlayer§8] §8- §7Verfolgen eines Spielers Status anzeigen
|
||||||
|
TRACE_COMMAND_HELP_UNFOLLOW=§8/§etrace unfollow §8- §7Den Status der Trace-Anzeige aufheben
|
||||||
TRACE_COMMAND_HELP_START=§8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen
|
TRACE_COMMAND_HELP_START=§8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen
|
||||||
TRACE_COMMAND_HELP_SINGLE = §8/§etrace single §8- §7Startet eine einzelne Aufnahme aller TNT-Positionen
|
|
||||||
TRACE_COMMAND_HELP_STOP=§8/§etrace stop §8- §7Stoppt den TNT-Tracer
|
TRACE_COMMAND_HELP_STOP=§8/§etrace stop §8- §7Stoppt den TNT-Tracer
|
||||||
TRACE_COMMAND_HELP_AUTO=§8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart
|
TRACE_COMMAND_HELP_AUTO=§8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart
|
||||||
TRACE_COMMAND_HELP_SHOW=§8/§etrace show §8<§eParameter§8> - §7Zeigt alle TNT-Positionen
|
TRACE_COMMAND_HELP_SHOW=§8/§etrace show §8<§eParameter§8> - §7Zeigt alle TNT-Positionen
|
||||||
|
TRACE_COMMAND_HELP_SHOW_AT=§8/§etrace show §8(§etime§8|§7fuse§8) §7at §8<§eTIME§8> - §7Zeigt alle TNT-Positionen bei §8<§eTIME§8> an
|
||||||
|
TRACE_COMMAND_HELP_SHOW_FROM=§8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> - §7Zeigt alle TNT-Positionen von §8<§eFROM§8>
|
||||||
|
TRACE_COMMAND_HELP_SHOW_FROM_TO=§8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> §7to §8<§eTO§8> - §7Zeigt alle TNT-Positionen zwischen §8<§eFROM§8> und §8<§eTO§8>
|
||||||
TRACE_COMMAND_HELP_HIDE=§8/§etrace hide §8- §7Versteckt alle TNT-Positionen
|
TRACE_COMMAND_HELP_HIDE=§8/§etrace hide §8- §7Versteckt alle TNT-Positionen
|
||||||
TRACE_COMMAND_HELP_DELETE=§8/§etrace delete §8- §7Löscht alle TNT-Positionen
|
TRACE_COMMAND_HELP_DELETE=§8/§etrace delete §8- §7Löscht alle TNT-Positionen
|
||||||
TRACE_COMMAND_HELP_GUI = §8/§etrace gui §8- §7Zeigt die Trace Oberfläche an
|
TRACE_COMMAND_HELP_ISOLATE=§8/§etrace isolate §8[§eTrace§8] §8[§eTNT§8] §8- §7Isoliert spezifische TNTs des Traces
|
||||||
TRACE_COMMAND_HELP_REPLAY = §8/§etrace replay §8[§7Tick§8] §8- §7Replayes die Aufnahme
|
|
||||||
TRACE_COMMAND_HELP_REPLAY_DISABLE = §8/§etrace replay disable §8- §7Stoppt das Replay
|
|
||||||
TRACE_COMMAND_HELP_REPLAY_NEXT = §8/§etrace replay next §8[§7Step§8] §8- §7Springe einen§8/§7step Tick vor
|
|
||||||
TRACE_COMMAND_HELP_REPLAY_PREVIOUS = §8/§etrace replay previous §8[§7Step§8] §8- §7Springe einen§8/§7step Tick zurück
|
|
||||||
TRACE_COMMAND_HELP_REPLAY_LOOP = §8/§etrace replay loop §8<§7start§8> §8<§7end§8> §8[§7speed§8] §8- §7Spielt die Aufnahme in einer Schleife ab
|
|
||||||
|
|
||||||
TRACE_GUI_ITEM_NAME=§eTracer
|
TRACE_GUI_ITEM_NAME=§eTracer
|
||||||
TRACE_GUI_ITEM_LORE=§7Status§8: {0}
|
TRACE_GUI_ITEM_LORE=§7Status§8: {0}
|
||||||
TRACE_GUI_NAME=Tracer Gui
|
TRACE_GUI_NAME=Tracer Gui
|
||||||
@ -472,26 +431,12 @@ TRACE_GUI_TRACE_ACTIVE_AUTO = §eAuto-Trace ist Aktiv
|
|||||||
TRACE_GUI_AUTO_TRACE_INACTIVE=§eAuto-Tracer Aktivieren
|
TRACE_GUI_AUTO_TRACE_INACTIVE=§eAuto-Tracer Aktivieren
|
||||||
TRACE_GUI_AUTO_TRACE_ACTIVE=§eAuto-Tracer Deaktivieren
|
TRACE_GUI_AUTO_TRACE_ACTIVE=§eAuto-Tracer Deaktivieren
|
||||||
TRACE_GUI_DELETE=§eTrace Löschen
|
TRACE_GUI_DELETE=§eTrace Löschen
|
||||||
|
|
||||||
TRACE_GUI_TITLE = Trace GUI
|
|
||||||
TRACE_GUI_ITEM_BACK = §eBack
|
|
||||||
TRACE_GUI_ITEM = §eTrace §8- §e{0} §7TNT
|
|
||||||
TRACE_GUI_CLEAR = §eTraces löschen
|
|
||||||
TRACE_GUI_RECORD_ITEM = §eTNT §8- §e{0} §7Positionen
|
|
||||||
TRACE_GUI_RECORD_CLEAR = §eTNT löschen
|
|
||||||
TRACE_GUI_POSITION_ITEM = §ePosition
|
|
||||||
TRACE_GUI_POSITION_X = §7X§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_Y = §7Y§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_Z = §7Z§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_SOURCE = §7Ursprung§8: §e{0}
|
|
||||||
TRACE_GUI_POSITION_EXPLODED = §7Explodiert§8: §e{0}
|
|
||||||
|
|
||||||
# Loader
|
# Loader
|
||||||
LOADER_SETUP=§eEinrichtung
|
LOADER_SETUP=§eEinrichtung
|
||||||
LOADER_RUNNING=§aLaufend
|
LOADER_RUNNING=§aLaufend
|
||||||
LOADER_PAUSE=§7Pausiert
|
LOADER_PAUSE=§7Pausiert
|
||||||
LOADER_END=§8Beendet
|
LOADER_END=§8Beendet
|
||||||
|
LOADER_SINGLE=§aEinmal
|
||||||
LOADER_MESSAGE_INTERACT=§e{0} hinzugefügt {1}
|
LOADER_MESSAGE_INTERACT=§e{0} hinzugefügt {1}
|
||||||
LOADER_BUTTON_TNT=TNT
|
LOADER_BUTTON_TNT=TNT
|
||||||
LOADER_BUTTON_SWITCH=Hebel
|
LOADER_BUTTON_SWITCH=Hebel
|
||||||
@ -508,43 +453,50 @@ LOADER_BUTTON_LECTERN=Lectern
|
|||||||
LOADER_BUTTON_TRAPDOOR=Trapdoor
|
LOADER_BUTTON_TRAPDOOR=Trapdoor
|
||||||
LOADER_BUTTON_DOOR=Door
|
LOADER_BUTTON_DOOR=Door
|
||||||
LOADER_BUTTON_FENCEGATE=Fencegate
|
LOADER_BUTTON_FENCEGATE=Fencegate
|
||||||
|
|
||||||
LOADER_HELP_SETUP=§8/§eloader setup §8- §7Startet die Aufnahme der Aktionen
|
LOADER_HELP_SETUP=§8/§eloader setup §8- §7Startet die Aufnahme der Aktionen
|
||||||
LOADER_SETUP_STOP_FIRST=§cBitte stoppe zuerst den Loader
|
LOADER_SETUP_STOP_FIRST=§cBitte stoppe zuerst den Loader
|
||||||
LOADER_HELP_START=§8/§eloader start §8- §7Spielt die zuvor aufgenommenen Aktionen ab
|
LOADER_HELP_START=§8/§eloader start §8- §7Spielt die zuvor aufgenommenen Aktionen ab
|
||||||
|
LOADER_HELP_SINGLE=§8/§eloader single §8- §7Spielt die zuvor aufgenommenen Aktionen einmal ab
|
||||||
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pausiert das Abspielen
|
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pausiert das Abspielen
|
||||||
LOADER_HELP_GUI=§8/§7loader settings §8- §7Zeigt die Einstellungen an
|
LOADER_HELP_GUI=§8/§7loader settings §8- §7Zeigt die Einstellungen an
|
||||||
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stoppt die Aufnahme bzw. das Abspielen
|
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stoppt die Aufnahme bzw. das Abspielen
|
||||||
|
LOADER_HELP_WAIT=§8/§7loader wait §8[§7Ticks§8] - §7Setzt die Wartezeit zwischen Schüssen
|
||||||
|
LOADER_HELP_SPEED=§8/§7loader speed §8[§7Ticks§8] - §7Setzt die Wartezeit zwischen Aktionen
|
||||||
LOADER_NO_LOADER=§cDu hast noch keinen Loader. Erstelle dir einen mit /loader setup
|
LOADER_NO_LOADER=§cDu hast noch keinen Loader. Erstelle dir einen mit /loader setup
|
||||||
LOADER_NEW=§7Belade und feuer einmal die Kanone ab, um den Loader zu initialisieren.
|
LOADER_NEW=§7Belade und feuer einmal die Kanone ab, um den Loader zu initialisieren.
|
||||||
LOADER_HOW_TO_START=§7Führe dann /§eloader start§7 um den Loader zu starten
|
LOADER_HOW_TO_START=§7Führe dann /§eloader start§7 um den Loader zu starten
|
||||||
LOADER_ACTIVE=§7Der Loader ist nun aktiviert.
|
LOADER_ACTIVE=§7Der Loader ist nun aktiviert.
|
||||||
LOADER_STOP=§7Der Loader ist nun gestoppt.
|
LOADER_STOP=§7Der Loader ist nun gestoppt.
|
||||||
|
LOADER_SINGLE_CMD=§7Der Loader spielt nun einmal ab.
|
||||||
LOADER_PAUSED=§7Der Loader ist nun pausiert.
|
LOADER_PAUSED=§7Der Loader ist nun pausiert.
|
||||||
LOADER_PERMS=§cDu darfst hier nicht den Detonator nutzen
|
LOADER_SMALL_TIME=§cDie Wartezeit ist zu klein
|
||||||
|
LOADER_NEW_TIME=§7Die Schusswartezeit ist nun: {0}
|
||||||
|
LOADER_NEW_LOAD_TIME=§7Die Setzwartezeit ist nun: {0}
|
||||||
LOADER_NOTHING_RECORDED=§cEs wurden keine Elemente aufgenommen!
|
LOADER_NOTHING_RECORDED=§cEs wurden keine Elemente aufgenommen!
|
||||||
LOADER_GUI_TITLE=Loader Einstellungen
|
LOADER_GUI_TITLE=Loader Einstellungen
|
||||||
LOADER_GUI_SHOW_INTERACTIONS=§eZeige Interaktionen
|
LOADER_GUI_SHOW_ALL=Zeige alles
|
||||||
LOADER_GUI_SHOW_WAITS=§eZeige Wartezeiten
|
LOADER_GUI_SHOW_INTERACTIONS=Zeige Interaktionen
|
||||||
LOADER_GUI_SHOW_WAITS_SET_BETWEEN_TNT=§7Wait Time zwischen TNT
|
LOADER_GUI_SHOW_WAITS=Zeige Wartezeiten
|
||||||
|
LOADER_GUI_SHOW_WAITS_BETWEEN_TNT=Zeige Wartezeiten zwischen TNT
|
||||||
|
LOADER_GUI_SHOW_TNT=Zeige TNT
|
||||||
LOADER_GUI_SHOW_WAITS_SET_ALL=§7Wait Time alle
|
LOADER_GUI_SHOW_WAITS_SET_ALL=§7Wait Time alle
|
||||||
LOADER_GUI_SHOW_WAITS_TITLE=§7Wartezeit
|
LOADER_GUI_SHOW_WAITS_TITLE=§7Wartezeit
|
||||||
LOADER_GUI_SETTINGS_TITLE=Einstellungen
|
LOADER_GUI_SETTINGS_TITLE=Einstellungen
|
||||||
|
LOADER_GUI_COPY_TITLE=Anzahl Kopien
|
||||||
LOADER_GUI_SETTINGS_BACK=§8Zurück
|
LOADER_GUI_SETTINGS_BACK=§8Zurück
|
||||||
|
LOADER_GUI_SETTINGS_COPY=§7Kopieren
|
||||||
LOADER_GUI_SETTINGS_DELETE=§cLöschen
|
LOADER_GUI_SETTINGS_DELETE=§cLöschen
|
||||||
LOADER_GUI_WAIT_TITLE=Wartezeit
|
LOADER_GUI_WAIT_TITLE=Wartezeit
|
||||||
LOADER_GUI_WAIT_BACK=§8Zurück
|
LOADER_GUI_WAIT_BACK=§8Zurück
|
||||||
|
LOADER_GUI_CLICK_TO_EDIT=§7Klicke zum editieren
|
||||||
LOADER_GUI_CLICK_TO_EDIT=§7Click to edit
|
|
||||||
LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1}
|
LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1}
|
||||||
LOADER_SETTING_NAME=§7{0}
|
LOADER_SETTING_NAME=§7{0}
|
||||||
LOADER_SETTING_MODES=§7Modes§8: §e{0}
|
LOADER_SETTING_MODES=§7Modi§8: §e{0}
|
||||||
LOADER_SETTING_POWER=§7Power§8: §e{0}
|
LOADER_SETTING_POWER=§7Redstone Stärke§8: §e{0}
|
||||||
LOADER_SETTING_TICKS=§7Ticks§8: §e{0}
|
LOADER_SETTING_TICKS=§7Ticks§8: §e{0}
|
||||||
LOADER_SETTING_REPEATER=§7Repeater§8: §e{0}
|
LOADER_SETTING_REPEATER=§7Repeater§8: §e{0}
|
||||||
LOADER_SETTING_WAIT=§7Wait§8: §e{0} Tick(s)
|
LOADER_SETTING_WAIT=§7Wartezeit§8: §e{0} Tick(s)
|
||||||
LOADER_SETTING_WAIT_NAME=Wait
|
LOADER_SETTING_WAIT_NAME=Wartezeit
|
||||||
LOADER_SETTING_TICKS_NAME=Ticks
|
LOADER_SETTING_TICKS_NAME=Ticks
|
||||||
LOADER_SETTING_TICKS_REMOVE_ONE=§c-1
|
LOADER_SETTING_TICKS_REMOVE_ONE=§c-1
|
||||||
LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5
|
LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5
|
||||||
@ -555,19 +507,21 @@ LOADER_SETTING_TNT_X=§7X§8: §e{0}
|
|||||||
LOADER_SETTING_TNT_Y=§7Y§8: §e{0}
|
LOADER_SETTING_TNT_Y=§7Y§8: §e{0}
|
||||||
LOADER_SETTING_TNT_Z=§7Z§8: §e{0}
|
LOADER_SETTING_TNT_Z=§7Z§8: §e{0}
|
||||||
LOADER_INTERACTION_NOOP=NOOP
|
LOADER_INTERACTION_NOOP=NOOP
|
||||||
LOADER_INTERACTION_INTERACT=Interact
|
LOADER_INTERACTION_PLACE=Platzieren
|
||||||
LOADER_INTERACTION_POWERED=Powered
|
LOADER_INTERACTION_INTERACT=Interagiere
|
||||||
LOADER_INTERACTION_UNPOWERED=Unpowered
|
LOADER_INTERACTION_POWERED=Aktiviert
|
||||||
LOADER_INTERACTION_PAGE_PREV=Previous Page
|
LOADER_INTERACTION_UNPOWERED=Deaktiviert
|
||||||
LOADER_INTERACTION_PAGE_NEXT=Next Page
|
LOADER_INTERACTION_PAGE_PREV=Vorherige Seite
|
||||||
LOADER_INTERACTION_PAGE=Page {0}
|
LOADER_INTERACTION_PAGE_NEXT=Nächste Seite
|
||||||
LOADER_INTERACTION_ACTIVE=Active
|
LOADER_INTERACTION_PAGE=Seite {0}
|
||||||
LOADER_INTERACTION_INACTIVE=Inactive
|
LOADER_INTERACTION_ACTIVE=Aktiviert
|
||||||
LOADER_INTERACTION_WAIT_FOR=Wait for
|
LOADER_INTERACTION_INACTIVE=Deaktiviert
|
||||||
LOADER_INTERACTION_NO_WAIT_FOR=No wait for
|
LOADER_INTERACTION_WAIT_FOR=Darauf warten
|
||||||
LOADER_INTERACTION_OPEN=Open
|
LOADER_INTERACTION_NO_WAIT_FOR=Nicht darauf warten
|
||||||
LOADER_INTERACTION_CLOSED=Closed
|
LOADER_INTERACTION_OPEN=Geöffnet
|
||||||
|
LOADER_INTERACTION_CLOSED=Geschlossen
|
||||||
|
LOADER_INTERACTION_COMPARE=Vergleichen
|
||||||
|
LOADER_INTERACTION_SUBTRACT=Subtrahieren
|
||||||
# Loadtimer
|
# Loadtimer
|
||||||
LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone
|
LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone
|
||||||
LOADTIMER_HELP_START_1=§8/§eloadtimer start §8-§7 Startet den einfachen Loadtimer
|
LOADTIMER_HELP_START_1=§8/§eloadtimer start §8-§7 Startet den einfachen Loadtimer
|
||||||
@ -597,7 +551,6 @@ LOADTIMER_SUMARY_TIMES_LAST=§7\\/
|
|||||||
LOADTIMER_SUMARY_STATS_HEAD=§7Kanonen-Stats§8:
|
LOADTIMER_SUMARY_STATS_HEAD=§7Kanonen-Stats§8:
|
||||||
LOADTIMER_SUMARY_STATS_TNT=§7TNT: §e{0}
|
LOADTIMER_SUMARY_STATS_TNT=§7TNT: §e{0}
|
||||||
LOADTIMER_SUMARY_STATS_FREQ=§7Belade Frequenz: §e{0}/m§8, §7Schuss Frequenz: §e{1}/m
|
LOADTIMER_SUMARY_STATS_FREQ=§7Belade Frequenz: §e{0}/m§8, §7Schuss Frequenz: §e{1}/m
|
||||||
|
|
||||||
# Observer
|
# Observer
|
||||||
OBSERVER_HELP=§7Rechts-Klicke einen Observer um den Trace zu bekommen. Hierfür müssen Flammenpartikel an sein. Die Partikel werden im Block angezeigt.
|
OBSERVER_HELP=§7Rechts-Klicke einen Observer um den Trace zu bekommen. Hierfür müssen Flammenpartikel an sein. Die Partikel werden im Block angezeigt.
|
||||||
OBSERVER_HELP_ENABLE=§8/§eobserver enable §8-§7 Aktiviere den Observer Tracer
|
OBSERVER_HELP_ENABLE=§8/§eobserver enable §8-§7 Aktiviere den Observer Tracer
|
||||||
@ -609,7 +562,6 @@ OBSERVER_DISABLE = §7Observer Trace gestoppt
|
|||||||
OBSERVER_DELETE=§7Observer Trace gelöscht
|
OBSERVER_DELETE=§7Observer Trace gelöscht
|
||||||
OBSERVER_RETRACE_DONE=§7Observer Trace neu berechnet
|
OBSERVER_RETRACE_DONE=§7Observer Trace neu berechnet
|
||||||
OBSERVER_RETRACE_NO_TRACE=§7Kein Observer Trace zum neu berechnen
|
OBSERVER_RETRACE_NO_TRACE=§7Kein Observer Trace zum neu berechnen
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
OTHER_ITEMS_TELEPORT_NAME=§eTeleporter
|
OTHER_ITEMS_TELEPORT_NAME=§eTeleporter
|
||||||
OTHER_ITEMS_TELEPORT_GUI_NAME=Teleportieren
|
OTHER_ITEMS_TELEPORT_GUI_NAME=Teleportieren
|
||||||
@ -630,10 +582,9 @@ OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Lege den angeguckten Bloc
|
|||||||
OTHER_NOCLIP_SLOT_HELP_DROP=§8/§eslot drop §8-§7 Cleared deinen Slot
|
OTHER_NOCLIP_SLOT_HELP_DROP=§8/§eslot drop §8-§7 Cleared deinen Slot
|
||||||
OTHER_CLEAR_HELP_SELF=§8/§eclear §8- §7Leere dein Inventar
|
OTHER_CLEAR_HELP_SELF=§8/§eclear §8- §7Leere dein Inventar
|
||||||
OTHER_CLEAR_HELP_PLAYER=§8/§eclear §8[§7Player§8] §8- §7Leere ein Spieler Inventar
|
OTHER_CLEAR_HELP_PLAYER=§8/§eclear §8[§7Player§8] §8- §7Leere ein Spieler Inventar
|
||||||
OTHER_CLEAR_CLEARED=Dein Inventar wurde geleert.
|
OTHER_CLEAR_CLEARED=§7Dein Inventar wurde geleert.
|
||||||
OTHER_CLEAR_FROM=Dein Inventar wurde von {0} §7geleert.
|
OTHER_CLEAR_FROM=§7Dein Inventar wurde von {0} §7geleert.
|
||||||
OTHER_CLEAR_TO=Das Inventar von {0} §7wurde geleert.
|
OTHER_CLEAR_TO=§7Das Inventar von {0} §7wurde geleert.
|
||||||
OTHER_CLEAR_NO_PERMS=§cDu darfst hier keine fremden Inventare leeren.
|
|
||||||
OTHER_DECLUTTER_HELP=§8/§edeclutter §8- §7Räume dein Inventar auf
|
OTHER_DECLUTTER_HELP=§8/§edeclutter §8- §7Räume dein Inventar auf
|
||||||
OTHER_DECLUTTER_DONE=§aDein Inventar wurde aufgeräumt.
|
OTHER_DECLUTTER_DONE=§aDein Inventar wurde aufgeräumt.
|
||||||
OTHER_GAMEMODE_UNKNOWN=§cUnbekannter Spielmodus.
|
OTHER_GAMEMODE_UNKNOWN=§cUnbekannter Spielmodus.
|
||||||
@ -649,12 +600,16 @@ OTHER_TELEPORT_SELF_2=§cNoch zu reisende Blöcke: 0; ETA: 0:00
|
|||||||
OTHER_TELEPORT_SELF_3=§cEin wenig bewegung muss ein.
|
OTHER_TELEPORT_SELF_3=§cEin wenig bewegung muss ein.
|
||||||
OTHER_TELEPORT_SELF_4=§cFür eine solche Distanz?
|
OTHER_TELEPORT_SELF_4=§cFür eine solche Distanz?
|
||||||
OTHER_TIME_HELP=§8/§etime §8<§7Zeit 0=Morgen§8, §76000=Mittag§8, §718000=Mitternacht§8> - §7Setzt die Zeit auf dem Bau
|
OTHER_TIME_HELP=§8/§etime §8<§7Zeit 0=Morgen§8, §76000=Mittag§8, §718000=Mitternacht§8> - §7Setzt die Zeit auf dem Bau
|
||||||
OTHER_TIME_NO_PERM=§cDu darfst hier nicht die Zeit ändern
|
|
||||||
OTHER_TIME_INVALID=§cBitte gib eine Zahl zwischen 0 und 24000 an
|
OTHER_TIME_INVALID=§cBitte gib eine Zahl zwischen 0 und 24000 an
|
||||||
OTHER_TIME_RESULT=§7§oWhooosh
|
OTHER_TIME_RESULT=§7§oWhooosh
|
||||||
OTHER_TPS_HEAD=§7TPS: 1s 10s 1m 5m 10m
|
OTHER_TPS_HEAD=§7TPS: 1s 10s 1m 5m 10m
|
||||||
OTHER_TPS_MESSAGE=§7 §e{0}§7 §e{1}§7 §e{2}§7 §e{3}§7 §e{4}
|
OTHER_TPS_MESSAGE=§7 §e{0}§7 §e{1}§7 §e{2}§7 §e{3}§7 §e{4}
|
||||||
OTHER_TPS_SINGLE=§8TPS: §e{0}
|
OTHER_TPS_SINGLE=§8TPS: §e{0}
|
||||||
|
OTHER_BIND_HELP=§8/§ebind §8[§7Command§8] §8-§e Binde ein Befehl auf Item Interaktion
|
||||||
|
OTHER_BIND_ERROR=§cFalscher oder unbekannter Befehl
|
||||||
|
OTHER_BIND_UNBINDABLE=§cBefehl konnte nicht gebunden werden
|
||||||
|
OTHER_BIND_MESSAGE_BIND=§7Befehl §e{0} §7ans Item gebunden
|
||||||
|
OTHER_BIND_MESSAGE_UNBIND=§7Befehl entbunden
|
||||||
# DebugStick
|
# DebugStick
|
||||||
DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick
|
DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick
|
||||||
DEBUG_STICK_NAME=§eDebugstick
|
DEBUG_STICK_NAME=§eDebugstick
|
||||||
@ -671,7 +626,6 @@ NIGHT_VISION_OFF=§eNightvision deaktiviert
|
|||||||
NIGHT_VISION_ON=§eNightvision aktiviert
|
NIGHT_VISION_ON=§eNightvision aktiviert
|
||||||
NIGHT_VISION_ITEM_ON=§7Nightvision: §eAktiviert
|
NIGHT_VISION_ITEM_ON=§7Nightvision: §eAktiviert
|
||||||
NIGHT_VISION_ITEM_OFF=§7Nightvision: §eDeaktiviert
|
NIGHT_VISION_ITEM_OFF=§7Nightvision: §eDeaktiviert
|
||||||
|
|
||||||
#Navigation Wand
|
#Navigation Wand
|
||||||
NAVIGATION_WAND=§eNavigation Wand
|
NAVIGATION_WAND=§eNavigation Wand
|
||||||
NAVIGATION_WAND_LEFT_CLICK=§eLeft click: jump to location
|
NAVIGATION_WAND_LEFT_CLICK=§eLeft click: jump to location
|
||||||
@ -706,17 +660,6 @@ MATERIAL_INTERACTABLE=§8- §eInterargierbarer Block
|
|||||||
MATERIAL_FLAMMABLE=§8- §eFlammbarer Block
|
MATERIAL_FLAMMABLE=§8- §eFlammbarer Block
|
||||||
MATERIAL_BURNABLE=§8- §eBrennbarer Block
|
MATERIAL_BURNABLE=§8- §eBrennbarer Block
|
||||||
MATERIAL_WATERLOGGABLE=§8- §eWasserspeicherbarer Block
|
MATERIAL_WATERLOGGABLE=§8- §eWasserspeicherbarer Block
|
||||||
# Redstonetester
|
|
||||||
RT_HELP=§8/§eredstonetester §8-§7 Gibt den RedstoneTester
|
|
||||||
RT_GIVEN=§7Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten
|
|
||||||
RT_ITEM_NAME=§eRedstonetester
|
|
||||||
RT_ITEM_LORE_1=§eLinksklick Block §8-§7 Setzt die 1. Position
|
|
||||||
RT_ITEM_LORE_2=§eRechtsklick Block §8-§7 Setzt die 2. Position
|
|
||||||
RT_ITEM_LORE_3=§eShift-Rechtsklick Luft §8-§7 Zurücksetzten
|
|
||||||
RT_LOC=§8: §e{0} {1} {2}
|
|
||||||
RT_INVALID_LOC=§cUnbekannte Position
|
|
||||||
RT_RESULT=§7Differenz§8: §e{0}§7 Ticks §8,§7 R-Ticks §e{1}
|
|
||||||
RT_ACTIVATE=§7Positionen gelöscht§8.
|
|
||||||
# Region Items
|
# Region Items
|
||||||
REGION_ITEM_COLOR=§7Color: §e{0}
|
REGION_ITEM_COLOR=§7Color: §e{0}
|
||||||
REGION_ITEM_COLOR_CHOOSE=Farbe Wählen
|
REGION_ITEM_COLOR_CHOOSE=Farbe Wählen
|
||||||
@ -730,35 +673,34 @@ REGION_ITEM_RESET=§eReset
|
|||||||
REGION_ITEM_TESTBLOCK=§eTestblock
|
REGION_ITEM_TESTBLOCK=§eTestblock
|
||||||
REGION_ITEM_TNT_OFF=§7TNT: §eAusgeschaltet
|
REGION_ITEM_TNT_OFF=§7TNT: §eAusgeschaltet
|
||||||
REGION_ITEM_TNT_ONLY_TB=§7TNT: §enur Testblock
|
REGION_ITEM_TNT_ONLY_TB=§7TNT: §enur Testblock
|
||||||
|
REGION_ITEM_TNT_ONLY_BUILD=§7TNT: §enur Baubereich
|
||||||
REGION_ITEM_TNT_ON=§7TNT: §eEingeschaltet
|
REGION_ITEM_TNT_ON=§7TNT: §eEingeschaltet
|
||||||
REGION_ITEM_SELECTOR_TITLE=Tnt Modus
|
REGION_ITEM_SELECTOR_TITLE=Tnt Modus
|
||||||
REGION_ITEM_SELECTOR_ON=§eEinschalten
|
REGION_ITEM_SELECTOR_ON=§eEinschalten
|
||||||
REGION_ITEM_SELECTOR_ONLY_TB=§enur Testblock
|
REGION_ITEM_SELECTOR_ONLY_TB=§enur Testblock
|
||||||
|
REGION_ITEM_SELECTOR_ONLY_BUILD=§enur Baubereich
|
||||||
REGION_ITEM_SELECTOR_OFF=§eAusschalten
|
REGION_ITEM_SELECTOR_OFF=§eAusschalten
|
||||||
#Region
|
#Region
|
||||||
REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Setze die Farbe der Region
|
REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Setze die Farbe der Region
|
||||||
REGION_COLOR_HELP_COLOR_TYPE=§8/§ecolor §8[§7Color§8] §8[§7Type§8] §8- §7Setze die Farbe der Region oder Global
|
REGION_COLOR_HELP_COLOR_TYPE=§8/§ecolor §8[§7Color§8] §8[§7Type§8] §8- §7Setze die Farbe der Region oder Global
|
||||||
REGION_COLOR_GLOBAL=§7Alle Regions farben auf §e{0}§7 gesetzt
|
REGION_COLOR_GLOBAL=§7Alle Regions farben auf §e{0}§7 gesetzt
|
||||||
REGION_COLOR_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
REGION_COLOR_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
||||||
REGION_COLOR_NO_PERMS=§cDies ist nicht deine Welt!
|
|
||||||
REGION_FIRE_HELP=§8/§efire §8- §7Toggle Feuerschaden
|
REGION_FIRE_HELP=§8/§efire §8- §7Toggle Feuerschaden
|
||||||
REGION_FIRE_NO_PERMS=§cDu darfst hier nicht Feuerschaden (de-)aktivieren
|
|
||||||
REGION_FIRE_ENABLED=§cRegions Feuerschaden deaktiviert
|
REGION_FIRE_ENABLED=§cRegions Feuerschaden deaktiviert
|
||||||
REGION_FIRE_DISABLED=§aRegions Feuerschaden aktiviert
|
REGION_FIRE_DISABLED=§aRegions Feuerschaden aktiviert
|
||||||
REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze
|
REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze
|
||||||
REGION_FREEZE_NO_PERMS=§cDu darfst diese Welt nicht einfrieren
|
|
||||||
REGION_FREEZE_ENABLED=§cRegion eingefroren
|
REGION_FREEZE_ENABLED=§cRegion eingefroren
|
||||||
REGION_FREEZE_DISABLED=§aRegion aufgetaut
|
REGION_FREEZE_DISABLED=§aRegion aufgetaut
|
||||||
REGION_ITEMS_HELP=§8/§eitems §8- §7Toggle Items
|
REGION_ITEMS_HELP=§8/§eitems §8- §7Toggle Items
|
||||||
REGION_ITEMS_NO_PERMS=§cDu darfst hier nicht Items (de-)aktivieren
|
|
||||||
REGION_ITEMS_ENABLED=§aItems aktiviert in dieser Region
|
REGION_ITEMS_ENABLED=§aItems aktiviert in dieser Region
|
||||||
REGION_ITEMS_DISABLED=§cItems deaktiviert in dieser Region
|
REGION_ITEMS_DISABLED=§cItems deaktiviert in dieser Region
|
||||||
REGION_ITEMS_DISABLED_GLOBAL=§cItems sind auf dem Server deaktiviert.
|
|
||||||
REGION_PROTECT_HELP=§8/§eprotect §8- §7Schütze die Region
|
REGION_PROTECT_HELP=§8/§eprotect §8- §7Schütze die Region
|
||||||
REGION_PROTECT_DISABLE=§cBoden Schutz aufgehoben
|
REGION_PROTECT_DISABLE=§cBoden Schutz aufgehoben
|
||||||
REGION_PROTECT_ENABLE=§aBoden geschützt
|
REGION_PROTECT_ENABLE=§aBoden geschützt
|
||||||
REGION_PROTECT_NO_PERMS=§cDu darfst hier nicht den Boden schützen
|
|
||||||
REGION_PROTECT_FALSE_REGION=§cDu befindest dich derzeit in keiner (M)WG-Region
|
REGION_PROTECT_FALSE_REGION=§cDu befindest dich derzeit in keiner (M)WG-Region
|
||||||
|
REGION_NO_GRAVITY_HELP = §8/§enogravity §8- §7Toggle NoGravity
|
||||||
|
REGION_NO_GRAVITY_ENABLED = §aNoGravity aktiviert in dieser Region
|
||||||
|
REGION_NO_GRAVITY_DISABLED = §cNoGravity deaktiviert in dieser Region
|
||||||
REGION_REGION_HELP_UNDO=§8/§eregion undo §8- §7Mache die letzten 20 /testblock oder /reset rückgängig
|
REGION_REGION_HELP_UNDO=§8/§eregion undo §8- §7Mache die letzten 20 /testblock oder /reset rückgängig
|
||||||
REGION_REGION_HELP_REDO=§8/§eregion redo §8- §7Wiederhole die letzten 20 §8/§7rg undo
|
REGION_REGION_HELP_REDO=§8/§eregion redo §8- §7Wiederhole die letzten 20 §8/§7rg undo
|
||||||
REGION_REGION_HELP_RESTORE=§8/§eregion restore §8- §7Setzte die Region zurück, ohne das Gebaute zu löschen
|
REGION_REGION_HELP_RESTORE=§8/§eregion restore §8- §7Setzte die Region zurück, ohne das Gebaute zu löschen
|
||||||
@ -767,6 +709,8 @@ REGION_REGION_HELP_COPYPOINT=§8/§eregion copypoint §8- §7Teleportiere dich z
|
|||||||
REGION_REGION_HELP_TESTBLOCKPOINT=§8/§eregion testblockpoint §8- §7Teleportiere dich zum Regions Testblockpunkt
|
REGION_REGION_HELP_TESTBLOCKPOINT=§8/§eregion testblockpoint §8- §7Teleportiere dich zum Regions Testblockpunkt
|
||||||
REGION_REGION_HELP_CHANGESKIN_INFO=§8/§eregion changeskin §8- §7Gebe den Regions Skin aus
|
REGION_REGION_HELP_CHANGESKIN_INFO=§8/§eregion changeskin §8- §7Gebe den Regions Skin aus
|
||||||
REGION_REGION_HELP_CHANGESKIN=§8/§eregion changeskin §8[§7Skin§8] §8- §8Setzte den Regions Skin
|
REGION_REGION_HELP_CHANGESKIN=§8/§eregion changeskin §8[§7Skin§8] §8- §8Setzte den Regions Skin
|
||||||
|
REGION_REGION_HELP_COPY=§8/§eregion copy [-e] [-s] §8- §8Kopieren des Baubereichs optional mit Erweiterungen oder Auswahl am Kopierpunkt
|
||||||
|
REGION_REGION_HELP_PASTE=§8/§eregion paste [-a] [-s] §8[§7Skin§8] §8- §8Einfügen am Kopierpunkt optional ohne Luft und Auswahl des eingefügten Bereichs
|
||||||
REGION_REGION_NOTHING_UNDO=§cNichts zum rückgängig machen
|
REGION_REGION_NOTHING_UNDO=§cNichts zum rückgängig machen
|
||||||
REGION_REGION_UNDID=§7Letzte Aktion rückgangig gemacht
|
REGION_REGION_UNDID=§7Letzte Aktion rückgangig gemacht
|
||||||
REGION_REGION_NOTHING_REDO=§cNichts zum wiederhohlen
|
REGION_REGION_NOTHING_REDO=§cNichts zum wiederhohlen
|
||||||
@ -780,7 +724,9 @@ REGION_REGION_TP_COPY=§7Zum Kopierpunkt teleportiert
|
|||||||
REGION_REGION_TP_TEST_BLOCK=§7Zum Testblock teleportiert
|
REGION_REGION_TP_TEST_BLOCK=§7Zum Testblock teleportiert
|
||||||
REGION_REGION_TP_UNKNOWN=§cNicht definierter Teleportierpunkt
|
REGION_REGION_TP_UNKNOWN=§cNicht definierter Teleportierpunkt
|
||||||
REGION_REGION_NO_REGION=§cDu bist in keiner Region
|
REGION_REGION_NO_REGION=§cDu bist in keiner Region
|
||||||
REGION_REGION_NO_PERMS=§cDu darfst hier nicht die Region verändern
|
REGION_REGION_NO_BUILD=§cDiese Region hat kein Baugebiet
|
||||||
|
REGION_REGION_COPY_DONE=§eBauregion oder Selektion kopiert
|
||||||
|
REGION_REGION_PASTE_DONE=§eBauregion oder Selektion eingefügt
|
||||||
REGION_REGION_CHANGESKIN_INFO=§7Regions Skin ist §e{0}
|
REGION_REGION_CHANGESKIN_INFO=§7Regions Skin ist §e{0}
|
||||||
REGION_REGION_CHANGESKIN_INFO_CREATOR=§7Skin erstellt von §e{0}
|
REGION_REGION_CHANGESKIN_INFO_CREATOR=§7Skin erstellt von §e{0}
|
||||||
REGION_REGION_CHANGESKIN_UNKNOWN=§cRegions Skin ist nicht valide
|
REGION_REGION_CHANGESKIN_UNKNOWN=§cRegions Skin ist nicht valide
|
||||||
@ -792,7 +738,6 @@ REGION_RESET_HELP_RESET=§8/§ereset §8- §7Setzte die Region zurück
|
|||||||
REGION_RESET_HELP_SCHEMATIC=§8/§ereset §8[§7Schematic§8] §8- §7Setzte die Region mit einer Schematic zurück
|
REGION_RESET_HELP_SCHEMATIC=§8/§ereset §8[§7Schematic§8] §8- §7Setzte die Region mit einer Schematic zurück
|
||||||
REGION_RESET_RESETED=§7Region zurückgesetzt
|
REGION_RESET_RESETED=§7Region zurückgesetzt
|
||||||
REGION_RESET_ERROR=§cFehler beim Zurücksetzen der Region
|
REGION_RESET_ERROR=§cFehler beim Zurücksetzen der Region
|
||||||
REGION_RESET_NO_PERMS=§cDu darfst hier nicht die Region zurücksetzen
|
|
||||||
REGION_RESET_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
REGION_RESET_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
||||||
REGION_TB_HELP_RESET=§8/§etestblock §8- §7Setzte den Testblock zurück
|
REGION_TB_HELP_RESET=§8/§etestblock §8- §7Setzte den Testblock zurück
|
||||||
REGION_TB_HELP_RESET_EXTENSION=§8/§etestblock §8[§7ExtensionType§8] §8- §7Setzte den Testblock zurück
|
REGION_TB_HELP_RESET_EXTENSION=§8/§etestblock §8[§7ExtensionType§8] §8- §7Setzte den Testblock zurück
|
||||||
@ -800,63 +745,50 @@ REGION_TB_HELP_SCHEMATIC=§8/§etestblock §8[§7Schematic§8] §8- §7Setzte de
|
|||||||
REGION_TB_HELP_SCHEMATIC_EXTENSION=§8/§etestblock §8[§7Schematic§8] §8[§7ExtensionType§8] §8- §7Setzte den Testblock mit einer Schematic zurück
|
REGION_TB_HELP_SCHEMATIC_EXTENSION=§8/§etestblock §8[§7Schematic§8] §8[§7ExtensionType§8] §8- §7Setzte den Testblock mit einer Schematic zurück
|
||||||
REGION_TB_DONE=§7Testblock zurückgesetzt
|
REGION_TB_DONE=§7Testblock zurückgesetzt
|
||||||
REGION_TB_ERROR=§cFehler beim Zurücksetzen des Testblocks
|
REGION_TB_ERROR=§cFehler beim Zurücksetzen des Testblocks
|
||||||
REGION_TB_NO_PERMS=§cDu darfst hier nicht den Testblock zurücksetzen
|
|
||||||
REGION_TB_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
REGION_TB_NO_REGION=§cDu befindest dich derzeit in keiner Region
|
||||||
|
REGION_TB_NO_SCHEMSHARING=§cDu kannst aktuell keine Schematics teilen bis {0}.
|
||||||
|
REGION_TB_NO_SCHEMRECEIVING=§cDer Besitzer dieses Bauservers kann keine Schematics erhalten bis {0}.
|
||||||
REGION_TNT_HELP=§8/§etnt §8- §7Ändere das TNT verhalten
|
REGION_TNT_HELP=§8/§etnt §8- §7Ändere das TNT verhalten
|
||||||
REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Setzte das TNT verhalten auf einen Modus
|
REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Setzte das TNT verhalten auf einen Modus
|
||||||
REGION_TNT_ON=§aTNT-Schaden aktiviert
|
REGION_TNT_ON=§aTNT-Schaden aktiviert
|
||||||
REGION_TNT_OFF=§cTNT-Schaden deaktiviert
|
REGION_TNT_OFF=§cTNT-Schaden deaktiviert
|
||||||
REGION_TNT_TB=§aTNT-Schaden außerhalb Baurahmen aktiviert
|
REGION_TNT_TB=§aTNT-Schaden außerhalb Baurahmen aktiviert
|
||||||
REGION_TNT_NO_PERMS=§cDu darfst hier nicht TNT-Schaden (de-)aktivieren
|
REGION_TNT_BUILD_DESTROY=§cEine Explosion hätte Blöcke im Baubereich zerstört
|
||||||
REGION_TNT_BUILD=§cEine Explosion hätte Blöcke im Baubereich zerstört
|
REGION_TNT_TB_DESTROY=§cEine Explosion hätte Blöcke im Testblockbereich zerstört
|
||||||
# Team
|
AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 15 Minuten nichts passiert.
|
||||||
LOCK_SCHEM_NO_USER=§7Dieser Spieler existiert nicht!
|
|
||||||
LOCK_SCHEM_NO_SCHEM=§7Dieser Spieler besitzt keine Schematic mit diesem Namen!
|
|
||||||
LOCK_SCHEM_DIR=§7Die angegebene Schematic ist ein Ordner
|
|
||||||
LOCK_SCHEM_LOCKED=§e{0} §7von §e{1} §7wurde von §e{2} §7auf §eNORMAL §7zurück gesetzt.
|
|
||||||
LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] - §7Sperre eine Schematic (Nutzer über Sperrungsgrund informieren!)
|
|
||||||
AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 5 Minuten nichts passiert.
|
|
||||||
AFK_WARNING_MESSAGE=§cDieser Server wird bei weiterer Inaktivität in einer Minute gestoppt
|
AFK_WARNING_MESSAGE=§cDieser Server wird bei weiterer Inaktivität in einer Minute gestoppt
|
||||||
|
|
||||||
SKIN_HELP=§8/§eskin §8[§7Kuerzel§8] §8[§7Creator§8|§epublic§8] §8[§7Name...§8] §8- §7Erstellt die Skin Schematics. 'public' als Creator nutzen für keinen Creator, danach die nachricht an YoyoNow kopieren (mit Click kopieren)
|
SKIN_HELP=§8/§eskin §8[§7Kuerzel§8] §8[§7Creator§8|§epublic§8] §8[§7Name...§8] §8- §7Erstellt die Skin Schematics. 'public' als Creator nutzen für keinen Creator, danach die nachricht an YoyoNow kopieren (mit Click kopieren)
|
||||||
SKIN_NO_REGION=§7Du steht in keiner Region, welche mit einem Skin versehen werden kann
|
SKIN_NO_REGION=§7Du steht in keiner Region, welche mit einem Skin versehen werden kann
|
||||||
SKIN_ALREADY_EXISTS=§cDieser Skin existiert in der Form bereits
|
SKIN_ALREADY_EXISTS=§cDieser Skin existiert in der Form bereits
|
||||||
SKIN_MESSAGE=§7Skin erstellt
|
SKIN_MESSAGE=§7Skin erstellt
|
||||||
SKIN_MESSAGE_HOVER=§eKlicken zum kopieren für YoyoNow und an diesen senden
|
SKIN_MESSAGE_HOVER=§eKlicken zum kopieren für YoyoNow und an diesen senden
|
||||||
|
|
||||||
# Panzern
|
# Panzern
|
||||||
PANZERN_HELP=§8/§epanzern §8[§7Block§8] §8[§7Slab§8] §8- §7Panzer deine WorldEdit Auswahl
|
PANZERN_HELP=§8/§epanzern §8[§7Block§8] §8[§7Slab§8] §8- §7Panzer deine WorldEdit Auswahl
|
||||||
PANZERN_PREPARE1=§71. Gucke nochmal nach, ob Läufe auch bis zur Panzergrenze führen.
|
PANZERN_PREPARE1=§71. Gucke nochmal nach, ob Läufe auch bis zur Panzergrenze führen.
|
||||||
PANZERN_PREPARE2=§72. Teppich in Gänge auf dem Boden vereinfacht das panzern.
|
PANZERN_PREPARE2=§72. Teppich in Gänge auf dem Boden vereinfacht das panzern.
|
||||||
PANZERN_PREPARE3=§73. Schildtechnik sollte explizit eingeschlossen sein.
|
PANZERN_PREPARE3=§73. Schildtechnik sollte explizit eingeschlossen sein.
|
||||||
PANZERN_PREPARE4=§74. Innerhalb der zu panzernden Region zu stehen, beim Befehlausführen kann das Panzern verbessern.
|
PANZERN_PREPARE4=§74. Innerhalb der zu panzernden Region zu stehen, beim Befehlausführen kann das Panzern verbessern.
|
||||||
PANZERN_NO_PERM = §cDu darfst hier nicht das Panzern System verwenden
|
|
||||||
PANZERN_NO_WORLDEDIT=§cDu hast keine WorldEdit Selection
|
PANZERN_NO_WORLDEDIT=§cDu hast keine WorldEdit Selection
|
||||||
PANZERN_PROGRESS=§e{0} §7Blöcke übrig, §e{1} §7Blöcke pro Sekunde, §e{2} §7Block Delta
|
PANZERN_PROGRESS=§e{0} §7Blöcke übrig, §e{1} §7Blöcke pro Sekunde, §e{2} §7Block Delta
|
||||||
PANZERN_DONE=§aZuende gepanzert
|
PANZERN_DONE=§aZuende gepanzert
|
||||||
|
|
||||||
# Laufbau
|
# Laufbau
|
||||||
LAUFBAU_HELP=§8/§elaufbau §8[§7smallest§8|§7blastresistant§8] §8- §7Baue einen Lauf in deiner WorldEdit Auswahl mit den Traces
|
LAUFBAU_HELP=§8/§elaufbau §8[§7smallest§8|§7blastresistant§8] §8- §7Baue einen Lauf in deiner WorldEdit Auswahl mit den Traces
|
||||||
LAUFBAU_HELP_SETTINGS=§8/§elaufbau settings §8- §7Öffnet die Settings GUI
|
LAUFBAU_HELP_SETTINGS=§8/§elaufbau settings §8- §7Öffnet die Settings GUI
|
||||||
LAUFBAU_PREPARE1=§71. Trace die Kanonen so oft wie nötig, in allen Modi.
|
LAUFBAU_PREPARE1=§71. Trace die Kanonen so oft wie nötig, in allen Modi.
|
||||||
LAUFBAU_PREPARE2=§72. Versuche alle Fails aus dem Trace zu löschen.
|
LAUFBAU_PREPARE2=§72. Versuche alle Fails aus dem Trace zu löschen.
|
||||||
LAUFBAU_NO_PERM = §cDu darfst hier nicht das Laufbau System verwenden
|
|
||||||
LAUFBAU_NO_WORLDEDIT=§cDu hast keine WorldEdit Selection
|
LAUFBAU_NO_WORLDEDIT=§cDu hast keine WorldEdit Selection
|
||||||
LAUFBAU_STATE_FILTERING_TRACES=Traces filtern
|
LAUFBAU_STATE_FILTERING_TRACES=Traces filtern
|
||||||
LAUFBAU_STATE_PROCESSING_TRACES=Traces verbinden
|
LAUFBAU_STATE_PROCESSING_TRACES=Traces verbinden
|
||||||
LAUFBAU_STATE_CREATE_LAUF=Lauf erstellen
|
LAUFBAU_STATE_CREATE_LAUF=Lauf erstellen
|
||||||
LAUFBAU_SIMPLE_PROGRESS=§e{0}§8: §e{1}§8/§e{2} §7Übrige Zeit §8: §e{3}
|
LAUFBAU_SIMPLE_PROGRESS=§e{0}§8: §e{1}§8/§e{2} §7Übrige Zeit §8: §e{3}
|
||||||
LAUFBAU_DONE=§aZuende gebaut
|
LAUFBAU_DONE=§aZuende gebaut
|
||||||
|
|
||||||
LAUFBAU_SETTINGS_GUI_NAME=§eLaufbau
|
LAUFBAU_SETTINGS_GUI_NAME=§eLaufbau
|
||||||
LAUFBAU_SETTINGS_ACTIVE=§aAktiv
|
LAUFBAU_SETTINGS_ACTIVE=§aAktiv
|
||||||
LAUFBAU_SETTINGS_INACTIVE=§cInaktiv
|
LAUFBAU_SETTINGS_INACTIVE=§cInaktiv
|
||||||
LAUFBAU_SETTINGS_MIXED=§e{0}§8/§e{1} §aAktiv
|
LAUFBAU_SETTINGS_MIXED=§e{0}§8/§e{1} §aAktiv
|
||||||
LAUFBAU_SETTINGS_GUI_BACK=§eBack
|
LAUFBAU_SETTINGS_GUI_BACK=§eBack
|
||||||
|
|
||||||
LAUFBAU_SETTINGS_TOGGLE=§eClick §8-§7 Toggle
|
LAUFBAU_SETTINGS_TOGGLE=§eClick §8-§7 Toggle
|
||||||
LAUFBAU_SETTINGS_ADVANCED=§eMiddle-Click §8-§7 Erweiterte Einstellung
|
LAUFBAU_SETTINGS_ADVANCED=§eMiddle-Click §8-§7 Erweiterte Einstellung
|
||||||
|
|
||||||
LAUFBAU_BLOCK_COBWEB=§eCobweb
|
LAUFBAU_BLOCK_COBWEB=§eCobweb
|
||||||
LAUFBAU_BLOCK_GRASS_PATH=§eGrass Path
|
LAUFBAU_BLOCK_GRASS_PATH=§eGrass Path
|
||||||
LAUFBAU_BLOCK_SOUL_SAND=§eSoul Sand
|
LAUFBAU_BLOCK_SOUL_SAND=§eSoul Sand
|
||||||
@ -895,39 +827,31 @@ LAUFBAU_BLOCK_AZALEA = §eAzalea
|
|||||||
LAUFBAU_BLOCK_CANDLE=§eKerze
|
LAUFBAU_BLOCK_CANDLE=§eKerze
|
||||||
LAUFBAU_BLOCK_CANDLE_CAKE=§eKuchen mit Kerze
|
LAUFBAU_BLOCK_CANDLE_CAKE=§eKuchen mit Kerze
|
||||||
LAUFBAU_BLOCK_LECTERN=§eLectern
|
LAUFBAU_BLOCK_LECTERN=§eLectern
|
||||||
|
|
||||||
LAUFBAU_FACING_NORTH=§8-§7 Richtung Norden
|
LAUFBAU_FACING_NORTH=§8-§7 Richtung Norden
|
||||||
LAUFBAU_FACING_SOUTH=§8-§7 Richtung Süden
|
LAUFBAU_FACING_SOUTH=§8-§7 Richtung Süden
|
||||||
LAUFBAU_FACING_WEST=§8-§7 Richtung Westen
|
LAUFBAU_FACING_WEST=§8-§7 Richtung Westen
|
||||||
LAUFBAU_FACING_EAST=§8-§7 Richtung Osten
|
LAUFBAU_FACING_EAST=§8-§7 Richtung Osten
|
||||||
LAUFBAU_FACING_UP=§8-§7 Richtung Oben
|
LAUFBAU_FACING_UP=§8-§7 Richtung Oben
|
||||||
LAUFBAU_FACING_DOWN=§8-§7 Richtung Unten
|
LAUFBAU_FACING_DOWN=§8-§7 Richtung Unten
|
||||||
|
|
||||||
LAUFBAU_COUNT_1=§8-§7 Anzahl 1
|
LAUFBAU_COUNT_1=§8-§7 Anzahl 1
|
||||||
LAUFBAU_COUNT_2=§8-§7 Anzahl 2
|
LAUFBAU_COUNT_2=§8-§7 Anzahl 2
|
||||||
LAUFBAU_COUNT_3=§8-§7 Anzahl 3
|
LAUFBAU_COUNT_3=§8-§7 Anzahl 3
|
||||||
LAUFBAU_COUNT_4=§8-§7 Anzahl 4
|
LAUFBAU_COUNT_4=§8-§7 Anzahl 4
|
||||||
|
|
||||||
LAUFBAU_LAYERS_8=§8-§7 Ebenen 8
|
LAUFBAU_LAYERS_8=§8-§7 Ebenen 8
|
||||||
LAUFBAU_LAYERS_7=§8-§7 Ebenen 7
|
LAUFBAU_LAYERS_7=§8-§7 Ebenen 7
|
||||||
LAUFBAU_LAYERS_6=§8-§7 Ebenen 6
|
LAUFBAU_LAYERS_6=§8-§7 Ebenen 6
|
||||||
LAUFBAU_LAYERS_3=§8-§7 Ebenen 3
|
LAUFBAU_LAYERS_3=§8-§7 Ebenen 3
|
||||||
LAUFBAU_LAYERS_2=§8-§7 Ebenen 2
|
LAUFBAU_LAYERS_2=§8-§7 Ebenen 2
|
||||||
|
|
||||||
LAUFBAU_TYPE_BOTTOM=§8-§7 Type Unten
|
LAUFBAU_TYPE_BOTTOM=§8-§7 Type Unten
|
||||||
LAUFBAU_TYPE_TOP=§8-§7 Type Oben
|
LAUFBAU_TYPE_TOP=§8-§7 Type Oben
|
||||||
|
|
||||||
LAUFBAU_HALF_BOTTOM=§8-§7 Hälfte Unten
|
LAUFBAU_HALF_BOTTOM=§8-§7 Hälfte Unten
|
||||||
LAUFBAU_HALF_TOP=§8-§7 Hälfte Oben
|
LAUFBAU_HALF_TOP=§8-§7 Hälfte Oben
|
||||||
|
|
||||||
LAUFBAU_OPEN=§8-§7 Geöffnet
|
LAUFBAU_OPEN=§8-§7 Geöffnet
|
||||||
|
|
||||||
LAUFBAU_ATTACHMENT_CEILING=§8-§7 Befestigung Decke
|
LAUFBAU_ATTACHMENT_CEILING=§8-§7 Befestigung Decke
|
||||||
LAUFBAU_ATTACHMENT_FLOOR=§8-§7 Befestigung Boden
|
LAUFBAU_ATTACHMENT_FLOOR=§8-§7 Befestigung Boden
|
||||||
LAUFBAU_ATTACHMENT_DOUBLE_WALL=§8-§7 Befestigung beidseitige Wand
|
LAUFBAU_ATTACHMENT_DOUBLE_WALL=§8-§7 Befestigung beidseitige Wand
|
||||||
LAUFBAU_ATTACHMENT_SINGLE_WALL=§8-§7 Befestigung einseitige Wand
|
LAUFBAU_ATTACHMENT_SINGLE_WALL=§8-§7 Befestigung einseitige Wand
|
||||||
LAUFBAU_ATTACHMENT_WALL=§8-§7 Befestigung Wand
|
LAUFBAU_ATTACHMENT_WALL=§8-§7 Befestigung Wand
|
||||||
|
|
||||||
LAUFBAU_CONNECTION_FLOOR=§8-§7 Verbindung Boden
|
LAUFBAU_CONNECTION_FLOOR=§8-§7 Verbindung Boden
|
||||||
LAUFBAU_CONNECTION_NORTH=§8-§7 Verbindung Norden
|
LAUFBAU_CONNECTION_NORTH=§8-§7 Verbindung Norden
|
||||||
LAUFBAU_CONNECTION_SOUTH=§8-§7 Verbindung Süden
|
LAUFBAU_CONNECTION_SOUTH=§8-§7 Verbindung Süden
|
||||||
@ -935,29 +859,22 @@ LAUFBAU_CONNECTION_EAST = §8-§7 Verbindung Osten
|
|||||||
LAUFBAU_CONNECTION_WEST=§8-§7 Verbindung Westen
|
LAUFBAU_CONNECTION_WEST=§8-§7 Verbindung Westen
|
||||||
LAUFBAU_CONNECTION_DOWN=§8-§7 Verbindung Unten
|
LAUFBAU_CONNECTION_DOWN=§8-§7 Verbindung Unten
|
||||||
LAUFBAU_CONNECTION_UP=§8-§7 Verbindung Oben
|
LAUFBAU_CONNECTION_UP=§8-§7 Verbindung Oben
|
||||||
|
|
||||||
LAUFBAU_HANGING=§8-§7 hängend
|
LAUFBAU_HANGING=§8-§7 hängend
|
||||||
|
|
||||||
LAUFBAU_SHAPE_STRAIGHT=§8-§7 Form gerade
|
LAUFBAU_SHAPE_STRAIGHT=§8-§7 Form gerade
|
||||||
LAUFBAU_SHAPE_OUTER_LEFT=§8-§7 Form äußere links
|
LAUFBAU_SHAPE_OUTER_LEFT=§8-§7 Form äußere links
|
||||||
LAUFBAU_SHAPE_INNER_LEFT=§8-§7 Form innere links
|
LAUFBAU_SHAPE_INNER_LEFT=§8-§7 Form innere links
|
||||||
|
|
||||||
LAUFBAU_TILT_NONE=§8-§7 Neigung keine
|
LAUFBAU_TILT_NONE=§8-§7 Neigung keine
|
||||||
LAUFBAU_TILT_PARTIAL=§8-§7 Neigung teilweise
|
LAUFBAU_TILT_PARTIAL=§8-§7 Neigung teilweise
|
||||||
|
|
||||||
# UTILS
|
# UTILS
|
||||||
SELECT_HELP=§8/§eselect §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus
|
SELECT_HELP=§8/§eselect §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus
|
||||||
SELECT_EXTENSION_HELP=§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension
|
SELECT_EXTENSION_HELP=§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension
|
||||||
SELECT_NO_PERMS = §cDu darfst hier nicht den Select Befehl verwenden
|
|
||||||
SELECT_GLOBAL_REGION=§cDie globale Region kannst du nicht auswählen
|
SELECT_GLOBAL_REGION=§cDie globale Region kannst du nicht auswählen
|
||||||
SELECT_NO_TYPE=§cDiese Region hat keinen {0}
|
SELECT_NO_TYPE=§cDiese Region hat keinen {0}
|
||||||
SELECT_NO_EXTENSION=§cDiese Region hat keine Ausfahrmaße
|
SELECT_NO_EXTENSION=§cDiese Region hat keine Ausfahrmaße
|
||||||
SELECT_MESSAGE=§7WorldEdit auswahl auf {0}, {1}, {2} und {3}, {4}, {5} gesetzt
|
SELECT_MESSAGE=§7WorldEdit auswahl auf {0}, {1}, {2} und {3}, {4}, {5} gesetzt
|
||||||
|
|
||||||
SKULL_HELP=§8/§eskull §8[§eSpieler§8] §8-§7 Gibt einen SpielerKopf
|
SKULL_HELP=§8/§eskull §8[§eSpieler§8] §8-§7 Gibt einen SpielerKopf
|
||||||
SKULL_INVALID=§cUngültiger Spieler
|
SKULL_INVALID=§cUngültiger Spieler
|
||||||
SKULL_ITEM=§e{0}§8s Kopf
|
SKULL_ITEM=§e{0}§8s Kopf
|
||||||
|
|
||||||
SPEED_HELP=§8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Setzte deine Flug- und Laufgeschindigkeit.
|
SPEED_HELP=§8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Setzte deine Flug- und Laufgeschindigkeit.
|
||||||
SPEED_CURRENT=§7Aktuelle geschwindigkeit§8: §e{0}
|
SPEED_CURRENT=§7Aktuelle geschwindigkeit§8: §e{0}
|
||||||
SPEED_TOO_SMALL=§c{0} ist zu klein
|
SPEED_TOO_SMALL=§c{0} ist zu klein
|
||||||
@ -965,11 +882,9 @@ SPEED_TOO_HIGH = §c{0} ist zu hoch
|
|||||||
SPEED_ITEM=§eGeschwindigkeit
|
SPEED_ITEM=§eGeschwindigkeit
|
||||||
SPEED_ITEM_LORE=§7Aktuell: §e
|
SPEED_ITEM_LORE=§7Aktuell: §e
|
||||||
SPEED_TAB_NAME=Geschwindigkeit eingeben
|
SPEED_TAB_NAME=Geschwindigkeit eingeben
|
||||||
|
|
||||||
WORLDEDIT_WAND=WorldEdit Wand
|
WORLDEDIT_WAND=WorldEdit Wand
|
||||||
WORLDEDIT_LEFTCLICK=Left click: select pos #1
|
WORLDEDIT_LEFTCLICK=Left click: select pos #1
|
||||||
WORLDEDIT_RIGHTCLICK=Right click: select pos #2
|
WORLDEDIT_RIGHTCLICK=Right click: select pos #2
|
||||||
|
|
||||||
TNT_CLICK_HEADER=§8---=== §eTNT §8===---
|
TNT_CLICK_HEADER=§8---=== §eTNT §8===---
|
||||||
TNT_CLICK_ORDER=§eEntity Order§8: §e{0}
|
TNT_CLICK_ORDER=§eEntity Order§8: §e{0}
|
||||||
TNT_CLICK_FUSE_TIME=§eFuseTime§8: §e{0}
|
TNT_CLICK_FUSE_TIME=§eFuseTime§8: §e{0}
|
||||||
@ -991,16 +906,12 @@ SELECT_ITEM_RIGHT_CLICK=§7Rechtklick zum ändern
|
|||||||
SELECT_ITEM_BAURAHMEN=§eBaurahmen
|
SELECT_ITEM_BAURAHMEN=§eBaurahmen
|
||||||
SELECT_ITEM_BAUPLATTFORM=§eBauplattform
|
SELECT_ITEM_BAUPLATTFORM=§eBauplattform
|
||||||
SELECT_ITEM_TESTBLOCK=§eTestblock
|
SELECT_ITEM_TESTBLOCK=§eTestblock
|
||||||
|
|
||||||
CHESTFILLER_FILLED=§eKiste gefüllt
|
CHESTFILLER_FILLED=§eKiste gefüllt
|
||||||
|
|
||||||
PISTON_HELP_1=§7Rechts Klick auf Piston mit einem Slime Ball berechnet dir die bewegten Blöcke.
|
PISTON_HELP_1=§7Rechts Klick auf Piston mit einem Slime Ball berechnet dir die bewegten Blöcke.
|
||||||
PISTON_HELP_2=§7Die Anzahl ist Rot, wenn ein unmovable Block vorhanden ist.
|
PISTON_HELP_2=§7Die Anzahl ist Rot, wenn ein unmovable Block vorhanden ist.
|
||||||
PISTON_HELP_3=§7Die Anzahl ist Gelb, wenn zu viele Blöcke vorhanden sind.
|
PISTON_HELP_3=§7Die Anzahl ist Gelb, wenn zu viele Blöcke vorhanden sind.
|
||||||
PISTON_INFO=§7Bewegte Blöcke {0}{1}§8/§712
|
PISTON_INFO=§7Bewegte Blöcke {0}{1}§8/§712
|
||||||
|
|
||||||
# Warp
|
# Warp
|
||||||
WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen
|
|
||||||
WARP_LOC_X=§7X§8: §e{0}
|
WARP_LOC_X=§7X§8: §e{0}
|
||||||
WARP_LOC_Y=§7Y§8: §e{0}
|
WARP_LOC_Y=§7Y§8: §e{0}
|
||||||
WARP_LOC_Z=§7Z§8: §e{0}
|
WARP_LOC_Z=§7Z§8: §e{0}
|
||||||
@ -1023,33 +934,22 @@ WARP_HELP_INFO=§8/§ewarp info §8[§7Name§8] §8- §7Infos zu einem Punkt
|
|||||||
WARP_HELP_DELETE=§8/§ewarp delete §8[§7Name§8] §8- §7Lösche einen Warp
|
WARP_HELP_DELETE=§8/§ewarp delete §8[§7Name§8] §8- §7Lösche einen Warp
|
||||||
WARP_HELP_GUI=§8/§ewarp gui §8- §7Öffne die Warp-GUI
|
WARP_HELP_GUI=§8/§ewarp gui §8- §7Öffne die Warp-GUI
|
||||||
WARP_HELP_LIST=§8/§ewarp list §8- §7Liste alle Warp-Punkt auf
|
WARP_HELP_LIST=§8/§ewarp list §8- §7Liste alle Warp-Punkt auf
|
||||||
|
|
||||||
# WORLD
|
# WORLD
|
||||||
STOP_HELP=§8/§estop §8- §7Stoppt den Server
|
STOP_HELP=§8/§estop §8- §7Stoppt den Server
|
||||||
STOP_NO_PERMS = §cDu hast keine Rechte den Server zu stoppen
|
|
||||||
STOP_MESSAGE=§eDer Server wird gestoppt
|
STOP_MESSAGE=§eDer Server wird gestoppt
|
||||||
WORLD_EDIT_NO_PERMS = §cDu darfst hier kein WorldEdit benutzen
|
|
||||||
|
|
||||||
KICKALL_HELP=§8/§ekickall §8- §7Kickt alle Spieler vom Server außer den Owner
|
KICKALL_HELP=§8/§ekickall §8- §7Kickt alle Spieler vom Server außer den Owner
|
||||||
KICKALL_NO_PERM = §cDies ist nicht deine Welt!
|
|
||||||
|
|
||||||
# Techhider
|
# Techhider
|
||||||
TECHHIDER_HELP=§8/§etechhider §8- §7Techhider umschalten
|
TECHHIDER_HELP=§8/§etechhider §8- §7Techhider umschalten
|
||||||
TECHHIDER_GLOBAL=§cKein Techhider in der globalen region
|
TECHHIDER_GLOBAL=§cKein Techhider in der globalen region
|
||||||
TECHHIDER_ON=§aTechhider aktiviert
|
TECHHIDER_ON=§aTechhider aktiviert
|
||||||
TECHHIDER_OFF=§cTechHider deaktiviert
|
TECHHIDER_OFF=§cTechHider deaktiviert
|
||||||
|
|
||||||
# XRAY
|
# XRAY
|
||||||
XRAY_HELP=§8/§exray §8- §7Xray umschalten
|
XRAY_HELP=§8/§exray §8- §7Xray umschalten
|
||||||
XRAY_GLOBAL=§cKein Xray in der globalen region
|
XRAY_GLOBAL=§cKein Xray in der globalen region
|
||||||
XRAY_ON=§aXray aktiviert
|
XRAY_ON=§aXray aktiviert
|
||||||
XRAY_OFF=§cXray deaktiviert
|
XRAY_OFF=§cXray deaktiviert
|
||||||
|
|
||||||
|
|
||||||
# WorldEdit
|
# WorldEdit
|
||||||
COLORREPLACE_HELP=§8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Ersetzt eine Farbe mit einer anderen
|
COLORREPLACE_HELP=§8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Ersetzt eine Farbe mit einer anderen
|
||||||
|
|
||||||
TYPEREPLACE_HELP=§8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Ersetzt einen Blockgruppe mit einer anderen
|
TYPEREPLACE_HELP=§8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Ersetzt einen Blockgruppe mit einer anderen
|
||||||
|
|
||||||
# Schematics
|
# Schematics
|
||||||
SCHEMATIC_GUI_ITEM=§eSchematics
|
SCHEMATIC_GUI_ITEM=§eSchematics
|
||||||
|
@ -21,19 +21,20 @@ package de.steamwar.bausystem;
|
|||||||
|
|
||||||
import com.comphenix.tinyprotocol.TinyProtocol;
|
import com.comphenix.tinyprotocol.TinyProtocol;
|
||||||
import de.steamwar.bausystem.configplayer.Config;
|
import de.steamwar.bausystem.configplayer.Config;
|
||||||
import de.steamwar.bausystem.features.tpslimit.FreezeUtils;
|
import de.steamwar.bausystem.features.tpslimit.TPSFreezeUtils;
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSLimitUtils;
|
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSWarpUtils;
|
|
||||||
import de.steamwar.bausystem.features.world.RamUsage;
|
|
||||||
import de.steamwar.bausystem.linkage.LinkageUtils;
|
import de.steamwar.bausystem.linkage.LinkageUtils;
|
||||||
import de.steamwar.bausystem.region.loader.PrototypeLoader;
|
import de.steamwar.bausystem.region.loader.PrototypeLoader;
|
||||||
import de.steamwar.bausystem.region.loader.RegionLoader;
|
import de.steamwar.bausystem.region.loader.RegionLoader;
|
||||||
|
import de.steamwar.bausystem.region.loader.Updater;
|
||||||
|
import de.steamwar.bausystem.utils.TickListener;
|
||||||
import de.steamwar.bausystem.worlddata.WorldData;
|
import de.steamwar.bausystem.worlddata.WorldData;
|
||||||
|
import de.steamwar.command.AbstractValidator;
|
||||||
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.message.Message;
|
import de.steamwar.message.Message;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
@ -51,16 +52,13 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
// This should be treated as final!
|
// This should be treated as final!
|
||||||
public static Message MESSAGE;
|
public static Message MESSAGE;
|
||||||
|
public static final boolean DEV_SERVER = !System.getProperty("user.home").endsWith("minecraft");
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private static BauSystem instance;
|
private static BauSystem instance;
|
||||||
|
|
||||||
private World world;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
world = Bukkit.getWorlds().get(0);
|
|
||||||
|
|
||||||
// LOGGER
|
// LOGGER
|
||||||
fixLogging();
|
fixLogging();
|
||||||
|
|
||||||
@ -75,36 +73,48 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||||
Bukkit.shutdown();
|
Bukkit.shutdown();
|
||||||
|
System.exit(1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkageUtils.link();
|
new Updater(PrototypeLoader.file, PrototypeLoader::load);
|
||||||
RamUsage.init();
|
new Updater(RegionLoader.file, RegionLoader::load);
|
||||||
|
|
||||||
|
SWCommandUtils.addValidator(Player.class, validator(Permission.BUILD));
|
||||||
|
SWCommandUtils.addValidator(CommandSender.class, validator(Permission.BUILD));
|
||||||
|
SWCommandUtils.addValidator("supervisor", validator(Permission.SUPERVISOR));
|
||||||
|
SWCommandUtils.addValidator("owner", validator(Permission.OWNER));
|
||||||
|
|
||||||
// This could disable any watchdog stuff. We need to investigate if this is a problem.
|
|
||||||
/*
|
|
||||||
Thread thread = new Thread(() -> {
|
|
||||||
while (true) {
|
|
||||||
WatchdogThread.tick();
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
LinkageUtils.link();
|
||||||
} catch (InterruptedException e) {
|
} catch (Exception e) {
|
||||||
Thread.currentThread().interrupt();
|
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||||
|
Bukkit.shutdown();
|
||||||
|
System.exit(1);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
TickListener.impl.init();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
thread.setName("WatchdogThread ticker");
|
private <T extends CommandSender> AbstractValidator<T, ?> validator(Permission permission) {
|
||||||
thread.setDaemon(true);
|
return (commandSender, object, messageSender) -> {
|
||||||
thread.start();
|
if (commandSender instanceof Player) {
|
||||||
*/
|
if (permission.hasPermission((Player) commandSender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
messageSender.send("NO_PERMISSION");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
LinkageUtils.unlink();
|
LinkageUtils.unlink();
|
||||||
|
|
||||||
WorldData.getInstance().save();
|
WorldData.write();
|
||||||
Config.saveAll();
|
Config.getInstance().saveAll();
|
||||||
TinyProtocol.instance.close();
|
TinyProtocol.instance.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +145,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (FreezeUtils.isFrozen()) return;
|
if (TPSFreezeUtils.isFrozen()) return;
|
||||||
if (counter >= delay) {
|
if (counter >= delay) {
|
||||||
runnable.run();
|
runnable.run();
|
||||||
cancel();
|
cancel();
|
||||||
@ -153,7 +163,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (FreezeUtils.isFrozen()) return;
|
if (TPSFreezeUtils.isFrozen()) return;
|
||||||
if (counter >= (first ? delay : period)) {
|
if (counter >= (first ? delay : period)) {
|
||||||
first = false;
|
first = false;
|
||||||
runnable.run();
|
runnable.run();
|
||||||
|
@ -20,72 +20,77 @@
|
|||||||
package de.steamwar.bausystem;
|
package de.steamwar.bausystem;
|
||||||
|
|
||||||
import de.steamwar.bausystem.config.BauServer;
|
import de.steamwar.bausystem.config.BauServer;
|
||||||
import de.steamwar.command.CommandMetaData;
|
import de.steamwar.bausystem.features.world.BauMemberUpdate;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
||||||
import de.steamwar.sql.BauweltMember;
|
import de.steamwar.sql.BauweltMember;
|
||||||
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.util.HashSet;
|
||||||
import java.lang.annotation.Retention;
|
import java.util.Set;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum Permission {
|
public enum Permission {
|
||||||
|
|
||||||
WORLD(BauweltMember::isWorld),
|
OWNER(bauweltMember -> false),
|
||||||
WORLDEDIT(BauweltMember::isWorldEdit),
|
SUPERVISOR(bauweltMember -> {
|
||||||
MEMBER(bauweltMember -> true),
|
return bauweltMember.isSupervisor();
|
||||||
OWNER(bauweltMember -> false);
|
}),
|
||||||
|
BUILD(bauweltMember -> {
|
||||||
|
if (isTempOnlySpectator(bauweltMember)) return false;
|
||||||
|
return bauweltMember.isBuild() || SUPERVISOR.permissionPredicate.test(bauweltMember);
|
||||||
|
}),
|
||||||
|
/**
|
||||||
|
* Only used for {@link BauMemberUpdate}
|
||||||
|
*/
|
||||||
|
REAL_SPECTATOR(bauweltMember -> {
|
||||||
|
return !bauweltMember.isBuild() && !bauweltMember.isSupervisor();
|
||||||
|
}),
|
||||||
|
/**
|
||||||
|
* Primarily used for {@link de.steamwar.bausystem.linkage.specific.GuiItem}
|
||||||
|
*/
|
||||||
|
MEMBER(bauweltMember -> {
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
private static final Set<Integer> TEMP_ONLY_SPECTATOR = new HashSet<>();
|
||||||
|
|
||||||
|
private static boolean isTempOnlySpectator(BauweltMember bauweltMember) {
|
||||||
|
return TEMP_ONLY_SPECTATOR.contains(bauweltMember.getMemberID());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isTempOnlySpectator(Player player) {
|
||||||
|
return TEMP_ONLY_SPECTATOR.contains(SteamwarUser.get(player.getUniqueId()).getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void forceOnlySpectator(Player player) {
|
||||||
|
TEMP_ONLY_SPECTATOR.add(SteamwarUser.get(player.getUniqueId()).getId());
|
||||||
|
BauMemberUpdate.baumemberUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only used by {@link BauMemberUpdate}
|
||||||
|
*/
|
||||||
|
public static void removeForceOnlySpectator(Player player) {
|
||||||
|
TEMP_ONLY_SPECTATOR.remove(SteamwarUser.get(player.getUniqueId()).getId());
|
||||||
|
}
|
||||||
|
|
||||||
private final Predicate<BauweltMember> permissionPredicate;
|
private final Predicate<BauweltMember> permissionPredicate;
|
||||||
|
|
||||||
|
public boolean hasPermission(BauweltMember bauweltMember) {
|
||||||
|
if (bauweltMember == null) return false;
|
||||||
|
return permissionPredicate.test(bauweltMember);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean hasPermission(Player member) {
|
public boolean hasPermission(Player member) {
|
||||||
if (member.getUniqueId().equals(BauServer.getInstance().getOwner())) {
|
if (SteamwarUser.get(member.getUniqueId()).getId() == BauServer.getInstance().getOwnerID()) {
|
||||||
return true;
|
return this != REAL_SPECTATOR;
|
||||||
}
|
|
||||||
|
|
||||||
BauweltMember bauMember = BauweltMember.getBauMember(BauServer.getInstance().getOwner(), member.getUniqueId());
|
|
||||||
if (bauMember == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return permissionPredicate.test(bauMember);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean hasPermission(Player member, Permission permission) {
|
|
||||||
return permission.hasPermission(member);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Target(ElementType.PARAMETER)
|
|
||||||
@CommandMetaData.Parameter({Player.class})
|
|
||||||
@CommandMetaData.ImplicitValidator(handler = Perm.Handler.class, order = -10)
|
|
||||||
public @interface Perm {
|
|
||||||
Permission value();
|
|
||||||
String message() default "";
|
|
||||||
|
|
||||||
class Handler implements TypeValidator<Player> {
|
|
||||||
|
|
||||||
private Permission permission;
|
|
||||||
private String message;
|
|
||||||
|
|
||||||
public Handler(Perm perm) {
|
|
||||||
this.permission = perm.value();
|
|
||||||
this.message = perm.message();
|
|
||||||
if (message != null && message.isEmpty()) message = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean validate(CommandSender commandSender, Player player, MessageSender messageSender) {
|
|
||||||
if (message == null) {
|
|
||||||
return permission.hasPermission(player);
|
|
||||||
}
|
|
||||||
return !messageSender.send(!permission.hasPermission((Player) commandSender), message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
BauweltMember bauweltMember = BauweltMember.getBauMember(BauServer.getInstance().getOwner(), member.getUniqueId());
|
||||||
|
if (bauweltMember == null) return this == REAL_SPECTATOR;
|
||||||
|
return permissionPredicate.test(bauweltMember);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2023 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.config;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Target({ElementType.FIELD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface ConfigField {
|
|
||||||
boolean required() default false;
|
|
||||||
}
|
|
@ -1,95 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2023 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.config;
|
|
||||||
|
|
||||||
import de.steamwar.sql.UserConfig;
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
|
||||||
|
|
||||||
import java.io.StringReader;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class YamlConfig implements ConfigurationSerializable {
|
|
||||||
|
|
||||||
public static void register(Class<? extends YamlConfig> configType) {
|
|
||||||
ConfigurationSerialization.registerClass(configType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YamlConfiguration fromUserConfig(UUID uuid, String name) {
|
|
||||||
String config = UserConfig.getConfig(uuid, name);
|
|
||||||
if(config == null)
|
|
||||||
return new YamlConfiguration();
|
|
||||||
|
|
||||||
return YamlConfiguration.loadConfiguration(new StringReader(config));
|
|
||||||
}
|
|
||||||
|
|
||||||
public YamlConfig() {}
|
|
||||||
|
|
||||||
public YamlConfig(ConfigurationSection configuration) {
|
|
||||||
this(configuration.getValues(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
public YamlConfig(Map<String, Object> map) {
|
|
||||||
Arrays.stream(getClass().getDeclaredFields())
|
|
||||||
.filter(field -> field.isAnnotationPresent(ConfigField.class))
|
|
||||||
.forEach(field -> {
|
|
||||||
String name = field.getName();
|
|
||||||
try {
|
|
||||||
field.setAccessible(true);
|
|
||||||
field.set(this, map.containsKey(name) ? map.get(name) : getClass().getDeclaredField(name.toUpperCase() + "_DEFAULT").get(null));
|
|
||||||
} catch (NoSuchFieldException e) {
|
|
||||||
if(field.getAnnotation(ConfigField.class).required())
|
|
||||||
throw new IllegalStateException(getClass().getName() + "." + field.getName() + " is required", e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new IllegalStateException(getClass().getName() + "." + field.getName() + " is inaccessible for deserializer", e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> serialize() {
|
|
||||||
return Arrays.stream(getClass().getDeclaredFields())
|
|
||||||
.filter(field -> field.isAnnotationPresent(ConfigField.class))
|
|
||||||
.collect(Collectors.toMap(
|
|
||||||
Field::getName,
|
|
||||||
field -> {
|
|
||||||
try {
|
|
||||||
field.setAccessible(true);
|
|
||||||
return field.get(this);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new IllegalStateException(getClass().getName() + "." + field.getName() + " is inaccessible for serializer", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
public YamlConfiguration toYaml() {
|
|
||||||
YamlConfiguration config = new YamlConfiguration();
|
|
||||||
for(Map.Entry<String, Object> entry : serialize().entrySet())
|
|
||||||
config.set(entry.getKey(), entry.getValue());
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
}
|
|
@ -19,120 +19,129 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.configplayer;
|
package de.steamwar.bausystem.configplayer;
|
||||||
|
|
||||||
import de.steamwar.bausystem.config.ConfigField;
|
import de.steamwar.bausystem.configplayer.serializer.ConfigurationSerializableSerializer;
|
||||||
import de.steamwar.bausystem.config.YamlConfig;
|
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import de.steamwar.sql.UserConfig;
|
import de.steamwar.sql.UserConfig;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
import yapion.hierarchy.output.StringOutput;
|
||||||
|
import yapion.hierarchy.types.YAPIONObject;
|
||||||
|
import yapion.parser.YAPIONParser;
|
||||||
|
import yapion.serializing.SerializeManager;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.logging.Level;
|
||||||
public class Config extends YamlConfig {
|
|
||||||
|
|
||||||
private static final Map<UUID, Config> playerConfigurations = new HashMap<>();
|
|
||||||
|
|
||||||
public static Config get(Player player) { //TODO: NULL
|
|
||||||
return playerConfigurations.computeIfAbsent(player.getUniqueId(), uuid -> new Config(uuid, fromUserConfig(uuid, "bausystem")));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void saveAll() {
|
|
||||||
playerConfigurations.forEach((uuid, config) -> config.save());
|
|
||||||
playerConfigurations.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private final UUID uuid;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigField
|
|
||||||
private boolean nightvision;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigField
|
|
||||||
private boolean simulatorAutoTrace;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigField
|
|
||||||
private boolean detonatorAutostart;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigField
|
|
||||||
private boolean blockCounter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigField
|
|
||||||
private boolean smartPlace;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigField
|
|
||||||
private boolean inventoryFill;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@ConfigField
|
|
||||||
private final Map<String, Integer> baugui = new HashMap<>();
|
|
||||||
|
|
||||||
private Config(UUID uuid, ConfigurationSection configuration) {
|
|
||||||
super(configuration);
|
|
||||||
this.uuid = uuid;
|
|
||||||
|
|
||||||
if(baugui.isEmpty()) {
|
|
||||||
// 0: ? | 1: ? | 2: 10 | 3: 3 | 4: 7 | 5: 17 | 6: 15 | 7: ? | 8: ?
|
|
||||||
// 9: 5 | 10: ? | 11: ? | 12: ? | 13: ? | 14: ? | 15: ? | 16: ? | 17: 16
|
|
||||||
// 18: 4 | 19: ? | 20: 19 | 21: 21 | 22: 9 | 23: 0 | 24: 1 | 25: ? | 26: 11
|
|
||||||
// 27: 6 | 28: ? | 29: ? | 30: ? | 31: ? | 32: ? | 33: ? | 34: ? | 35: 18
|
|
||||||
// 36: ? | 37: 23 | 38: 20 | 39: 8 | 40: 22 | 41: 26 | 42: 12 | 43: 14 | 44: ?
|
|
||||||
|
|
||||||
baugui.put("size", 45);
|
|
||||||
baugui.put("10", 2);
|
|
||||||
baugui.put("3", 3);
|
|
||||||
baugui.put("7", 4);
|
|
||||||
baugui.put("17", 5);
|
|
||||||
baugui.put("15", 6);
|
|
||||||
baugui.put("5", 9);
|
|
||||||
baugui.put("16", 17);
|
|
||||||
baugui.put("4", 18);
|
|
||||||
baugui.put("19", 20);
|
|
||||||
baugui.put("21", 21);
|
|
||||||
baugui.put("9", 22);
|
|
||||||
baugui.put("0", 23);
|
|
||||||
baugui.put("1", 24);
|
|
||||||
baugui.put("11", 26);
|
|
||||||
baugui.put("6", 27);
|
|
||||||
baugui.put("18", 35);
|
|
||||||
baugui.put("23", 37);
|
|
||||||
baugui.put("20", 38);
|
|
||||||
baugui.put("8", 39);
|
|
||||||
baugui.put("22", 40);
|
|
||||||
baugui.put("26", 41);
|
|
||||||
baugui.put("12", 42);
|
|
||||||
baugui.put("14", 43);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void save() {
|
|
||||||
UserConfig.updatePlayerConfig(uuid, "bausystem", toYaml().saveToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public static class ConfigListener implements Listener {
|
public class Config implements Listener {
|
||||||
|
|
||||||
|
static {
|
||||||
|
SerializeManager.add(new ConfigurationSerializableSerializer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private static Config instance;
|
||||||
|
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Map<UUID, YAPIONObject> playerConfigurations = new HashMap<>();
|
||||||
|
|
||||||
|
private static final Map<Integer, ConfigConverter> CONFIG_CONVERTER_MAP = new HashMap<>();
|
||||||
|
|
||||||
|
public static void addConfigConverter(ConfigConverter configConverter) {
|
||||||
|
CONFIG_CONVERTER_MAP.putIfAbsent(configConverter.version(), configConverter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
|
get(event.getPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||||
get(event.getPlayer()).save();
|
save(event.getPlayer());
|
||||||
playerConfigurations.remove(event.getPlayer().getUniqueId());
|
playerConfigurations.remove(event.getPlayer().getUniqueId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a PlayerConfig, optionally loads it from the DataBase and migrates it if necessary.
|
||||||
|
*
|
||||||
|
* @param player the player from whom to get the config.
|
||||||
|
* @return the config object
|
||||||
|
*/
|
||||||
|
public YAPIONObject get(Player player) {
|
||||||
|
UUID uuid = player.getUniqueId();
|
||||||
|
if (!playerConfigurations.containsKey(uuid)) {
|
||||||
|
String s = UserConfig.getConfig(uuid, "bausystem");
|
||||||
|
YAPIONObject yapionObject;
|
||||||
|
if (s == null) {
|
||||||
|
yapionObject = ConfigCreator.createDefaultConfig();
|
||||||
|
} else {
|
||||||
|
yapionObject = YAPIONParser.parse(s);
|
||||||
|
}
|
||||||
|
yapionObject = update(yapionObject);
|
||||||
|
playerConfigurations.put(uuid, yapionObject);
|
||||||
|
return yapionObject;
|
||||||
|
}
|
||||||
|
return playerConfigurations.get(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveAll() {
|
||||||
|
playerConfigurations.forEach((uuid, yapionObject) -> {
|
||||||
|
String string = yapionObject.toYAPION(new StringOutput()).getResult().replaceAll("\\+", "\\");
|
||||||
|
UserConfig.updatePlayerConfig(uuid, "bausystem", string);
|
||||||
|
});
|
||||||
|
playerConfigurations.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save a PlayerConfig, this does not remove the key value mapping from the map.
|
||||||
|
*
|
||||||
|
* @param player the player to save the config.
|
||||||
|
*/
|
||||||
|
public void save(Player player) {
|
||||||
|
UUID uuid = player.getUniqueId();
|
||||||
|
if (playerConfigurations.containsKey(uuid)) {
|
||||||
|
YAPIONObject yapionObject = playerConfigurations.get(uuid);
|
||||||
|
String string = yapionObject.toYAPION(new StringOutput()).getResult().replaceAll("\\\\+", "\\\\");
|
||||||
|
UserConfig.updatePlayerConfig(uuid, "bausystem", string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private YAPIONObject update(YAPIONObject yapionObject) {
|
||||||
|
int version = yapionObject.getPlainValue("@version");
|
||||||
|
while (version < ConfigCreator.currentVersion) {
|
||||||
|
ConfigConverter configConverter = CONFIG_CONVERTER_MAP.getOrDefault(version, null);
|
||||||
|
if (configConverter == null) {
|
||||||
|
Bukkit.getLogger().log(Level.SEVERE, "No updater found for version " + version);
|
||||||
|
return ConfigCreator.createDefaultConfig();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
configConverter.update(yapionObject);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||||
|
return ConfigCreator.createDefaultConfig();
|
||||||
|
}
|
||||||
|
int newVersion = yapionObject.getPlainValue("@version");
|
||||||
|
if (version == newVersion) {
|
||||||
|
Bukkit.getLogger().log(Level.SEVERE, "Version Tag was the same after conversion");
|
||||||
|
return ConfigCreator.createDefaultConfig();
|
||||||
|
}
|
||||||
|
if (newVersion < version) {
|
||||||
|
Bukkit.getLogger().log(Level.SEVERE, "Version Tag was earlier after conversion");
|
||||||
|
return ConfigCreator.createDefaultConfig();
|
||||||
|
}
|
||||||
|
version = newVersion;
|
||||||
|
}
|
||||||
|
return yapionObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package de.steamwar.bausystem.configplayer;
|
||||||
|
|
||||||
|
import yapion.hierarchy.types.YAPIONObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A new {@link ConfigConverter} should be written when you remove anything
|
||||||
|
* from the Config or modify any mayor part. When you move anything from
|
||||||
|
* any key to any other key you should write a new {@link ConfigConverter}.
|
||||||
|
* For adding any new key you should be able to get the default without
|
||||||
|
* having it in the Config. Anything you need to change you should also
|
||||||
|
* change the {@link ConfigCreator} accordingly, to produce the new Config.
|
||||||
|
*/
|
||||||
|
public interface ConfigConverter {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This describes the version this Converter can convert from. The version
|
||||||
|
* it should convert to is the version 1 above this number. But this is not
|
||||||
|
* a necessity. In the config Object as parameter given in {@link #update(YAPIONObject)}
|
||||||
|
* you should update the <b>@version</b> variable in the root object to the
|
||||||
|
* new version this converter produced.
|
||||||
|
*
|
||||||
|
* @return the version number
|
||||||
|
*/
|
||||||
|
int version();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method should update everything needed to go from a lower config
|
||||||
|
* version to a higher. It should update the <b>@version</b> variable
|
||||||
|
* accordingly. Anything else is up the implementation. If anything goes wrong
|
||||||
|
* do not silently exit this method, throw an Exception. The updater Code will
|
||||||
|
* deal with it. Never leave the inputted object in a corrupted state.
|
||||||
|
*
|
||||||
|
* @param config the config object to update
|
||||||
|
*/
|
||||||
|
void update(YAPIONObject config);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.configplayer;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.features.hotbar.DefaultHotbar;
|
||||||
|
import lombok.experimental.UtilityClass;
|
||||||
|
import yapion.hierarchy.types.YAPIONObject;
|
||||||
|
|
||||||
|
@UtilityClass
|
||||||
|
public class ConfigCreator {
|
||||||
|
|
||||||
|
public static final int currentVersion = 1;
|
||||||
|
|
||||||
|
public YAPIONObject createDefaultConfig() {
|
||||||
|
YAPIONObject yapionObject = new YAPIONObject();
|
||||||
|
// This call should never be touched
|
||||||
|
yapionObject.add("@version", currentVersion);
|
||||||
|
|
||||||
|
// Any initialising goes into here
|
||||||
|
yapionObject.add("baugui", defaultBauGui());
|
||||||
|
|
||||||
|
// Default Hotbar Gui
|
||||||
|
yapionObject.add("hotbar", DefaultHotbar.defaultHotbar());
|
||||||
|
return yapionObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
private YAPIONObject defaultBauGui() {
|
||||||
|
YAPIONObject yapionObject = new YAPIONObject();
|
||||||
|
|
||||||
|
// 0: ? | 1: ? | 2: 10 | 3: 3 | 4: 7 | 5: 17 | 6: 15 | 7: ? | 8: ?
|
||||||
|
// 9: 5 | 10: ? | 11: ? | 12: ? | 13: ? | 14: ? | 15: ? | 16: ? | 17: 16
|
||||||
|
// 18: 4 | 19: ? | 20: 19 | 21: 21 | 22: 9 | 23: 0 | 24: 1 | 25: ? | 26: 11
|
||||||
|
// 27: 6 | 28: ? | 29: ? | 30: ? | 31: ? | 32: ? | 33: ? | 34: ? | 35: 18
|
||||||
|
// 36: ? | 37: 23 | 38: 20 | 39: 8 | 40: 22 | 41: 26 | 42: 12 | 43: 14 | 44: ?
|
||||||
|
|
||||||
|
yapionObject.add("10", 2).add("3", 3).add("7", 4).add("17", 5).add("15", 6);
|
||||||
|
yapionObject.add("5", 9).add("4", 18).add("6", 27);
|
||||||
|
yapionObject.add("16", 17).add("11", 26).add("18", 35);
|
||||||
|
yapionObject.add("19", 20).add("21", 21).add("9", 22).add("0", 23).add("1", 24);
|
||||||
|
yapionObject.add("23", 37).add("20", 38).add("8", 39).add("22", 40).add("26", 41).add("12", 42).add("14", 43);
|
||||||
|
yapionObject.add("size", 45);
|
||||||
|
return yapionObject;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.configplayer.serializer;
|
||||||
|
|
||||||
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||||
|
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
import yapion.hierarchy.api.groups.YAPIONAnyType;
|
||||||
|
import yapion.hierarchy.types.YAPIONObject;
|
||||||
|
import yapion.serializing.api.SerializerObject;
|
||||||
|
import yapion.serializing.data.DeserializeData;
|
||||||
|
import yapion.serializing.data.SerializeData;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static yapion.utils.IdentifierUtils.TYPE_IDENTIFIER;
|
||||||
|
|
||||||
|
public class ConfigurationSerializableSerializer extends SerializerObject<ConfigurationSerializable> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<ConfigurationSerializable> type() {
|
||||||
|
return ConfigurationSerializable.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInterface() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public YAPIONObject serialize(SerializeData<ConfigurationSerializable> serializeData) {
|
||||||
|
YAPIONObject yapionObject = new YAPIONObject();
|
||||||
|
yapionObject.add(TYPE_IDENTIFIER, serializeData.object.getClass().getTypeName());
|
||||||
|
if (serializeData.object instanceof ItemStack) {
|
||||||
|
yapionObject.add(TYPE_IDENTIFIER, ItemStack.class.getTypeName());
|
||||||
|
}
|
||||||
|
if (serializeData.object instanceof ItemMeta) {
|
||||||
|
yapionObject.add(TYPE_IDENTIFIER, ItemMeta.class.getTypeName());
|
||||||
|
}
|
||||||
|
Map<String, Object> serializeDataMap = serializeData.object.serialize();
|
||||||
|
serializeDataMap.forEach((s, o) -> {
|
||||||
|
YAPIONAnyType yapionAnyType = serializeData.serialize(o);
|
||||||
|
if (yapionAnyType instanceof YAPIONObject) {
|
||||||
|
YAPIONObject object = (YAPIONObject) yapionAnyType;
|
||||||
|
if (object.containsKey(TYPE_IDENTIFIER) && object.getPlainValue(TYPE_IDENTIFIER).equals("com.google.common.collect.RegularImmutableList")) {
|
||||||
|
object.put(TYPE_IDENTIFIER, ArrayList.class.getTypeName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
yapionObject.add(s, yapionAnyType);
|
||||||
|
});
|
||||||
|
return yapionObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigurationSerializable deserialize(DeserializeData<YAPIONObject> deserializeData) {
|
||||||
|
Map<String, Object> deserializeDataMap = new HashMap<>();
|
||||||
|
deserializeData.object.forEach((s, yapionAnyType) -> {
|
||||||
|
if (s.equals(TYPE_IDENTIFIER)) {
|
||||||
|
if (yapionAnyType.toString().equals("(org.bukkit.inventory.meta.ItemMeta)")) {
|
||||||
|
deserializeDataMap.put("==", "ItemMeta");
|
||||||
|
} else {
|
||||||
|
deserializeDataMap.put("==", deserializeData.deserialize(yapionAnyType));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
deserializeDataMap.put(s, deserializeData.deserialize(yapionAnyType));
|
||||||
|
});
|
||||||
|
return ConfigurationSerialization.deserializeObject(deserializeDataMap);
|
||||||
|
}
|
||||||
|
}
|
@ -44,7 +44,7 @@ public class AttributeRemoveCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register({"all"})
|
@Register({"all"})
|
||||||
@Register({"*"})
|
@Register({"*"})
|
||||||
public void genericCommand(Player player) {
|
public void genericCommand(@Validator Player player) {
|
||||||
ItemStack itemStack = player.getInventory().getItemInMainHand();
|
ItemStack itemStack = player.getInventory().getItemInMainHand();
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
itemMeta.setLore(new ArrayList<>());
|
itemMeta.setLore(new ArrayList<>());
|
||||||
@ -53,7 +53,7 @@ public class AttributeRemoveCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(description = "ATTRIBUTE_REMOVE_COMMAND_HELP")
|
@Register(description = "ATTRIBUTE_REMOVE_COMMAND_HELP")
|
||||||
public void genericCommand(Player player, @Mapper("attribute") String attribute) {
|
public void genericCommand(@Validator Player player, @Mapper("attribute") String attribute) {
|
||||||
ItemStack itemStack = player.getInventory().getItemInMainHand();
|
ItemStack itemStack = player.getInventory().getItemInMainHand();
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
if (itemMeta == null) {
|
if (itemMeta == null) {
|
||||||
@ -73,7 +73,7 @@ public class AttributeRemoveCommand extends SWCommand {
|
|||||||
BauSystem.MESSAGE.send("ATTRIBUTE_REMOVE_NOT_FOUND", player);
|
BauSystem.MESSAGE.send("ATTRIBUTE_REMOVE_NOT_FOUND", player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lore.removeIf(s -> s.equals("§8-§7 " + attribute));
|
lore.removeIf(s -> s.startsWith("§8-§7 " + attribute + "§8:"));
|
||||||
if (lore.size() == 1) {
|
if (lore.size() == 1) {
|
||||||
itemStack.setItemMeta(null);
|
itemStack.setItemMeta(null);
|
||||||
} else {
|
} else {
|
||||||
@ -99,15 +99,13 @@ public class AttributeRemoveCommand extends SWCommand {
|
|||||||
return lore.stream()
|
return lore.stream()
|
||||||
.skip(1)
|
.skip(1)
|
||||||
.map(s1 -> s1.substring(6))
|
.map(s1 -> s1.substring(6))
|
||||||
.map(s1 -> s1.replace('§', '&'))
|
.map(s1 -> s1.substring(0, s1.indexOf("§8:")))
|
||||||
.map(s1 -> s1.replace(' ', '_'))
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String map(CommandSender commandSender, PreviousArguments previousArguments, String s) {
|
public String map(CommandSender commandSender, PreviousArguments previousArguments, String s) {
|
||||||
return s.replace('_', ' ')
|
return s;
|
||||||
.replace('&', '§');
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public class AttributesCopyCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player player) {
|
public void genericCommand(@Validator Player player) {
|
||||||
Block block = player.getTargetBlockExact(8, FluidCollisionMode.ALWAYS);
|
Block block = player.getTargetBlockExact(8, FluidCollisionMode.ALWAYS);
|
||||||
if (block == null) return;
|
if (block == null) return;
|
||||||
ItemStack mainHand = player.getInventory().getItemInMainHand();
|
ItemStack mainHand = player.getInventory().getItemInMainHand();
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.attributescopy;
|
package de.steamwar.bausystem.features.attributescopy;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -40,6 +41,7 @@ public class AttributesPlaceListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockPlace(BlockPlaceEvent event) {
|
public void onBlockPlace(BlockPlaceEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
ItemStack itemStack = event.getItemInHand();
|
ItemStack itemStack = event.getItemInHand();
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
if (itemMeta == null) return;
|
if (itemMeta == null) return;
|
||||||
|
@ -32,7 +32,7 @@ public class AutoStartCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(description = "AUTOSTART_COMMAND_HELP")
|
@Register(description = "AUTOSTART_COMMAND_HELP")
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(@Validator Player p) {
|
||||||
SWUtils.giveItemToPlayer(p, AutostartListener.getWandItem(p));
|
SWUtils.giveItemToPlayer(p, AutostartListener.getWandItem(p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,6 @@ public class AutoStartGuiItem extends BauGuiItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Permission permission() {
|
public Permission permission() {
|
||||||
return Permission.MEMBER;
|
return Permission.BUILD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.autostart;
|
package de.steamwar.bausystem.features.autostart;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.region.RegionUtils;
|
import de.steamwar.bausystem.region.RegionUtils;
|
||||||
@ -29,19 +30,22 @@ import de.steamwar.bausystem.utils.ItemUtils;
|
|||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.data.type.Chest;
|
||||||
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||||
|
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class AutostartListener implements Listener {
|
public class AutostartListener implements Listener {
|
||||||
@ -64,15 +68,42 @@ public class AutostartListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
if (!ItemUtils.isItem(event.getItem(), "autostart")) {
|
if (!ItemUtils.isItem(event.getItem(), "autostart")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (event.getClickedBlock() == null) {
|
if (event.getClickedBlock() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (event.getClickedBlock().getBlockData() instanceof Chest) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getClickedBlock().getType() == Material.BEDROCK) {
|
||||||
|
event.getClickedBlock().setType(Material.SLIME_BLOCK);
|
||||||
|
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
|
event.getClickedBlock().setType(Material.BEDROCK, false);
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
activate(event.getPlayer());
|
activate(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onInventoryClose(InventoryCloseEvent event) {
|
||||||
|
if (!(event.getPlayer() instanceof Player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!Permission.BUILD.hasPermission((Player) event.getPlayer())) return;
|
||||||
|
if (!ItemUtils.isItem(event.getPlayer().getInventory().getItemInMainHand(), "autostart")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getInventory().getLocation() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getInventory().getLocation().getBlock().getBlockData() instanceof Chest) {
|
||||||
|
activate((Player) event.getPlayer());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void activate(Player player) {
|
public void activate(Player player) {
|
||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
if (region.isGlobal()) {
|
if (region.isGlobal()) {
|
||||||
@ -96,17 +127,24 @@ public class AutostartListener implements Listener {
|
|||||||
if (regionStartTime.isEmpty()) {
|
if (regionStartTime.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event.blockList().forEach(block -> {
|
event.blockList().forEach(block -> {
|
||||||
Region region = Region.getRegion(block.getLocation());
|
Region region = Region.getRegion(block.getLocation());
|
||||||
if (!regionStartTime.containsKey(region)) return;
|
if (!regionStartTime.containsKey(region)) return;
|
||||||
if (!region.hasType(RegionType.TESTBLOCK)) return;
|
if (!region.hasType(RegionType.TESTBLOCK)) return;
|
||||||
if (!region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) return;
|
if (!region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)) return;
|
||||||
long tickDiff = TPSUtils.currentRealTick.get() - regionStartTime.remove(region);
|
long tickDiff = TPSUtils.currentRealTick.get() - regionStartTime.remove(region);
|
||||||
RegionUtils.message(region, player -> {
|
long preFightDurationInSeconds = getPreFightDurationInSeconds(region);
|
||||||
return BauSystem.MESSAGE.parse("AUTOSTART_MESSAGE_RESULT1", player, new SimpleDateFormat(BauSystem.MESSAGE.parse("AUTOSTART_MESSAGE_DATE_PATTERN", player)).format(new Date(tickDiff * 50)));
|
RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT1", tickDiff);
|
||||||
});
|
RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT2", preFightDurationInSeconds, ((preFightDurationInSeconds * 20) - tickDiff));
|
||||||
RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT2", 30, (600 - tickDiff));
|
|
||||||
RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT3");
|
RegionUtils.message(region, "AUTOSTART_MESSAGE_RESULT3");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getPreFightDurationInSeconds(Region region) {
|
||||||
|
File file = region.gameModeConfig();
|
||||||
|
if (file == null) return 30;
|
||||||
|
FileConfiguration config = YamlConfiguration.loadConfiguration(file);
|
||||||
|
return config.getInt("Times.PreFightDuration", 30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,15 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.backup;
|
package de.steamwar.bausystem.features.backup;
|
||||||
|
|
||||||
|
import com.sk89q.worldedit.EditSession;
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.region.Color;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
|
import de.steamwar.bausystem.region.flags.flagvalues.ColorMode;
|
||||||
import de.steamwar.bausystem.region.tags.Tag;
|
import de.steamwar.bausystem.region.tags.Tag;
|
||||||
|
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.SWCommandUtils;
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
@ -57,7 +62,7 @@ public class BackupCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "create", description = "BACKUP_HELP_CREATE")
|
@Register(value = "create", description = "BACKUP_HELP_CREATE")
|
||||||
public void backupCreate(@Validator Player p) {
|
public void backupCreate(@Validator("owner") Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) {
|
if (checkGlobalRegion(region, p)) {
|
||||||
return;
|
return;
|
||||||
@ -74,7 +79,7 @@ public class BackupCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "load", description = "BACKUP_HELP_LOAD")
|
@Register(value = "load", description = "BACKUP_HELP_LOAD")
|
||||||
public void backupLoad(@Validator Player p, @Mapper("backupName") String backupName) {
|
public void backupLoad(@Validator("owner") Player p, @Mapper("backupName") String backupName) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) {
|
if (checkGlobalRegion(region, p)) {
|
||||||
return;
|
return;
|
||||||
@ -85,7 +90,13 @@ public class BackupCommand extends SWCommand {
|
|||||||
BauSystem.MESSAGE.send("BACKUP_LOAD_FAILURE", p);
|
BauSystem.MESSAGE.send("BACKUP_LOAD_FAILURE", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
region.reset(backupFile);
|
EditSession editSession = new PasteBuilder(new PasteBuilder.FileProvider(backupFile))
|
||||||
|
.pastePoint(region.getMinPoint().add(region.getPrototype().getSizeX() / 2, 0, region.getPrototype().getSizeZ() / 2))
|
||||||
|
.minPoint(region.getMinPoint())
|
||||||
|
.maxPoint(region.getMaxPoint())
|
||||||
|
.waterLevel(region.getWaterLevel())
|
||||||
|
.run();
|
||||||
|
region.remember(editSession);
|
||||||
BauSystem.MESSAGE.send("BACKUP_LOAD", p);
|
BauSystem.MESSAGE.send("BACKUP_LOAD", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +130,7 @@ public class BackupCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
SWListInv<String> swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("BACKUP_INV_NAME", p), swListEntries, (clickType, s) -> {
|
SWListInv<String> swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("BACKUP_INV_NAME", p), swListEntries, (clickType, s) -> {
|
||||||
p.getOpenInventory().close();
|
p.getOpenInventory().close();
|
||||||
backupLoad(p, s);
|
p.performCommand("backup load " + s);
|
||||||
});
|
});
|
||||||
swListInv.open();
|
swListInv.open();
|
||||||
}
|
}
|
||||||
@ -129,13 +140,6 @@ public class BackupCommand extends SWCommand {
|
|||||||
return SWCommandUtils.createMapper(s -> s, (commandSender, s) -> listBackup((Player) commandSender));
|
return SWCommandUtils.createMapper(s -> s, (commandSender, s) -> listBackup((Player) commandSender));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
|
||||||
public TypeValidator<Player> backupValidator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLDEDIT), "BACKUP_NO_PERMS");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<String> listBackup(Player p) {
|
private List<String> listBackup(Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) {
|
if (checkGlobalRegion(region, p)) {
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.bau;
|
|
||||||
|
|
||||||
import de.steamwar.command.SWCommand;
|
|
||||||
import de.steamwar.linkage.Linked;
|
|
||||||
import de.steamwar.linkage.LinkedInstance;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
@Linked
|
|
||||||
public class BauCommand extends SWCommand {
|
|
||||||
|
|
||||||
@LinkedInstance
|
|
||||||
public InfoCommand infoCommand;
|
|
||||||
|
|
||||||
public BauCommand() {
|
|
||||||
super("bau", "b", "gs");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Register(value = "info", description = "BAU_COMMAND_HELP_INFO")
|
|
||||||
public void infoCommand(Player p) {
|
|
||||||
infoCommand.sendBauInfo(p);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.features.bau;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.command.PreviousArguments;
|
||||||
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.techhider.TechHider;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked
|
||||||
|
public class ForceSpectatorCommand extends SWCommand {
|
||||||
|
|
||||||
|
public ForceSpectatorCommand() {
|
||||||
|
super("forcespectator");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register
|
||||||
|
public void forceSpectator(@Validator("supervisor") Player player, @Mapper("builder") Player other) {
|
||||||
|
Permission.forceOnlySpectator(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Mapper("builder")
|
||||||
|
public TypeMapper<Player> spectatorMapper() {
|
||||||
|
return new TypeMapper<>() {
|
||||||
|
@Override
|
||||||
|
public Player map(CommandSender commandSender, String[] previousArguments, String s) {
|
||||||
|
Player player = Bukkit.getPlayer(s);
|
||||||
|
if (player == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (Permission.BUILD.hasPermission(player) && !Permission.SUPERVISOR.hasPermission(player)) {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<String> tabCompletes(CommandSender sender, PreviousArguments previousArguments, String s) {
|
||||||
|
return Bukkit.getOnlinePlayers().stream()
|
||||||
|
.filter(Permission.BUILD::hasPermission)
|
||||||
|
.filter(player -> !Permission.SUPERVISOR.hasPermission(player))
|
||||||
|
.map(Player::getName)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
package de.steamwar.bausystem.features.bau;
|
package de.steamwar.bausystem.features.bau;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.config.BauServer;
|
import de.steamwar.bausystem.config.BauServer;
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSWarpUtils;
|
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.region.flags.Flag;
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
@ -13,9 +13,7 @@ import de.steamwar.sql.BauweltMember;
|
|||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
|
|
||||||
import static de.steamwar.bausystem.features.tpslimit.TPSWarpUtils.getTps;
|
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class InfoCommand extends SWCommand {
|
public class InfoCommand extends SWCommand {
|
||||||
@ -27,17 +25,8 @@ public class InfoCommand extends SWCommand {
|
|||||||
super("bauinfo");
|
super("bauinfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(help = true)
|
@Register(description = "BAU_INFO_COMMAND_HELP")
|
||||||
public void genericHelp(Player p, String... args) {
|
|
||||||
BauSystem.MESSAGE.send("BAU_INFO_COMMAND_HELP", p);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Register
|
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
sendBauInfo(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendBauInfo(Player p) {
|
|
||||||
BauSystem.MESSAGE.send("BAU_INFO_COMMAND_OWNER", p, SteamwarUser.get(bauServer.getOwnerID()).getUserName());
|
BauSystem.MESSAGE.send("BAU_INFO_COMMAND_OWNER", p, SteamwarUser.get(bauServer.getOwnerID()).getUserName());
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
for (Flag flag : Flag.getFlags()) {
|
for (Flag flag : Flag.getFlags()) {
|
||||||
@ -50,28 +39,48 @@ public class InfoCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Permission.BUILD.hasPermission(p)) {
|
||||||
List<BauweltMember> members = BauweltMember.getMembers(bauServer.getOwnerID());
|
List<BauweltMember> members = BauweltMember.getMembers(bauServer.getOwnerID());
|
||||||
StringBuilder membermessage = new StringBuilder();
|
Map<Permission, List<BauweltMember>> memberByPermission = new HashMap<>();
|
||||||
membermessage.append(BauSystem.MESSAGE.parsePrefixed("BAU_INFO_COMMAND_MEMBER", p));
|
members.forEach(member -> {
|
||||||
|
if (Permission.SUPERVISOR.hasPermission(member)) {
|
||||||
for (BauweltMember member : members) {
|
memberByPermission.computeIfAbsent(Permission.SUPERVISOR, __ -> new ArrayList<>()).add(member);
|
||||||
membermessage.append(BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_INFO", p,
|
} else if (Permission.BUILD.hasPermission(member)) {
|
||||||
SteamwarUser.get(member.getMemberID()).getUserName(),
|
memberByPermission.computeIfAbsent(Permission.BUILD, __ -> new ArrayList<>()).add(member);
|
||||||
member.isWorldEdit() ? BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WE_ALLOW", p) : BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WE_DISALLOW", p),
|
} else {
|
||||||
member.isWorld() ? BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WORLD_ALLOW", p) : BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WORLD_DISALLOW", p)
|
memberByPermission.computeIfAbsent(Permission.MEMBER, __ -> new ArrayList<>()).add(member);
|
||||||
));
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
List<BauweltMember> supervisor = memberByPermission.getOrDefault(Permission.SUPERVISOR, Collections.emptyList());
|
||||||
|
BauSystem.MESSAGE.send("BAU_INFO_COMMAND_MEMBER", p, "§eSupervisor", supervisor.size(), supervisor.isEmpty() ? "§8<none>" : joining(supervisor));
|
||||||
|
|
||||||
|
List<BauweltMember> builder = memberByPermission.getOrDefault(Permission.BUILD, Collections.emptyList());
|
||||||
|
BauSystem.MESSAGE.send("BAU_INFO_COMMAND_MEMBER", p, "§6Builder", builder.size(), builder.isEmpty() ? "§8<none>" : joining(builder));
|
||||||
|
|
||||||
|
List<BauweltMember> spectator = memberByPermission.getOrDefault(Permission.MEMBER, Collections.emptyList());
|
||||||
|
BauSystem.MESSAGE.send("BAU_INFO_COMMAND_MEMBER", p, "§7Spectator", spectator.size(), spectator.isEmpty() ? "§8<none>" : joining(spectator));
|
||||||
}
|
}
|
||||||
p.sendMessage(membermessage.toString());
|
|
||||||
|
|
||||||
StringBuilder tpsMessage = new StringBuilder();
|
StringBuilder tpsMessage = new StringBuilder();
|
||||||
tpsMessage.append(BauSystem.MESSAGE.parsePrefixed("BAU_INFO_COMMAND_TPS", p));
|
tpsMessage.append(BauSystem.MESSAGE.parsePrefixed("BAU_INFO_COMMAND_TPS", p));
|
||||||
tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.ONE_SECOND));
|
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.ONE_SECOND));
|
||||||
tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.TEN_SECONDS));
|
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.TEN_SECONDS));
|
||||||
if (!TPSWarpUtils.isWarping()) {
|
|
||||||
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.ONE_MINUTE));
|
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.ONE_MINUTE));
|
||||||
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.FIVE_MINUTES));
|
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.FIVE_MINUTES));
|
||||||
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.TEN_MINUTES));
|
tpsMessage.append(" ").append(TPSWatcher.getTPS(TPSWatcher.TPSType.TEN_MINUTES));
|
||||||
}
|
|
||||||
p.sendMessage(tpsMessage.toString());
|
p.sendMessage(tpsMessage.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String joining(List<BauweltMember> bauweltMembers) {
|
||||||
|
StringBuilder st = new StringBuilder();
|
||||||
|
for (int i = 0; i < bauweltMembers.size(); i++) {
|
||||||
|
if (i != 0) {
|
||||||
|
st.append("§8, ");
|
||||||
|
}
|
||||||
|
st.append("§7");
|
||||||
|
st.append(SteamwarUser.get(bauweltMembers.get(i).getMemberID()).getUserName());
|
||||||
|
}
|
||||||
|
return st.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,28 +28,29 @@ import de.steamwar.linkage.Linked;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
import org.bukkit.entity.TNTPrimed;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class CannonDetector implements Listener {
|
public class CannonDetector implements Listener {
|
||||||
|
|
||||||
private Map<TNTPrimed, Vector> velocities = new HashMap<>();
|
private Map<TNTPrimed, Vector> velocities = new HashMap<>();
|
||||||
|
private Map<TNTPrimed, Set<UUID>> propulsionOfProjectile = new HashMap<>();
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
public void onEntityExplode(EntityExplodeEvent event) {
|
public void onEntityExplode(EntityExplodeEvent event) {
|
||||||
if (!(event.getEntity() instanceof TNTPrimed)) {
|
if (!(event.getEntity() instanceof TNTPrimed)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TNTPrimed tnt = (TNTPrimed) event.getEntity();
|
TNTPrimed tnt = (TNTPrimed) event.getEntity();
|
||||||
|
propulsionOfProjectile.remove(tnt);
|
||||||
|
|
||||||
DepthManager.update(tnt, event.blockList());
|
DepthManager.update(tnt, event.blockList());
|
||||||
|
|
||||||
List<TNTPrimed> tnts = Bukkit.getWorlds().get(0).getEntitiesByClass(TNTPrimed.class)
|
List<TNTPrimed> tnts = Bukkit.getWorlds().get(0).getEntitiesByClass(TNTPrimed.class)
|
||||||
@ -66,6 +67,7 @@ public class CannonDetector implements Listener {
|
|||||||
boolean isEmpty = velocities.isEmpty();
|
boolean isEmpty = velocities.isEmpty();
|
||||||
tnts.forEach(tntPrimed -> {
|
tnts.forEach(tntPrimed -> {
|
||||||
velocities.put(tntPrimed, tntPrimed.getVelocity().clone());
|
velocities.put(tntPrimed, tntPrimed.getVelocity().clone());
|
||||||
|
propulsionOfProjectile.computeIfAbsent(tntPrimed, __ -> new HashSet<>()).add(tnt.getUniqueId());
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isEmpty) {
|
if (!isEmpty) {
|
||||||
@ -75,7 +77,10 @@ public class CannonDetector implements Listener {
|
|||||||
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
Map<CannonKey, List<TNTPrimed>> grouped = new HashMap<>();
|
Map<CannonKey, List<TNTPrimed>> grouped = new HashMap<>();
|
||||||
velocities.forEach((tntPrimed, vector) -> {
|
velocities.forEach((tntPrimed, vector) -> {
|
||||||
grouped.computeIfAbsent(new CannonKey(round(tntPrimed.getLocation().toVector()), round(vector)), ignored -> new ArrayList<>()).add(tntPrimed);
|
boolean xBiggest = Math.abs(vector.getX()) > Math.abs(vector.getZ());
|
||||||
|
boolean zBiggest = Math.abs(vector.getZ()) > Math.abs(vector.getX());
|
||||||
|
Vector vec = new Vector(xBiggest ? Math.signum(vector.getX()) : 0, Math.round(vector.getY() * 100), zBiggest ? Math.signum(vector.getZ()) : 0);
|
||||||
|
grouped.computeIfAbsent(new CannonKey(propulsionOfProjectile.get(tntPrimed), vec), ignored -> new ArrayList<>()).add(tntPrimed);
|
||||||
});
|
});
|
||||||
grouped.forEach((cannonKey, tntPrimeds) -> {
|
grouped.forEach((cannonKey, tntPrimeds) -> {
|
||||||
if (tntPrimeds.size() <= 5) return;
|
if (tntPrimeds.size() <= 5) return;
|
||||||
@ -88,12 +93,4 @@ public class CannonDetector implements Listener {
|
|||||||
velocities.clear();
|
velocities.clear();
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector round(Vector vector) {
|
|
||||||
vector.multiply(10000);
|
|
||||||
vector.setX(Math.round(vector.getX()));
|
|
||||||
vector.setY(Math.round(vector.getY()));
|
|
||||||
vector.setZ(Math.round(vector.getZ()));
|
|
||||||
return vector;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -22,12 +22,16 @@ package de.steamwar.bausystem.features.cannon;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import org.bukkit.entity.TNTPrimed;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
@Getter
|
@Getter
|
||||||
public final class CannonKey {
|
public final class CannonKey {
|
||||||
private Vector locationVector;
|
private Set<UUID> propulsions;
|
||||||
private Vector velocityVector;
|
private Vector velocityVector;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@ public class Depth {
|
|||||||
List<Block> blocksList = blocks.stream()
|
List<Block> blocksList = blocks.stream()
|
||||||
.filter(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION))
|
.filter(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (blocksList.isEmpty()) return;
|
|
||||||
tntCount++;
|
tntCount++;
|
||||||
for (Block block : blocksList) {
|
for (Block block : blocksList) {
|
||||||
internalUpdate(block);
|
internalUpdate(block);
|
||||||
|
@ -48,6 +48,6 @@ public class CountingwandGuiItem extends BauGuiItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Permission permission() {
|
public Permission permission() {
|
||||||
return Permission.WORLDEDIT;
|
return Permission.MEMBER;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -44,7 +44,8 @@ public class DesignEndStone {
|
|||||||
private REntityServer entityServer = new REntityServer();
|
private REntityServer entityServer = new REntityServer();
|
||||||
private List<REntity> entities = new ArrayList<>();
|
private List<REntity> entities = new ArrayList<>();
|
||||||
private Set<Location> locations = new HashSet<>();
|
private Set<Location> locations = new HashSet<>();
|
||||||
private List<Player> players = new ArrayList<>();
|
private boolean wsOrAs;
|
||||||
|
private double maxBlastResistance;
|
||||||
|
|
||||||
public DesignEndStone(Region region) {
|
public DesignEndStone(Region region) {
|
||||||
this.minX = region.getMinPointBuild().getX();
|
this.minX = region.getMinPointBuild().getX();
|
||||||
@ -53,9 +54,20 @@ public class DesignEndStone {
|
|||||||
this.maxX = region.getMaxPointBuild().getX();
|
this.maxX = region.getMaxPointBuild().getX();
|
||||||
this.maxY = region.getMaxPointBuild().getY();
|
this.maxY = region.getMaxPointBuild().getY();
|
||||||
this.maxZ = region.getMaxPointBuild().getZ();
|
this.maxZ = region.getMaxPointBuild().getZ();
|
||||||
|
wsOrAs = region.getName().startsWith("ws") || region.getName().startsWith("as");
|
||||||
|
maxBlastResistance = wsOrAs ? 6.1 : 9.0;
|
||||||
|
|
||||||
|
entityServer.setCallback((player, rEntity, entityAction) -> {
|
||||||
|
if (entityAction != REntityServer.EntityAction.ATTACK) return;
|
||||||
|
Location location = new Location(WORLD, rEntity.getX(), rEntity.getY(), rEntity.getZ());
|
||||||
|
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
|
location.getBlock().breakNaturally();
|
||||||
|
calc();
|
||||||
|
}, 1);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calc() {
|
public void calc() {
|
||||||
entities.forEach(REntity::die);
|
entities.forEach(REntity::die);
|
||||||
entities.clear();
|
entities.clear();
|
||||||
locations.clear();
|
locations.clear();
|
||||||
@ -64,8 +76,24 @@ public class DesignEndStone {
|
|||||||
calc(minX, minY, maxZ, maxX, maxY, maxZ, 0, 0, -1, maxZ - minZ);
|
calc(minX, minY, maxZ, maxX, maxY, maxZ, 0, 0, -1, maxZ - minZ);
|
||||||
calc(minX, minY, minZ, minX, maxY, maxZ, 1, 0, 0, maxX - minX);
|
calc(minX, minY, minZ, minX, maxY, maxZ, 1, 0, 0, maxX - minX);
|
||||||
calc(maxX, minY, minZ, maxX, maxY, maxZ, -1, 0, 0, maxX - minX);
|
calc(maxX, minY, minZ, maxX, maxY, maxZ, -1, 0, 0, maxX - minX);
|
||||||
// calc(minX, minY, minZ, maxX, minY, maxZ, 0, 1, 0, maxY - minY);
|
if (wsOrAs) {
|
||||||
calc(minX, maxY, minZ, maxX, maxY, maxZ, 0, -1, 0, maxY - minY);
|
calc(minX, minY, minZ, maxX, minY, maxZ, 0, 1, 0, maxY - minY + 1);
|
||||||
|
} else {
|
||||||
|
int airBlocks = 0;
|
||||||
|
double minAirBlocks = (maxX - minX) * (maxZ - minZ) * 0.1;
|
||||||
|
for (int x = minX; x < maxX; x++) {
|
||||||
|
for (int z = minZ; z < maxZ; z++) {
|
||||||
|
if (WORLD.getBlockAt(x, minY, z).getType().isAir()) {
|
||||||
|
airBlocks++;
|
||||||
|
if (airBlocks > minAirBlocks) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (airBlocks > minAirBlocks) {
|
||||||
|
calc(minX, minY, minZ, maxX, minY, maxZ, 0, 1, 0, maxY - minY + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
calc(minX, maxY, minZ, maxX, maxY, maxZ, 0, -1, 0, maxY - minY + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calc(int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int dirX, int dirY, int dirZ, int steps) {
|
private void calc(int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int dirX, int dirY, int dirZ, int steps) {
|
||||||
@ -77,15 +105,16 @@ public class DesignEndStone {
|
|||||||
int cy = y + step * dirY;
|
int cy = y + step * dirY;
|
||||||
int cz = z + step * dirZ;
|
int cz = z + step * dirZ;
|
||||||
Material material = WORLD.getBlockAt(cx, cy, cz).getType();
|
Material material = WORLD.getBlockAt(cx, cy, cz).getType();
|
||||||
if (material == Material.END_STONE || material == Material.END_STONE_BRICKS || material == Material.END_STONE_BRICK_SLAB || material == Material.END_STONE_BRICK_STAIRS || material == Material.END_STONE_BRICK_WALL) {
|
|
||||||
|
if (material != Material.WATER && material != Material.LAVA && material.getBlastResistance() >= maxBlastResistance) {
|
||||||
Location location = new Location(WORLD, cx + 0.5, cy, cz + 0.5);
|
Location location = new Location(WORLD, cx + 0.5, cy, cz + 0.5);
|
||||||
if (locations.contains(location)) break;
|
if (!locations.add(location)) break;
|
||||||
RFallingBlockEntity entity = new RFallingBlockEntity(entityServer, location, Material.RED_STAINED_GLASS);
|
RFallingBlockEntity entity = new RFallingBlockEntity(entityServer, location, Material.RED_STAINED_GLASS);
|
||||||
entity.setNoGravity(true);
|
entity.setNoGravity(true);
|
||||||
entity.setGlowing(true);
|
entity.setGlowing(true);
|
||||||
entities.add(entity);
|
entities.add(entity);
|
||||||
break;
|
break;
|
||||||
} else if (!material.isAir()) {
|
} else if (!material.isAir() && material != Material.WATER && material != Material.LAVA) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,15 +124,18 @@ public class DesignEndStone {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void toggle(Player player) {
|
public void toggle(Player player) {
|
||||||
if (players.contains(player)) {
|
if (entityServer.getPlayers().contains(player)) {
|
||||||
players.remove(player);
|
|
||||||
entityServer.removePlayer(player);
|
entityServer.removePlayer(player);
|
||||||
BauSystem.MESSAGE.send("DESIGN_ENDSTONE_DISABLE", player, ChatMessageType.ACTION_BAR);
|
BauSystem.MESSAGE.sendPrefixless("DESIGN_ENDSTONE_DISABLE", player, ChatMessageType.ACTION_BAR);
|
||||||
} else {
|
} else {
|
||||||
players.add(player);
|
|
||||||
entityServer.addPlayer(player);
|
entityServer.addPlayer(player);
|
||||||
calc();
|
calc();
|
||||||
BauSystem.MESSAGE.send("DESIGN_ENDSTONE_ENABLE", player, ChatMessageType.ACTION_BAR);
|
BauSystem.MESSAGE.sendPrefixless("DESIGN_ENDSTONE_ENABLE", player, ChatMessageType.ACTION_BAR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean removePlayer(Player player) {
|
||||||
|
entityServer.removePlayer(player);
|
||||||
|
return entityServer.getPlayers().isEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,23 @@ package de.steamwar.bausystem.features.design.endstone;
|
|||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.region.utils.RegionType;
|
import de.steamwar.bausystem.region.utils.RegionType;
|
||||||
|
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class DesignEndStoneCommand extends SWCommand {
|
public class DesignEndStoneCommand extends SWCommand implements Listener {
|
||||||
|
|
||||||
public DesignEndStoneCommand() {
|
public DesignEndStoneCommand() {
|
||||||
super("designendstone");
|
super("designendstone");
|
||||||
@ -39,7 +47,7 @@ public class DesignEndStoneCommand extends SWCommand {
|
|||||||
private Map<Region, DesignEndStone> designEndStoneMap = new HashMap<>();
|
private Map<Region, DesignEndStone> designEndStoneMap = new HashMap<>();
|
||||||
|
|
||||||
@Register(description = "DESIGN_ENDSTONE_COMMAND_HELP")
|
@Register(description = "DESIGN_ENDSTONE_COMMAND_HELP")
|
||||||
public void genericCommand(Player player) {
|
public void genericCommand(@Validator Player player) {
|
||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
if (!region.hasType(RegionType.BUILD)) {
|
if (!region.hasType(RegionType.BUILD)) {
|
||||||
BauSystem.MESSAGE.send("DESIGN_ENDSTONE_REGION_ERROR", player);
|
BauSystem.MESSAGE.send("DESIGN_ENDSTONE_REGION_ERROR", player);
|
||||||
@ -47,4 +55,43 @@ public class DesignEndStoneCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
designEndStoneMap.computeIfAbsent(region, DesignEndStone::new).toggle(player);
|
designEndStoneMap.computeIfAbsent(region, DesignEndStone::new).toggle(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||||
|
disableDesignEndStone(event.getPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBauMemberUpdate(BauMemberUpdateEvent event) {
|
||||||
|
event.getNewSpectator().forEach(this::disableDesignEndStone);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void disableDesignEndStone(Player player) {
|
||||||
|
new HashSet<>(designEndStoneMap.entrySet()).forEach(regionDesignEndStoneEntry -> {
|
||||||
|
if (regionDesignEndStoneEntry.getValue().removePlayer(player)) {
|
||||||
|
designEndStoneMap.remove(regionDesignEndStoneEntry.getKey());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockPlace(BlockPlaceEvent event) {
|
||||||
|
update(event.getBlock().getLocation());
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockBreak(BlockBreakEvent event) {
|
||||||
|
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
|
update(event.getBlock().getLocation());
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void update(Location location) {
|
||||||
|
Region region = Region.getRegion(location);
|
||||||
|
DesignEndStone designEndStone = designEndStoneMap.get(region);
|
||||||
|
if (designEndStone == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
designEndStone.calc();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ public class Detonator {
|
|||||||
|
|
||||||
public static void activateDetonator(DetonatorStorage detonator) {
|
public static void activateDetonator(DetonatorStorage detonator) {
|
||||||
Player p = detonator.getPlayer();
|
Player p = detonator.getPlayer();
|
||||||
if (Config.get(p).isDetonatorAutostart()) {
|
if (Config.getInstance().get(p).getPlainValueOrDefault("detonator-autostart", false)) {
|
||||||
AutostartListener.instance.activate(p);
|
AutostartListener.instance.activate(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,6 @@ public class DetonatorBauGuiItem extends BauGuiItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Permission permission() {
|
public Permission permission() {
|
||||||
return Permission.MEMBER;
|
return Permission.BUILD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,12 +58,12 @@ public class DetonatorCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "wand", description = "DETONATOR_HELP_WAND")
|
@Register(value = "wand", description = "DETONATOR_HELP_WAND")
|
||||||
public void giveWand(Player p) {
|
public void giveWand(@Validator Player p) {
|
||||||
SWUtils.giveItemToPlayer(p, getWAND(p));
|
SWUtils.giveItemToPlayer(p, getWAND(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "click", description = "DETONATOR_HELP_CLICK")
|
@Register(value = "click", description = "DETONATOR_HELP_CLICK")
|
||||||
public void clickDetonator(Player p) {
|
public void clickDetonator(@Validator Player p) {
|
||||||
Detonator.activateDetonator(new ItemStorage(p));
|
Detonator.activateDetonator(new ItemStorage(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ public class DetonatorCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(value = "autostart", description = "DETONATOR_HELP_AUTOSTART")
|
@Register(value = "autostart", description = "DETONATOR_HELP_AUTOSTART")
|
||||||
public void toggleAutostartTimer(Player p) {
|
public void toggleAutostartTimer(Player p) {
|
||||||
boolean current = Config.get(p).isDetonatorAutostart();
|
boolean current = Config.getInstance().get(p).getPlainValueOrDefault("detonator-autostart", false);
|
||||||
Config.get(p).setDetonatorAutostart(!current);
|
Config.getInstance().get(p).put("detonator-autostart", !current);
|
||||||
if (!current) {
|
if (!current) {
|
||||||
BauSystem.MESSAGE.send("DETONATOR_AUTOSTART_ENABLE", p);
|
BauSystem.MESSAGE.send("DETONATOR_AUTOSTART_ENABLE", p);
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.detonator;
|
package de.steamwar.bausystem.features.detonator;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.SWUtils;
|
import de.steamwar.bausystem.SWUtils;
|
||||||
import de.steamwar.bausystem.features.detonator.storage.DetonatorStorage;
|
import de.steamwar.bausystem.features.detonator.storage.DetonatorStorage;
|
||||||
import de.steamwar.bausystem.features.detonator.storage.ItemStorage;
|
import de.steamwar.bausystem.features.detonator.storage.ItemStorage;
|
||||||
@ -65,6 +66,7 @@ public class DetonatorListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockBreak(BlockBreakEvent event) {
|
public void onBlockBreak(BlockBreakEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
if (Detonator.isDetonator(p.getInventory().getItemInMainHand())) {
|
if (Detonator.isDetonator(p.getInventory().getItemInMainHand())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -75,6 +77,7 @@ public class DetonatorListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
if (!Detonator.isDetonator(event.getItem())) {
|
if (!Detonator.isDetonator(event.getItem())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -89,7 +92,7 @@ public class DetonatorListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
public void onPlayerMove(PlayerMoveEvent event) {
|
public void onPlayerMove(PlayerMoveEvent event) {
|
||||||
if (!Detonator.isDetonator(event.getPlayer().getInventory().getItemInMainHand())) {
|
if (!Permission.BUILD.hasPermission(event.getPlayer()) ||!Detonator.isDetonator(event.getPlayer().getInventory().getItemInMainHand())) {
|
||||||
if (Detonator.hasActiveDetonatorShow(event.getPlayer())) {
|
if (Detonator.hasActiveDetonatorShow(event.getPlayer())) {
|
||||||
Detonator.hideDetonator(event.getPlayer());
|
Detonator.hideDetonator(event.getPlayer());
|
||||||
}
|
}
|
||||||
@ -110,6 +113,7 @@ public class DetonatorListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
|
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
if (Detonator.isDetonator(event.getPlayer().getInventory().getItemInMainHand())) {
|
if (Detonator.isDetonator(event.getPlayer().getInventory().getItemInMainHand())) {
|
||||||
HAS_UPDATED.add(event.getPlayer());
|
HAS_UPDATED.add(event.getPlayer());
|
||||||
}
|
}
|
||||||
@ -117,6 +121,7 @@ public class DetonatorListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerSwapHandItems(PlayerSwapHandItemsEvent event) {
|
public void onPlayerSwapHandItems(PlayerSwapHandItemsEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
if (Detonator.isDetonator(event.getMainHandItem()) || Detonator.isDetonator(event.getOffHandItem())) {
|
if (Detonator.isDetonator(event.getMainHandItem()) || Detonator.isDetonator(event.getOffHandItem())) {
|
||||||
HAS_UPDATED.add(event.getPlayer());
|
HAS_UPDATED.add(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ public class BauGUI {
|
|||||||
if (!updating) {
|
if (!updating) {
|
||||||
OPEN_INVS.add(p);
|
OPEN_INVS.add(p);
|
||||||
}
|
}
|
||||||
BauGuiMapping mapping = new BauGuiMapping(p);
|
BauGuiMapping mapping = BauGuiMapping.getGuiMapping(p);
|
||||||
SWInventory inv = new SWInventory(p, mapping.getSize(), BauSystem.MESSAGE.parse("GUI_NAME", p));
|
SWInventory inv = new SWInventory(p, mapping.getSize(), BauSystem.MESSAGE.parse("GUI_NAME", p));
|
||||||
getITEMS().values().forEach(item -> {
|
getITEMS().values().forEach(item -> {
|
||||||
if (!mapping.isShown(item.getId())) {
|
if (!mapping.isShown(item.getId())) {
|
||||||
@ -81,7 +81,7 @@ public class BauGUI {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p.closeInventory();
|
p.closeInventory();
|
||||||
BauSystem.MESSAGE.send("GUI_NO_PERMISSION", p);
|
BauSystem.MESSAGE.send("NO_PERMISSION", p);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -108,26 +108,13 @@ public class BauGUI {
|
|||||||
if (!permission.hasPermission(p)) {
|
if (!permission.hasPermission(p)) {
|
||||||
List<String> lore = meta.getLore();
|
List<String> lore = meta.getLore();
|
||||||
if (lore == null) {
|
if (lore == null) {
|
||||||
lore = Collections.singletonList(BauSystem.MESSAGE.parse(permissionString(permission), p));
|
lore = Collections.singletonList(BauSystem.MESSAGE.parse("NO_PERMISSION", p));
|
||||||
} else {
|
} else {
|
||||||
lore.add(BauSystem.MESSAGE.parse(permissionString(permission), p));
|
lore.add(BauSystem.MESSAGE.parse("NO_PERMISSION", p));
|
||||||
}
|
}
|
||||||
meta.setLore(lore);
|
meta.setLore(lore);
|
||||||
}
|
}
|
||||||
itemStack.setItemMeta(meta);
|
itemStack.setItemMeta(meta);
|
||||||
return itemStack;
|
return itemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String permissionString(Permission permission) {
|
|
||||||
switch (permission) {
|
|
||||||
case OWNER:
|
|
||||||
return "GUI_NO_OWNER";
|
|
||||||
case WORLD:
|
|
||||||
return "GUI_NO_WORLD";
|
|
||||||
case WORLDEDIT:
|
|
||||||
return "GUI_NO_WORLDEDIT";
|
|
||||||
default:
|
|
||||||
return "GUI_NO_MEMBER";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public class BauGuiEditor implements Listener {
|
|||||||
private static final List<Player> open_Edits = new ArrayList<>();
|
private static final List<Player> open_Edits = new ArrayList<>();
|
||||||
|
|
||||||
public static void openGuiEditor(Player p, ItemStack cursor) {
|
public static void openGuiEditor(Player p, ItemStack cursor) {
|
||||||
BauGuiMapping mapping = new BauGuiMapping(p);
|
BauGuiMapping mapping = BauGuiMapping.getGuiMapping(p);
|
||||||
Inventory inv = Bukkit.createInventory(null, mapping.getSize() + 9, BauSystem.MESSAGE.parse("GUI_EDITOR_TITLE", p));
|
Inventory inv = Bukkit.createInventory(null, mapping.getSize() + 9, BauSystem.MESSAGE.parse("GUI_EDITOR_TITLE", p));
|
||||||
for (Map.Entry<Integer, Integer> e : mapping.getMapping().entrySet()) {
|
for (Map.Entry<Integer, Integer> e : mapping.getMapping().entrySet()) {
|
||||||
if (e.getValue() >= 0) {
|
if (e.getValue() >= 0) {
|
||||||
@ -78,6 +78,7 @@ public class BauGuiEditor implements Listener {
|
|||||||
p.openInventory(inv);
|
p.openInventory(inv);
|
||||||
p.getOpenInventory().setCursor(cursor == null ? new SWItem().getItemStack() : cursor);
|
p.getOpenInventory().setCursor(cursor == null ? new SWItem().getItemStack() : cursor);
|
||||||
open_Edits.add(p);
|
open_Edits.add(p);
|
||||||
|
BauGuiMapping.startWatchdog();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ItemStack addId(ItemStack itemStack, int id) {
|
private static ItemStack addId(ItemStack itemStack, int id) {
|
||||||
@ -100,7 +101,7 @@ public class BauGuiEditor implements Listener {
|
|||||||
|
|
||||||
ItemStack i = event.getCurrentItem();
|
ItemStack i = event.getCurrentItem();
|
||||||
Player p = (Player) event.getWhoClicked();
|
Player p = (Player) event.getWhoClicked();
|
||||||
BauGuiMapping mapping = new BauGuiMapping(p);
|
BauGuiMapping mapping = BauGuiMapping.getGuiMapping(p);
|
||||||
if (event.getClickedInventory() == p.getInventory()) {
|
if (event.getClickedInventory() == p.getInventory()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
@ -193,10 +194,13 @@ public class BauGuiEditor implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void saveMapping(Player p) {
|
private void saveMapping(Player p) {
|
||||||
saveMapping(p.getOpenInventory(), new BauGuiMapping(p));
|
saveMapping(p.getOpenInventory(), BauGuiMapping.getGuiMapping(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveMapping(InventoryView view, BauGuiMapping mapping) {
|
private void saveMapping(InventoryView view, BauGuiMapping mapping) {
|
||||||
|
if (mapping.isSaved()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
HashMap<Integer, Integer> newMapping = new HashMap<>();
|
HashMap<Integer, Integer> newMapping = new HashMap<>();
|
||||||
|
|
||||||
for (int i = 0; i < view.getTopInventory().getContents().length; i++) {
|
for (int i = 0; i < view.getTopInventory().getContents().length; i++) {
|
||||||
@ -212,6 +216,7 @@ public class BauGuiEditor implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mapping.setMapping(newMapping);
|
mapping.setMapping(newMapping);
|
||||||
|
mapping.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -222,7 +227,7 @@ public class BauGuiEditor implements Listener {
|
|||||||
|
|
||||||
Player p = (Player) event.getPlayer();
|
Player p = (Player) event.getPlayer();
|
||||||
|
|
||||||
saveMapping(event.getView(), new BauGuiMapping(p));
|
saveMapping(event.getView(), BauGuiMapping.getGuiMapping(p));
|
||||||
open_Edits.remove(p);
|
open_Edits.remove(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,50 +19,82 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.gui.editor;
|
package de.steamwar.bausystem.features.gui.editor;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.configplayer.Config;
|
import de.steamwar.bausystem.configplayer.Config;
|
||||||
|
import de.steamwar.bausystem.features.gui.BauGUI;
|
||||||
|
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
import yapion.hierarchy.types.YAPIONObject;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class BauGuiMapping {
|
public class BauGuiMapping {
|
||||||
|
|
||||||
@Getter
|
private static final HashMap<UUID, BauGuiMapping> fromUUID = new HashMap<>();
|
||||||
private final Player owner;
|
private static final List<BauGuiMapping> mappings = new ArrayList<>();
|
||||||
|
|
||||||
public BauGuiMapping(Player p) {
|
private static BukkitTask task;
|
||||||
this.owner = p;
|
|
||||||
|
public static void startWatchdog() {
|
||||||
|
if (task == null) {
|
||||||
|
Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), bukkitTask -> {
|
||||||
|
mappings.forEach(BauGuiMapping::tick);
|
||||||
|
if (BauGuiEditor.getOpen_Edits().isEmpty()) {
|
||||||
|
bukkitTask.cancel();
|
||||||
|
task = null;
|
||||||
|
}
|
||||||
|
}, 1, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, Integer> getInternalMapping() {
|
@Getter
|
||||||
return Config.get(owner).getBaugui();
|
private final YAPIONObject object;
|
||||||
|
@Getter
|
||||||
|
private final Player owner;
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
private boolean saved;
|
||||||
|
|
||||||
|
protected BauGuiMapping(YAPIONObject object, Player p) {
|
||||||
|
this.object = object;
|
||||||
|
this.owner = p;
|
||||||
|
fromUUID.put(p.getUniqueId(), this);
|
||||||
|
mappings.add(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BauGuiMapping getGuiMapping(Player p) {
|
||||||
|
BauGuiMapping mapping = fromUUID.get(p.getUniqueId());
|
||||||
|
|
||||||
|
if (mapping == null) {
|
||||||
|
YAPIONObject yapionObject = Config.getInstance().get(p);
|
||||||
|
mapping = new BauGuiMapping(yapionObject.getObject("baugui"), p);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isShown(int id) {
|
public boolean isShown(int id) {
|
||||||
return getInternalMapping().getOrDefault(Integer.toString(id), -1) >= 0;
|
return object.getPlainValueOrDefault(Integer.toString(id), -1) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSlot(int id) {
|
public int getSlot(int id) {
|
||||||
return getInternalMapping().getOrDefault(Integer.toString(id), 0);
|
return object.getPlainValue(Integer.toString(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Integer, Integer> getMapping() {
|
public Map<Integer, Integer> getMapping() {
|
||||||
return getInternalMapping().entrySet().stream().collect(Collectors.toMap(entry -> Integer.valueOf(entry.getKey()), Map.Entry::getValue));
|
return internalReadMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMapping(Map<Integer, Integer> mapping) {
|
public void setMapping(Map<Integer, Integer> mapping) {
|
||||||
Map<String, Integer> map = getInternalMapping();
|
internalWriteMap(mapping);
|
||||||
map.clear();
|
|
||||||
|
|
||||||
for(Map.Entry<Integer, Integer> entry : mapping.entrySet())
|
|
||||||
map.put(String.valueOf(entry.getKey()), entry.getValue());
|
|
||||||
|
|
||||||
Config.get(owner).save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return getInternalMapping().getOrDefault("size", 45);
|
return object.getPlainValueOrDefault("size", 45);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSize(int size) {
|
public void setSize(int size) {
|
||||||
@ -70,6 +102,37 @@ public class BauGuiMapping {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
getInternalMapping().put("size", size);
|
object.add("size", size);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tick() {
|
||||||
|
this.saved = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save() {
|
||||||
|
if (saved) return;
|
||||||
|
YAPIONObject config = Config.getInstance().get(owner);
|
||||||
|
config.add("baugui", object);
|
||||||
|
Config.getInstance().save(owner);
|
||||||
|
saved = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<Integer, Integer> internalReadMap() {
|
||||||
|
Map<Integer, Integer> map = new HashMap<>();
|
||||||
|
for (Map.Entry<Integer, BauGuiItem> e : BauGUI.getITEMS().entrySet()) {
|
||||||
|
Integer value = object.getPlainValueOrDefault(e.getKey().toString(), -1);
|
||||||
|
if (value == -1) continue;
|
||||||
|
map.put(e.getKey(), value);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void internalWriteMap(Map<Integer, Integer> map) {
|
||||||
|
for (Map.Entry<Integer, BauGuiItem> e : BauGUI.getITEMS().entrySet()) {
|
||||||
|
object.remove(e.getKey().toString());
|
||||||
|
Integer value = map.getOrDefault(e.getKey(), -1);
|
||||||
|
if (value == -1) continue;
|
||||||
|
object.add(e.getKey().toString(), value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,89 +19,75 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.hotbar;
|
package de.steamwar.bausystem.features.hotbar;
|
||||||
|
|
||||||
import de.steamwar.bausystem.config.ConfigField;
|
import de.steamwar.bausystem.configplayer.Config;
|
||||||
import de.steamwar.bausystem.config.YamlConfig;
|
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
import de.steamwar.sql.UserConfig;
|
import lombok.experimental.UtilityClass;
|
||||||
import lombok.Getter;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import yapion.hierarchy.types.YAPIONArray;
|
||||||
|
import yapion.hierarchy.types.YAPIONObject;
|
||||||
|
import yapion.hierarchy.types.YAPIONValue;
|
||||||
|
import yapion.parser.YAPIONParser;
|
||||||
|
import yapion.serializing.YAPIONDeserializer;
|
||||||
|
import yapion.serializing.YAPIONSerializer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.HashSet;
|
||||||
import java.util.Arrays;
|
import java.util.Set;
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class DefaultHotbar extends YamlConfig {
|
@UtilityClass
|
||||||
|
public class DefaultHotbar {
|
||||||
|
|
||||||
public static final String configName = "bauhotbar-" + Core.getVersion();
|
private final YAPIONArray DEFAULT_HOTBAR = YAPIONParser.parse("{[{@type(org.bukkit.inventory.ItemStack)v(2230)type(WOODEN_AXE)meta{@type(org.bukkit.inventory.meta.ItemMeta)meta-type(UNSPECIFIC)display-name(WorldEdit Wand)lore{@type(java.util.ArrayList)values[Left click: select pos #1,Right click: select pos #2]}}},{@type(org.bukkit.inventory.ItemStack)v(2230)type(COMPASS)meta{@type(org.bukkit.inventory.meta.ItemMeta)meta-type(UNSPECIFIC)display-name(Navigation Wand)lore{@type(java.util.ArrayList)values[Left click: jump to location,Right click: pass through walls]}}},null,null,null,null,null,null,{@type(org.bukkit.inventory.ItemStack)v(2230)type(NETHER_STAR)meta{@type(org.bukkit.inventory.meta.ItemMeta)meta-type(UNSPECIFIC)display-name(§eBau GUI)}},null,null,{@type(org.bukkit.inventory.ItemStack)v(3117)type(ELYTRA)},null]}").getArray("");
|
||||||
|
|
||||||
public static DefaultHotbar get(Player p) {
|
public void updateHotbar(Player p) {
|
||||||
return new DefaultHotbar(p, fromUserConfig(p.getUniqueId(), configName));
|
ItemStack[] hotbar = new ItemStack[13];
|
||||||
}
|
System.arraycopy(p.getInventory().getContents(), 0, hotbar, 0, 9);
|
||||||
|
System.arraycopy(p.getInventory().getArmorContents(), 0, hotbar, 9, 4);
|
||||||
private final Player player;
|
YAPIONArray yapionArray = new YAPIONArray();
|
||||||
|
for (ItemStack itemStack : hotbar) {
|
||||||
@Getter
|
if (itemStack != null) {
|
||||||
@ConfigField
|
yapionArray.add(YAPIONSerializer.serialize(itemStack));
|
||||||
private final List<ItemStack> hotbar = new ArrayList<>(13);
|
} else {
|
||||||
|
yapionArray.add(new YAPIONValue<>(null));
|
||||||
public DefaultHotbar(Player player, ConfigurationSection config) {
|
|
||||||
super(config);
|
|
||||||
this.player = player;
|
|
||||||
|
|
||||||
if(hotbar.isEmpty()) {
|
|
||||||
hotbar.add(newNamedStack(Material.WOODEN_AXE, "WorldEdit Wand", "Left click: select pos #1", "Right click: select pos #2"));
|
|
||||||
hotbar.add(newNamedStack(Material.COMPASS, "Navigation Wand", "Left click: jump to location", "Right click: pass through walls"));
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(newNamedStack(Material.NETHER_STAR, "§eBau GUI"));
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(null);
|
|
||||||
hotbar.add(new ItemStack(Material.ELYTRA));
|
|
||||||
hotbar.add(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Config.getInstance().get(p).add("hotbar-" + Core.getVersion(), yapionArray);
|
||||||
public void update() {
|
Config.getInstance().save(p);
|
||||||
hotbar.clear();
|
|
||||||
|
|
||||||
for(int i = 0; i < 9; i++)
|
|
||||||
hotbar.add(player.getInventory().getContents()[i]);
|
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++)
|
|
||||||
hotbar.add(player.getInventory().getArmorContents()[i]);
|
|
||||||
|
|
||||||
UserConfig.updatePlayerConfig(player.getUniqueId(), configName, toYaml().saveToString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load() {
|
public void setHotbar(Player p) {
|
||||||
ItemStack[] inv = player.getInventory().getContents();
|
ItemStack[] hotbar = getItems(p);
|
||||||
ItemStack[] armor = player.getInventory().getArmorContents();
|
ItemStack[] inv = p.getInventory().getContents();
|
||||||
System.arraycopy(hotbar.toArray(new ItemStack[0]), 0, inv, 0, 9);
|
ItemStack[] armor = p.getInventory().getArmorContents();
|
||||||
System.arraycopy(hotbar.toArray(new ItemStack[0]), 9, armor, 0, 4);
|
System.arraycopy(hotbar, 0, inv, 0, 9);
|
||||||
player.getInventory().setContents(inv);
|
System.arraycopy(hotbar, 9, armor, 0, 4);
|
||||||
player.getInventory().setArmorContents(armor);
|
p.getInventory().setContents(inv);
|
||||||
|
p.getInventory().setArmorContents(armor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ItemStack newNamedStack(Material material, String displayName, String... lore) {
|
public ItemStack[] getItems(Player p) {
|
||||||
ItemStack stack = new ItemStack(material);
|
Config.getInstance().get(p).remap("hotbar", "hotbar-19");
|
||||||
ItemMeta meta = stack.getItemMeta();
|
YAPIONArray yapionArray = Config.getInstance().get(p).getYAPIONArrayOrSetDefault("hotbar-" + Core.getVersion(), defaultHotbar());
|
||||||
|
ItemStack[] hotbar = new ItemStack[13];
|
||||||
if(displayName != null)
|
Set<Integer> invalid = new HashSet<>();
|
||||||
meta.setDisplayName(displayName);
|
yapionArray.forEach((integer, yapionAnyType) -> {
|
||||||
|
if (yapionAnyType instanceof YAPIONValue) {
|
||||||
if(lore.length > 0)
|
hotbar[integer] = null;
|
||||||
meta.setLore(Arrays.stream(lore).collect(Collectors.toList()));
|
} else {
|
||||||
|
try {
|
||||||
stack.setItemMeta(meta);
|
hotbar[integer] = YAPIONDeserializer.deserialize((YAPIONObject) yapionAnyType);
|
||||||
return stack;
|
} catch (Exception e) {
|
||||||
|
invalid.add(integer);
|
||||||
|
hotbar[integer] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
invalid.forEach(i -> yapionArray.set(i, new YAPIONValue<>(null)));
|
||||||
|
if (!invalid.isEmpty()) Config.getInstance().save(p);
|
||||||
|
return hotbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public YAPIONArray defaultHotbar() {
|
||||||
|
return DEFAULT_HOTBAR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ import de.steamwar.linkage.Linked;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class HotbarCommand extends SWCommand {
|
public class HotbarCommand extends SWCommand {
|
||||||
|
|
||||||
@ -37,24 +35,24 @@ public class HotbarCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "load", description = "HOTBAR_HELP_LOAD")
|
@Register(value = "load", description = "HOTBAR_HELP_LOAD")
|
||||||
public void loadHotbar(Player p) {
|
public void loadHotbar(@Validator Player p) {
|
||||||
DefaultHotbar.get(p).load();
|
DefaultHotbar.setHotbar(p);
|
||||||
BauSystem.MESSAGE.send("HOTBAR_LOADED", p);
|
BauSystem.MESSAGE.send("HOTBAR_LOADED", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "save", description = "HOTBAR_HELP_SAVE")
|
@Register(value = "save", description = "HOTBAR_HELP_SAVE")
|
||||||
public void saveHotbar(Player p) {
|
public void saveHotbar(Player p) {
|
||||||
DefaultHotbar.get(p).update();
|
DefaultHotbar.updateHotbar(p);
|
||||||
BauSystem.MESSAGE.send("HOTBAR_SAVED", p);
|
BauSystem.MESSAGE.send("HOTBAR_SAVED", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "show", description = "HOTBAR_HELP_SHOW")
|
@Register(value = "show", description = "HOTBAR_HELP_SHOW")
|
||||||
public void showHotbar(Player p) {
|
public void showHotbar(Player p) {
|
||||||
SWInventory inv = new SWInventory(p, 18, BauSystem.MESSAGE.parse("HOTBAR_INVENTORY", p));
|
SWInventory inv = new SWInventory(p, 18, BauSystem.MESSAGE.parse("HOTBAR_INVENTORY", p));
|
||||||
List<ItemStack> hotbar = DefaultHotbar.get(p).getHotbar();
|
ItemStack[] hotbar = DefaultHotbar.getItems(p);
|
||||||
for (int i = 0; i < hotbar.size(); i++) {
|
for (int i = 0; i < hotbar.length; i++) {
|
||||||
if (hotbar.get(i) == null) continue;
|
if (hotbar[i] == null) continue;
|
||||||
inv.setItem(i, hotbar.get(i), clickType -> {
|
inv.setItem(i, hotbar[i], clickType -> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
inv.open();
|
inv.open();
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.hotbar;
|
package de.steamwar.bausystem.features.hotbar;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -30,8 +31,9 @@ public class HotbarListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
if (allNull(event.getPlayer().getInventory().getContents()) && allNull(event.getPlayer().getInventory().getArmorContents())) {
|
if (allNull(event.getPlayer().getInventory().getContents()) && allNull(event.getPlayer().getInventory().getArmorContents())) {
|
||||||
DefaultHotbar.get(event.getPlayer()).load();
|
DefaultHotbar.setHotbar(event.getPlayer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ public class InventoryFillBauGuiItem extends BauGuiItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(Player player) {
|
public ItemStack getItem(Player player) {
|
||||||
String loreKey = Config.get(player).isInventoryFill() ? "OTHER_ITEMS_INVENTORY_FILL_LORE_ACTIVE" : "OTHER_ITEMS_INVENTORY_FILL_LORE_INACTIVE";
|
String loreKey = Config.getInstance().get(player).getPlainValueOrDefault("inventoryfill", false) ? "OTHER_ITEMS_INVENTORY_FILL_LORE_ACTIVE" : "OTHER_ITEMS_INVENTORY_FILL_LORE_INACTIVE";
|
||||||
return new SWItem(Material.HOPPER, BauSystem.MESSAGE.parse("OTHER_ITEMS_INVENTORY_FILL_NAME", player), Collections.singletonList(BauSystem.MESSAGE.parse(loreKey, player)), false, clickType -> {}).getItemStack();
|
return new SWItem(Material.HOPPER, BauSystem.MESSAGE.parse("OTHER_ITEMS_INVENTORY_FILL_NAME", player), Collections.singletonList(BauSystem.MESSAGE.parse(loreKey, player)), false, clickType -> {}).getItemStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.inventoryfiller;
|
package de.steamwar.bausystem.features.inventoryfiller;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.configplayer.Config;
|
import de.steamwar.bausystem.configplayer.Config;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import net.md_5.bungee.api.ChatMessageType;
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
@ -38,7 +39,8 @@ public class InventoryFiller implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerDropItem(PlayerDropItemEvent event) {
|
public void onPlayerDropItem(PlayerDropItemEvent event) {
|
||||||
if (!Config.get(event.getPlayer()).isInventoryFill()) return;
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
|
if (!Config.getInstance().get(event.getPlayer()).getPlainValueOrDefault("inventoryfill", false)) return;
|
||||||
if (!event.getPlayer().isSneaking()) return;
|
if (!event.getPlayer().isSneaking()) return;
|
||||||
Block block = event.getPlayer().getTargetBlockExact(5);
|
Block block = event.getPlayer().getTargetBlockExact(5);
|
||||||
if (block == null) return;
|
if (block == null) return;
|
||||||
@ -59,7 +61,8 @@ public class InventoryFiller implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
|
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
|
||||||
if (!Config.get(event.getPlayer()).isInventoryFill()) return;
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
|
if (!Config.getInstance().get(event.getPlayer()).getPlainValueOrDefault("inventoryfill", false)) return;
|
||||||
if (!event.getPlayer().isSneaking()) return;
|
if (!event.getPlayer().isSneaking()) return;
|
||||||
ItemStack itemStack = event.getPlayer().getInventory().getItemInMainHand();
|
ItemStack itemStack = event.getPlayer().getInventory().getItemInMainHand();
|
||||||
if (itemStack.getType() == Material.AIR) return;
|
if (itemStack.getType() == Material.AIR) return;
|
||||||
|
@ -16,8 +16,8 @@ public class InventoryFillerCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(description = {"INVENTORY_FILL_HELP", "INVENTORY_FILL_INFO"})
|
@Register(description = {"INVENTORY_FILL_HELP", "INVENTORY_FILL_INFO"})
|
||||||
public void toggle(Player player) {
|
public void toggle(Player player) {
|
||||||
boolean inventoryFill = Config.get(player).isInventoryFill();
|
boolean inventoryFill = Config.getInstance().get(player).getPlainValueOrDefault("inventoryfill", false);
|
||||||
Config.get(player).setInventoryFill(!inventoryFill);
|
Config.getInstance().get(player).put("inventoryfill", !inventoryFill);
|
||||||
if (!inventoryFill) {
|
if (!inventoryFill) {
|
||||||
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("INVENTORY_FILL_ENABLE", player));
|
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("INVENTORY_FILL_ENABLE", player));
|
||||||
BauSystem.MESSAGE.send("INVENTORY_FILL_INFO", player);
|
BauSystem.MESSAGE.send("INVENTORY_FILL_INFO", player);
|
||||||
|
@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.killchecker;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
|
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
||||||
import de.steamwar.bausystem.utils.bossbar.BossBarService;
|
import de.steamwar.bausystem.utils.bossbar.BossBarService;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
@ -54,7 +55,7 @@ public class KillcheckerCommand extends SWCommand implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "enable", description = "KILLCHECKER_HELP_ENABLE")
|
@Register(value = "enable", description = "KILLCHECKER_HELP_ENABLE")
|
||||||
public void genericCommand(Player player, @OptionalValue("-outline") @StaticValue(value = {"-area", "-outline"}, allowISE = true) boolean onlyOutline) {
|
public void genericCommand(@Validator Player player, @OptionalValue("-outline") @StaticValue(value = {"-area", "-outline"}, allowISE = true) boolean onlyOutline) {
|
||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
KillcheckerVisualizer killcheckerVisualizer = visualizers.computeIfAbsent(region, region1 -> new KillcheckerVisualizer(region1, bossBarService));
|
KillcheckerVisualizer killcheckerVisualizer = visualizers.computeIfAbsent(region, region1 -> new KillcheckerVisualizer(region1, bossBarService));
|
||||||
killcheckerVisualizer.recalc();
|
killcheckerVisualizer.recalc();
|
||||||
@ -74,16 +75,22 @@ public class KillcheckerCommand extends SWCommand implements Listener {
|
|||||||
BauSystem.MESSAGE.send("KILLCHECKER_DISABLE", player);
|
BauSystem.MESSAGE.send("KILLCHECKER_DISABLE", player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBauMemberUpdate(BauMemberUpdateEvent event) {
|
||||||
|
event.getNewSpectator().forEach(this::hide);
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||||
Player player = event.getPlayer();
|
hide(event.getPlayer());
|
||||||
Set<Region> regions = new HashSet<>();
|
}
|
||||||
visualizers.forEach((region, visualizer) -> {
|
|
||||||
if (visualizer.disconnect(player)) {
|
private void hide(Player player) {
|
||||||
regions.add(region);
|
new HashSet<>(visualizers.entrySet()).forEach(regionKillcheckerVisualizerEntry -> {
|
||||||
|
if (regionKillcheckerVisualizerEntry.getValue().hide(player)) {
|
||||||
|
visualizers.remove(regionKillcheckerVisualizerEntry.getKey());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
regions.forEach(visualizers::remove);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recalc(Block block) {
|
private void recalc(Block block) {
|
||||||
|
@ -34,8 +34,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.boss.BarColor;
|
import org.bukkit.boss.BarColor;
|
||||||
import org.bukkit.boss.BarStyle;
|
|
||||||
import org.bukkit.boss.BossBar;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -45,10 +43,25 @@ import java.util.Set;
|
|||||||
|
|
||||||
public class KillcheckerVisualizer {
|
public class KillcheckerVisualizer {
|
||||||
|
|
||||||
private static final Material[] MATERIALS = new Material[] {Material.YELLOW_STAINED_GLASS, Material.ORANGE_STAINED_GLASS, Material.RED_STAINED_GLASS, Material.PURPLE_STAINED_GLASS, Material.BLACK_STAINED_GLASS};
|
private static final Material[] MATERIALS = new Material[]{
|
||||||
|
Material.LIME_STAINED_GLASS,
|
||||||
|
Material.LIME_CONCRETE,
|
||||||
|
Material.GREEN_STAINED_GLASS,
|
||||||
|
Material.GREEN_CONCRETE,
|
||||||
|
Material.YELLOW_STAINED_GLASS,
|
||||||
|
Material.YELLOW_CONCRETE,
|
||||||
|
Material.ORANGE_STAINED_GLASS,
|
||||||
|
Material.ORANGE_CONCRETE,
|
||||||
|
Material.RED_STAINED_GLASS,
|
||||||
|
Material.RED_CONCRETE,
|
||||||
|
Material.PURPLE_STAINED_GLASS,
|
||||||
|
Material.PURPLE_CONCRETE,
|
||||||
|
Material.BLACK_STAINED_GLASS,
|
||||||
|
Material.BLACK_CONCRETE,
|
||||||
|
};
|
||||||
private static final World WORLD = Bukkit.getWorlds().get(0);
|
private static final World WORLD = Bukkit.getWorlds().get(0);
|
||||||
|
|
||||||
private static final double SURROUND = 4;
|
private static final double SURROUND = 4.5;
|
||||||
|
|
||||||
private final Point minPoint;
|
private final Point minPoint;
|
||||||
private final Point maxPoint;
|
private final Point maxPoint;
|
||||||
@ -57,9 +70,6 @@ public class KillcheckerVisualizer {
|
|||||||
private final int zArea;
|
private final int zArea;
|
||||||
private final int xArea;
|
private final int xArea;
|
||||||
|
|
||||||
private final Set<Player> players = new HashSet<>();
|
|
||||||
private final Set<Player> areaPlayers = new HashSet<>();
|
|
||||||
|
|
||||||
private final Region region;
|
private final Region region;
|
||||||
private final BossBarService bossBarService;
|
private final BossBarService bossBarService;
|
||||||
|
|
||||||
@ -261,7 +271,7 @@ public class KillcheckerVisualizer {
|
|||||||
double zPercent = xCount / (double) zArea;
|
double zPercent = xCount / (double) zArea;
|
||||||
percent = (xPercent + yPercent + zPercent) / 3;
|
percent = (xPercent + yPercent + zPercent) / 3;
|
||||||
kills = zKills + yKills + xKills;
|
kills = zKills + yKills + xKills;
|
||||||
players.forEach(this::updateBossBar);
|
outline.getPlayers().forEach(this::updateBossBar);
|
||||||
|
|
||||||
Set<Point> pointSet = new HashSet<>(killCount.keySet());
|
Set<Point> pointSet = new HashSet<>(killCount.keySet());
|
||||||
Set<Point> outlinePointsCacheLast = new HashSet<>(outlinePointsCache);
|
Set<Point> outlinePointsCacheLast = new HashSet<>(outlinePointsCache);
|
||||||
@ -356,40 +366,21 @@ public class KillcheckerVisualizer {
|
|||||||
return new Cuboid(minX, minY, minZ, maxX, maxY, maxZ);
|
return new Cuboid(minX, minY, minZ, maxX, maxY, maxZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean show(Player player, boolean onlyOutline) {
|
public void show(Player player, boolean onlyOutline) {
|
||||||
outline.addPlayer(player);
|
outline.addPlayer(player);
|
||||||
if (!onlyOutline) {
|
if (!onlyOutline) {
|
||||||
inner.addPlayer(player);
|
inner.addPlayer(player);
|
||||||
areaPlayers.add(player);
|
} else {
|
||||||
} else if (areaPlayers.contains(player)) {
|
|
||||||
inner.removePlayer(player);
|
inner.removePlayer(player);
|
||||||
areaPlayers.remove(player);
|
|
||||||
}
|
}
|
||||||
updateBossBar(player);
|
updateBossBar(player);
|
||||||
return players.add(player);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hide(Player player) {
|
public boolean hide(Player player) {
|
||||||
outline.removePlayer(player);
|
outline.removePlayer(player);
|
||||||
if (areaPlayers.contains(player)) {
|
|
||||||
inner.removePlayer(player);
|
inner.removePlayer(player);
|
||||||
}
|
|
||||||
players.remove(player);
|
|
||||||
areaPlayers.remove(player);
|
|
||||||
bossBarService.remove(player, region, "killchecker");
|
bossBarService.remove(player, region, "killchecker");
|
||||||
if (players.isEmpty()) {
|
if (outline.getPlayers().isEmpty() && inner.getPlayers().isEmpty()) {
|
||||||
outline.close();
|
|
||||||
inner.close();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean disconnect(Player player) {
|
|
||||||
players.remove(player);
|
|
||||||
areaPlayers.remove(player);
|
|
||||||
bossBarService.remove(player, region, "killchecker");
|
|
||||||
if (players.isEmpty()) {
|
|
||||||
outline.close();
|
outline.close();
|
||||||
inner.close();
|
inner.close();
|
||||||
return true;
|
return true;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.loader;
|
package de.steamwar.bausystem.features.loader;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.bausystem.features.loader.elements.impl.LoaderTNT;
|
import de.steamwar.bausystem.features.loader.elements.impl.LoaderTNT;
|
||||||
@ -35,9 +36,14 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
public class Loader implements Listener {
|
public class Loader implements Listener {
|
||||||
|
|
||||||
@ -68,25 +74,45 @@ public class Loader implements Listener {
|
|||||||
|
|
||||||
BauSystem.runTaskTimer(BauSystem.getInstance(), () -> {
|
BauSystem.runTaskTimer(BauSystem.getInstance(), () -> {
|
||||||
if (stage != Stage.RUNNING) return;
|
if (stage != Stage.RUNNING) return;
|
||||||
|
if(!Permission.BUILD.hasPermission(p)) return;
|
||||||
if (waitTime > 0) {
|
if (waitTime > 0) {
|
||||||
waitTime--;
|
waitTime--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (currentElement >= elements.size()) {
|
||||||
|
currentElement = 0;
|
||||||
|
if (stage == Stage.SINGLE) {
|
||||||
|
stage = Stage.PAUSE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (currentElement < elements.size()) {
|
while (currentElement < elements.size()) {
|
||||||
LoaderElement element = elements.get(currentElement);
|
LoaderElement element = elements.get(currentElement);
|
||||||
currentElement++;
|
currentElement++;
|
||||||
element.execute(delay -> waitTime = delay);
|
element.execute(delay -> waitTime = delay);
|
||||||
if (waitTime > 0) {
|
if (waitTime > 0) {
|
||||||
break;
|
if (element instanceof LoaderTNT) currentElement--;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (currentElement >= elements.size()) {
|
|
||||||
currentElement = 0;
|
|
||||||
}
|
|
||||||
}, 0, 1);
|
}, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void single() {
|
||||||
|
if (stage == Stage.END) return;
|
||||||
|
if (stage == Stage.RUNNING) return;
|
||||||
|
stage = Stage.SINGLE;
|
||||||
|
if (recorder != null) {
|
||||||
|
recorder.stop();
|
||||||
|
recorder = null;
|
||||||
|
}
|
||||||
|
if (elements.isEmpty()) {
|
||||||
|
BauSystem.MESSAGE.send("LOADER_NOTHING_RECORDED", p);
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
if (stage == Stage.END) return;
|
if (stage == Stage.END) return;
|
||||||
if (stage == Stage.RUNNING) return;
|
if (stage == Stage.RUNNING) return;
|
||||||
@ -121,86 +147,122 @@ public class Loader implements Listener {
|
|||||||
LOADER_MAP.remove(p);
|
LOADER_MAP.remove(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean setTicksBetweenShots(int delay) {
|
||||||
|
if (elements.size() == 0) return false;
|
||||||
|
LoaderElement loaderElement = elements.get(elements.size() - 1);
|
||||||
|
if (loaderElement instanceof LoaderWait) {
|
||||||
|
((LoaderWait) loaderElement).setDelay(delay);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicksBetweenBlocks(int delay) {
|
||||||
|
for (int i = 0; i < elements.size() - 1; i++) {
|
||||||
|
LoaderElement loaderElement = elements.get(i);
|
||||||
|
if (loaderElement instanceof LoaderWait) {
|
||||||
|
((LoaderWait) loaderElement).setDelay(delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void gui(SettingsSorting settingsSorting) {
|
public void gui(SettingsSorting settingsSorting) {
|
||||||
List<SWListInv.SWListEntry<LoaderElement>> list = new ArrayList<>();
|
List<SWListInv.SWListEntry<LoaderElement>> list = new ArrayList<>();
|
||||||
for (LoaderElement element : elements) {
|
AtomicBoolean allWait = new AtomicBoolean(true);
|
||||||
if (settingsSorting != null) {
|
Runnable updateRunnable = () -> {
|
||||||
if (settingsSorting == SettingsSorting.WAIT && !(element instanceof LoaderWait)) {
|
list.clear();
|
||||||
|
for (int i = 0; i < elements.size(); i++) {
|
||||||
|
LoaderElement previous = i > 0 ? elements.get(i - 1) : null;
|
||||||
|
LoaderElement current = elements.get(i);
|
||||||
|
LoaderElement next = i < elements.size() - 1 ? elements.get(i + 1) : null;
|
||||||
|
|
||||||
|
if (!settingsSorting.shouldShow(previous, current, next)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (settingsSorting == SettingsSorting.INTERACTIONS && (element instanceof LoaderWait || element instanceof LoaderTNT)) {
|
|
||||||
continue;
|
if ((!(current instanceof LoaderWait))) {
|
||||||
|
allWait.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWItem item = current.menu(p);
|
||||||
|
if (current instanceof LoaderInteractionElement<?>) {
|
||||||
|
LoaderInteractionElement<?> interactionElement = (LoaderInteractionElement<?>) current;
|
||||||
|
List<String> lore = new ArrayList<>();
|
||||||
|
if (item.getItemMeta() != null && item.getItemMeta().getLore() != null) {
|
||||||
|
lore.addAll(item.getItemMeta().getLore());
|
||||||
|
lore.add("§8");
|
||||||
}
|
}
|
||||||
SWItem item = element.menu(p);
|
lore.add(BauSystem.MESSAGE.parse("LOADER_SETTING_MODES", p, interactionElement.size()));
|
||||||
if (element instanceof LoaderInteractionElement<?>) {
|
lore.add(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", p));
|
||||||
LoaderInteractionElement<?> interactionElement = (LoaderInteractionElement<?>) element;
|
item.setLore(lore);
|
||||||
item.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_MODES", p, interactionElement.size()), "§8", BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", p)));
|
|
||||||
} else {
|
} else {
|
||||||
item.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", p)));
|
List<String> lore = new ArrayList<>();
|
||||||
|
if (item.getItemMeta() != null && item.getItemMeta().getLore() != null) {
|
||||||
|
lore.addAll(item.getItemMeta().getLore());
|
||||||
|
lore.add("§8");
|
||||||
}
|
}
|
||||||
list.add(new SWListInv.SWListEntry<>(item, element));
|
lore.add(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", p));
|
||||||
|
item.setLore(lore);
|
||||||
}
|
}
|
||||||
|
list.add(new SWListInv.SWListEntry<>(item, current));
|
||||||
|
}
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
allWait.set(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
updateRunnable.run();
|
||||||
|
|
||||||
SWListInv<LoaderElement> swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LOADER_GUI_TITLE", p), false, list, (clickType, loaderElement) -> {});
|
SWListInv<LoaderElement> swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LOADER_GUI_TITLE", p), false, list, (clickType, loaderElement) -> {});
|
||||||
swListInv.setCallback((clickType, entry) -> entry.click(p, swListInv::open));
|
swListInv.setCallback((clickType, entry) -> entry.click(p, () -> {
|
||||||
|
updateRunnable.run();
|
||||||
|
swListInv.open();
|
||||||
|
}));
|
||||||
|
|
||||||
SWItem onlyInteractionsElements = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_INTERACTIONS", p), clickType -> {
|
SWItem settingItem = new SWItem(settingsSorting.getMaterial(), "§e" + BauSystem.MESSAGE.parse(settingsSorting.getName(), p), clickType -> {
|
||||||
gui(settingsSorting == SettingsSorting.INTERACTIONS ? null : SettingsSorting.INTERACTIONS);
|
if (clickType == ClickType.LEFT) {
|
||||||
});
|
int index = settingsSorting.ordinal() + 1;
|
||||||
if (settingsSorting == SettingsSorting.INTERACTIONS) onlyInteractionsElements.setEnchanted(true);
|
if (index >= SettingsSorting.LENGTH) {
|
||||||
swListInv.setItem(47, onlyInteractionsElements);
|
index = 0;
|
||||||
|
|
||||||
SWItem onlyWaitElements = new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS", p), clickType -> {
|
|
||||||
gui(settingsSorting == SettingsSorting.WAIT ? null : SettingsSorting.WAIT);
|
|
||||||
});
|
|
||||||
if (settingsSorting == SettingsSorting.WAIT) onlyWaitElements.setEnchanted(true);
|
|
||||||
swListInv.setItem(48, onlyWaitElements);
|
|
||||||
|
|
||||||
if (settingsSorting == SettingsSorting.WAIT) {
|
|
||||||
SWItem waitBetweenTNT = new SWItem(Material.TNT, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_SET_BETWEEN_TNT", p), clickType -> {
|
|
||||||
SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_TITLE", p), "");
|
|
||||||
swAnvilInv.setCallback(s -> {
|
|
||||||
try {
|
|
||||||
long delay = Long.parseLong(s);
|
|
||||||
if (delay < 0) delay = 0;
|
|
||||||
for (int i = 1; i < elements.size() - 1; i++) {
|
|
||||||
if (!(elements.get(i - 1) instanceof LoaderTNT)) continue;
|
|
||||||
if (!(elements.get(i + 1) instanceof LoaderTNT)) continue;
|
|
||||||
if (!(elements.get(i) instanceof LoaderWait)) continue;
|
|
||||||
((LoaderWait) elements.get(i)).setDelay(delay);
|
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException ignored) {
|
gui(SettingsSorting.values()[index]);
|
||||||
|
} else if (clickType == ClickType.RIGHT) {
|
||||||
|
int index = settingsSorting.ordinal() - 1;
|
||||||
|
if (index < 0) {
|
||||||
|
index = SettingsSorting.LENGTH - 1;
|
||||||
}
|
}
|
||||||
gui(settingsSorting);
|
gui(SettingsSorting.values()[index]);
|
||||||
});
|
|
||||||
swAnvilInv.open();
|
|
||||||
});
|
|
||||||
swListInv.setItem(50, waitBetweenTNT);
|
|
||||||
|
|
||||||
SWItem waitTime = new SWItem(Material.PAPER, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_SET_ALL", p), clickType -> {
|
|
||||||
SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_TITLE", p), "");
|
|
||||||
swAnvilInv.setCallback(s -> {
|
|
||||||
try {
|
|
||||||
long delay = Long.parseLong(s);
|
|
||||||
if (delay < 0) delay = 0;
|
|
||||||
long finalDelay = delay;
|
|
||||||
elements.stream()
|
|
||||||
.filter(LoaderWait.class::isInstance)
|
|
||||||
.map(LoaderWait.class::cast)
|
|
||||||
.forEach(loaderWait -> loaderWait.setDelay(finalDelay));
|
|
||||||
} catch (NumberFormatException ignored) {
|
|
||||||
}
|
}
|
||||||
gui(settingsSorting);
|
|
||||||
});
|
});
|
||||||
swAnvilInv.open();
|
List<String> strings = new ArrayList<>();
|
||||||
});
|
for (SettingsSorting setting : SettingsSorting.values()) {
|
||||||
swListInv.setItem(51, waitTime);
|
if (setting == settingsSorting) {
|
||||||
|
strings.add("§e> §7" + BauSystem.MESSAGE.parse(setting.getName(), p));
|
||||||
} else {
|
} else {
|
||||||
SWItem empty = new SWItem(Material.STRUCTURE_VOID, "§7", clickType -> {});
|
strings.add("§8> §7" + BauSystem.MESSAGE.parse(setting.getName(), p));
|
||||||
swListInv.setItem(50, empty);
|
|
||||||
swListInv.setItem(51, empty);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
settingItem.setLore(strings);
|
||||||
|
swListInv.setItem(48, settingItem);
|
||||||
|
|
||||||
|
if (allWait.get()) {
|
||||||
|
SWItem setWait = new SWItem(Material.PAPER, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_SET_ALL", p), clickType -> {
|
||||||
|
SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_TITLE", p), "");
|
||||||
|
swAnvilInv.setCallback(s -> {
|
||||||
|
try {
|
||||||
|
long delay = Math.max(Long.parseLong(s), 0);
|
||||||
|
list.forEach(loaderElementSWListEntry -> {
|
||||||
|
((LoaderWait) loaderElementSWListEntry.getObject()).setDelay(delay);
|
||||||
|
});
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
gui(settingsSorting);
|
||||||
|
});
|
||||||
|
swAnvilInv.open();
|
||||||
|
});
|
||||||
|
swListInv.setItem(50, setWait);
|
||||||
|
} else {
|
||||||
|
swListInv.setItem(50, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§8"));
|
||||||
|
}
|
||||||
swListInv.open();
|
swListInv.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,18 +273,104 @@ public class Loader implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getProgress() {
|
public String getProgress() {
|
||||||
return (currentElement + 1) + "§8/§7" + elements.size();
|
return Math.max(currentElement, 1) + "§8/§7" + elements.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SettingsSorting {
|
public enum SettingsSorting {
|
||||||
WAIT,
|
ALL {
|
||||||
INTERACTIONS,
|
@Override
|
||||||
|
public Material getMaterial() {
|
||||||
|
return Material.STRUCTURE_VOID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "LOADER_GUI_SHOW_ALL";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldShow(LoaderElement previous, LoaderElement current, LoaderElement next) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WAIT {
|
||||||
|
@Override
|
||||||
|
public Material getMaterial() {
|
||||||
|
return Material.CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "LOADER_GUI_SHOW_WAITS";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldShow(LoaderElement previous, LoaderElement current, LoaderElement next) {
|
||||||
|
return current instanceof LoaderWait;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WAIT_BETWEEN_TNT {
|
||||||
|
@Override
|
||||||
|
public Material getMaterial() {
|
||||||
|
return Material.REDSTONE_BLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "LOADER_GUI_SHOW_WAITS_BETWEEN_TNT";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldShow(LoaderElement previous, LoaderElement current, LoaderElement next) {
|
||||||
|
return previous instanceof LoaderTNT && current instanceof LoaderWait && next instanceof LoaderTNT;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
INTERACTIONS {
|
||||||
|
@Override
|
||||||
|
public Material getMaterial() {
|
||||||
|
return Material.REPEATER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "LOADER_GUI_SHOW_INTERACTIONS";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldShow(LoaderElement previous, LoaderElement current, LoaderElement next) {
|
||||||
|
return current instanceof LoaderInteractionElement && !(current instanceof LoaderTNT);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TNT {
|
||||||
|
@Override
|
||||||
|
public Material getMaterial() {
|
||||||
|
return Material.TNT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "LOADER_GUI_SHOW_TNT";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldShow(LoaderElement previous, LoaderElement current, LoaderElement next) {
|
||||||
|
return current instanceof LoaderTNT;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
;
|
||||||
|
|
||||||
|
public static int LENGTH = SettingsSorting.values().length;
|
||||||
|
|
||||||
|
public abstract Material getMaterial();
|
||||||
|
public abstract String getName();
|
||||||
|
public abstract boolean shouldShow(LoaderElement previous, LoaderElement current, LoaderElement next);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum Stage implements EnumDisplay {
|
public enum Stage implements EnumDisplay {
|
||||||
SETUP("LOADER_SETUP"),
|
SETUP("LOADER_SETUP"),
|
||||||
RUNNING("LOADER_RUNNING"),
|
RUNNING("LOADER_RUNNING"),
|
||||||
|
SINGLE("LOADER_SINGLE"),
|
||||||
PAUSE("LOADER_PAUSE"),
|
PAUSE("LOADER_PAUSE"),
|
||||||
END("LOADER_END");
|
END("LOADER_END");
|
||||||
|
|
||||||
|
@ -20,14 +20,15 @@
|
|||||||
package de.steamwar.bausystem.features.loader;
|
package de.steamwar.bausystem.features.loader;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class LoaderCommand extends SWCommand {
|
public class LoaderCommand extends SWCommand implements Listener {
|
||||||
|
|
||||||
public LoaderCommand() {
|
public LoaderCommand() {
|
||||||
super("loader");
|
super("loader");
|
||||||
@ -80,13 +81,42 @@ public class LoaderCommand extends SWCommand {
|
|||||||
public void guiLoader(@Validator Player player) {
|
public void guiLoader(@Validator Player player) {
|
||||||
Loader loader = Loader.getLoader(player);
|
Loader loader = Loader.getLoader(player);
|
||||||
if (loaderNullCheck(loader, player)) return;
|
if (loaderNullCheck(loader, player)) return;
|
||||||
loader.gui(null);
|
loader.gui(Loader.SettingsSorting.ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
@Register(value = "wait", description = "LOADER_HELP_WAIT")
|
||||||
public TypeValidator<Player> loaderValidator() {
|
public void shotDelayLoader(@Validator Player p, @Min(intValue = 1) @ErrorMessage("LOADER_SMALL_TIME") int delay) {
|
||||||
return (commandSender, player, messageSender) -> {
|
Loader loader = Loader.getLoader(p);
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), "LOADER_PERMS");
|
if (loaderNullCheck(loader, p)) return;
|
||||||
};
|
if (loader.setTicksBetweenShots(delay)) {
|
||||||
|
BauSystem.MESSAGE.send("LOADER_NEW_TIME", p, delay);
|
||||||
|
} else {
|
||||||
|
BauSystem.MESSAGE.send("LOADER_SMALL_TIME", p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(value = "speed", description = "LOADER_HELP_SPEED")
|
||||||
|
public void speedLoader(@Validator Player p, @Min(intValue = 0) @ErrorMessage("LOADER_SMALL_TIME") int delay) {
|
||||||
|
Loader loader = Loader.getLoader(p);
|
||||||
|
if (loaderNullCheck(loader, p)) return;
|
||||||
|
BauSystem.MESSAGE.send("LOADER_NEW_LOAD_TIME", p, delay);
|
||||||
|
loader.setTicksBetweenBlocks(delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(value = "single", description = "LOADER_HELP_SINGLE")
|
||||||
|
public void singleLoader(@Validator Player p) {
|
||||||
|
Loader loader = Loader.getLoader(p);
|
||||||
|
if (loaderNullCheck(loader, p)) return;
|
||||||
|
loader.single();
|
||||||
|
BauSystem.MESSAGE.send("LOADER_SINGLE_CMD", p);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBauMemberUpdate(BauMemberUpdateEvent event) {
|
||||||
|
event.getNewSpectator().forEach(player -> {
|
||||||
|
Loader loader = Loader.getLoader(player);
|
||||||
|
if (loader == null) return;
|
||||||
|
loader.stop();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ package de.steamwar.bausystem.features.loader;
|
|||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.SWUtils;
|
import de.steamwar.bausystem.SWUtils;
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
||||||
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.bausystem.features.loader.elements.impl.*;
|
import de.steamwar.bausystem.features.loader.elements.impl.*;
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -33,6 +34,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
@ -41,6 +43,8 @@ import org.bukkit.inventory.EquipmentSlot;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.BiConsumer;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderRecorder implements Listener {
|
public class LoaderRecorder implements Listener {
|
||||||
|
|
||||||
@ -70,7 +74,7 @@ public class LoaderRecorder implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long diff = TPSUtils.currentRealTick.get() - lastInteraction;
|
long diff = TPSUtils.currentRealTick.get() - lastInteraction;
|
||||||
if (last && diff > 160) diff = 160;
|
if (last) diff = 120;
|
||||||
lastInteraction = TPSUtils.currentRealTick.get();
|
lastInteraction = TPSUtils.currentRealTick.get();
|
||||||
loaderElementList.add(new LoaderWait(diff));
|
loaderElementList.add(new LoaderWait(diff));
|
||||||
}
|
}
|
||||||
@ -86,7 +90,34 @@ public class LoaderRecorder implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteractEntity(PlayerInteractEvent event) {
|
public void onBlockBreak(BlockBreakEvent event) {
|
||||||
|
if (event.getPlayer() != player) return;
|
||||||
|
|
||||||
|
boolean removedOne = false;
|
||||||
|
for (int i = 0; i < loaderElementList.size(); i++) {
|
||||||
|
LoaderElement element = loaderElementList.get(i);
|
||||||
|
if (!(element instanceof LoaderInteractionElement)) continue;
|
||||||
|
LoaderInteractionElement interactionElement = (LoaderInteractionElement) element;
|
||||||
|
if (interactionElement.getLocation().equals(event.getBlock().getLocation())) {
|
||||||
|
loaderElementList.remove(i);
|
||||||
|
if (i > 0) {
|
||||||
|
loaderElementList.remove(i - 1);
|
||||||
|
}
|
||||||
|
removedOne = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removedOne) {
|
||||||
|
if (event.getBlock().getType() != Material.TNT) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("LOADER_MESSAGE_UNINTERACT", player));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
if (event.getPlayer() != player) return;
|
if (event.getPlayer() != player) return;
|
||||||
if (player.isSneaking()) return;
|
if (player.isSneaking()) return;
|
||||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL) return;
|
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL) return;
|
||||||
@ -95,53 +126,10 @@ public class LoaderRecorder implements Listener {
|
|||||||
|
|
||||||
addWaitTime(false);
|
addWaitTime(false);
|
||||||
Block block = event.getClickedBlock();
|
Block block = event.getClickedBlock();
|
||||||
Material type = block.getType();
|
getLoaderInteractionElement(block, (loaderInteractionElement, s) -> {
|
||||||
switch (type) {
|
loaderElementList.add(loaderInteractionElement);
|
||||||
case COMPARATOR:
|
message(s);
|
||||||
loaderElementList.add(new LoaderComparator(block.getLocation()));
|
});
|
||||||
message("LOADER_BUTTON_COMPARATOR");
|
|
||||||
break;
|
|
||||||
case REPEATER:
|
|
||||||
loaderElementList.add(new LoaderRepeater(block.getLocation()));
|
|
||||||
message("LOADER_BUTTON_REPEATER");
|
|
||||||
break;
|
|
||||||
case NOTE_BLOCK:
|
|
||||||
loaderElementList.add(new LoaderNoteBlock(block.getLocation()));
|
|
||||||
message("LOADER_BUTTON_NOTEBLOCK");
|
|
||||||
break;
|
|
||||||
case LEVER:
|
|
||||||
loaderElementList.add(new LoaderLever(block.getLocation()));
|
|
||||||
message("LOADER_BUTTON_SWITCH");
|
|
||||||
break;
|
|
||||||
case DAYLIGHT_DETECTOR:
|
|
||||||
loaderElementList.add(new LoaderDaylightDetector(block.getLocation()));
|
|
||||||
message("LOADER_BUTTON_DAYLIGHT_DETECTOR");
|
|
||||||
break;
|
|
||||||
case LECTERN:
|
|
||||||
loaderElementList.add(new LoaderLectern(block.getLocation()));
|
|
||||||
message("LOADER_BUTTON_LECTERN");
|
|
||||||
break;
|
|
||||||
case IRON_TRAPDOOR:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (type.name().endsWith("_TRAPDOOR")) {
|
|
||||||
loaderElementList.add(new LoaderOpenable(block.getLocation(), "LOADER_BUTTON_TRAPDOOR", type));
|
|
||||||
message("LOADER_BUTTON_TRAPDOOR");
|
|
||||||
} else if (type.name().endsWith("_DOOR")) {
|
|
||||||
loaderElementList.add(new LoaderOpenable(block.getLocation(), "LOADER_BUTTON_DOOR", type));
|
|
||||||
message("LOADER_BUTTON_DOOR");
|
|
||||||
} else if (type.name().endsWith("FENCE_GATE")) {
|
|
||||||
loaderElementList.add(new LoaderOpenable(block.getLocation(), "LOADER_BUTTON_FENCEGATE", type));
|
|
||||||
message("LOADER_BUTTON_FENCEGATE");
|
|
||||||
} else if (type.name().endsWith("STONE_BUTTON")) {
|
|
||||||
loaderElementList.add(new LoaderTicks(block.getLocation(), "LOADER_BUTTON_STONE_BUTTON", type, 20));
|
|
||||||
message("LOADER_BUTTON_STONE_BUTTON");
|
|
||||||
} else if (type.name().endsWith("BUTTON")) {
|
|
||||||
loaderElementList.add(new LoaderTicks(block.getLocation(), "LOADER_BUTTON_WOOD_BUTTON", type, 30));
|
|
||||||
message("LOADER_BUTTON_WOOD_BUTTON");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<Location, Long> blockSet = new HashMap<>();
|
private Map<Location, Long> blockSet = new HashMap<>();
|
||||||
@ -197,6 +185,46 @@ public class LoaderRecorder implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void getLoaderInteractionElement(Block block, BiConsumer<LoaderInteractionElement<?>, String> consumer) {
|
||||||
|
Material type = block.getType();
|
||||||
|
switch (type) {
|
||||||
|
case COMPARATOR:
|
||||||
|
consumer.accept(new LoaderComparator(block.getLocation()), "LOADER_BUTTON_COMPARATOR");
|
||||||
|
break;
|
||||||
|
case REPEATER:
|
||||||
|
consumer.accept(new LoaderRepeater(block.getLocation()), "LOADER_BUTTON_REPEATER");
|
||||||
|
break;
|
||||||
|
case NOTE_BLOCK:
|
||||||
|
consumer.accept(new LoaderNoteBlock(block.getLocation()), "LOADER_BUTTON_NOTEBLOCK");
|
||||||
|
break;
|
||||||
|
case LEVER:
|
||||||
|
consumer.accept(new LoaderLever(block.getLocation()), "LOADER_BUTTON_SWITCH");
|
||||||
|
break;
|
||||||
|
case DAYLIGHT_DETECTOR:
|
||||||
|
consumer.accept(new LoaderDaylightDetector(block.getLocation()), "LOADER_BUTTON_DAYLIGHT_DETECTOR");
|
||||||
|
break;
|
||||||
|
case LECTERN:
|
||||||
|
consumer.accept(new LoaderLectern(block.getLocation()), "LOADER_BUTTON_LECTERN");
|
||||||
|
break;
|
||||||
|
case IRON_TRAPDOOR:
|
||||||
|
case IRON_DOOR:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (type.name().endsWith("_TRAPDOOR")) {
|
||||||
|
consumer.accept(new LoaderOpenable(block.getLocation(), "LOADER_BUTTON_TRAPDOOR", type), "LOADER_BUTTON_TRAPDOOR");
|
||||||
|
} else if (type.name().endsWith("_DOOR")) {
|
||||||
|
consumer.accept(new LoaderOpenable(block.getLocation(), "LOADER_BUTTON_DOOR", type), "LOADER_BUTTON_DOOR");
|
||||||
|
} else if (type.name().endsWith("FENCE_GATE")) {
|
||||||
|
consumer.accept(new LoaderOpenable(block.getLocation(), "LOADER_BUTTON_FENCEGATE", type), "LOADER_BUTTON_FENCEGATE");
|
||||||
|
} else if (type.name().endsWith("STONE_BUTTON")) {
|
||||||
|
consumer.accept(new LoaderTicks(block.getLocation(), "LOADER_BUTTON_STONE_BUTTON", type, 20), "LOADER_BUTTON_STONE_BUTTON");
|
||||||
|
} else if (type.name().endsWith("BUTTON")) {
|
||||||
|
consumer.accept(new LoaderTicks(block.getLocation(), "LOADER_BUTTON_WOOD_BUTTON", type, 30), "LOADER_BUTTON_WOOD_BUTTON");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void message(String type) {
|
private void message(String type) {
|
||||||
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("LOADER_MESSAGE_INTERACT", player, BauSystem.MESSAGE.parse(type, player), loaderElementList.size()));
|
SWUtils.sendToActionbar(player, BauSystem.MESSAGE.parse("LOADER_MESSAGE_INTERACT", player, BauSystem.MESSAGE.parse(type, player), loaderElementList.size()));
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.loader;
|
package de.steamwar.bausystem.features.loader;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.utils.ScoreboardElement;
|
import de.steamwar.bausystem.utils.ScoreboardElement;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
@ -40,6 +41,7 @@ public class LoaderScoreboardElement implements ScoreboardElement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String get(Region region, Player p) {
|
public String get(Region region, Player p) {
|
||||||
|
if(!Permission.BUILD.hasPermission(p)) return null;
|
||||||
Loader loader = Loader.getLoader(p);
|
Loader loader = Loader.getLoader(p);
|
||||||
if (loader == null) return null;
|
if (loader == null) return null;
|
||||||
if (loader.getStage() == Loader.Stage.RUNNING) {
|
if (loader.getStage() == Loader.Stage.RUNNING) {
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2023 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements;
|
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.inventory.SWItem;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
public interface ElementSettings {
|
|
||||||
SWItem menu(Player player);
|
|
||||||
void execute(Consumer<Long> delay);
|
|
||||||
void click(Player player, Runnable backAction, Runnable deleteAction);
|
|
||||||
|
|
||||||
default void playerInteract() {}
|
|
||||||
|
|
||||||
default String translateItemName(String name, String mode, Player player, Object... args) {
|
|
||||||
return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player, args));
|
|
||||||
}
|
|
||||||
}
|
|
@ -20,56 +20,94 @@
|
|||||||
package de.steamwar.bausystem.features.loader.elements;
|
package de.steamwar.bausystem.features.loader.elements;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.inventory.SWAnvilInv;
|
||||||
|
import de.steamwar.inventory.SWInventory;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.inventory.SWListInv;
|
import de.steamwar.inventory.SWListInv;
|
||||||
|
import lombok.Getter;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.*;
|
||||||
import org.bukkit.block.data.FaceAttachable;
|
import org.bukkit.block.data.type.Door;
|
||||||
import org.bukkit.block.data.type.Switch;
|
import org.bukkit.block.data.type.Switch;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public abstract class LoaderInteractionElement<T extends ElementSettings> implements LoaderElement {
|
public abstract class LoaderInteractionElement<T extends Enum<T> & LoaderSettingsEnum> implements LoaderElement {
|
||||||
|
|
||||||
|
@Getter
|
||||||
protected final Location location;
|
protected final Location location;
|
||||||
protected int currentShot = 0;
|
protected int currentShot = 0;
|
||||||
|
protected T defaultSetting;
|
||||||
|
protected T newSetting;
|
||||||
|
protected T[] allSettings;
|
||||||
protected List<T> elements = new ArrayList<>();
|
protected List<T> elements = new ArrayList<>();
|
||||||
|
protected List<Integer> extraPower = new ArrayList<>();
|
||||||
|
protected List<Long> extraTicks = new ArrayList<>();
|
||||||
|
protected int settingsGuiSize = 0;
|
||||||
|
|
||||||
protected LoaderInteractionElement(Location location) {
|
protected LoaderInteractionElement(Location location, T defaultSetting, T newSetting, T[] allSettings) {
|
||||||
this.location = location;
|
this.location = location;
|
||||||
|
|
||||||
T element = createNewElement();
|
this.defaultSetting = defaultSetting;
|
||||||
element.playerInteract();
|
this.newSetting = newSetting;
|
||||||
elements.add(element);
|
this.allSettings = allSettings;
|
||||||
|
|
||||||
|
elements.add(defaultSetting);
|
||||||
|
extraPower.add(0);
|
||||||
|
extraTicks.add(0L);
|
||||||
|
|
||||||
|
for (T element : allSettings) {
|
||||||
|
settingsGuiSize = Math.max(element.getPos(), settingsGuiSize);
|
||||||
|
}
|
||||||
|
while (settingsGuiSize % 9 != 0) settingsGuiSize++;
|
||||||
|
settingsGuiSize += 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public void execute(Consumer<Long> delay) {
|
||||||
if (currentShot >= elements.size()) currentShot = 0;
|
if (currentShot >= elements.size()) currentShot = 0;
|
||||||
elements.get(currentShot).execute(delay);
|
if (checkBlockInWorld()) {
|
||||||
|
BlockData blockData = location.getBlock().getBlockData();
|
||||||
|
elements.get(currentShot).execute(location, blockData, this, extraPower.get(currentShot), extraTicks.get(currentShot), delay);
|
||||||
|
}
|
||||||
currentShot++;
|
currentShot++;
|
||||||
if (currentShot >= elements.size()) currentShot = 0;
|
if (currentShot >= elements.size()) currentShot = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction) {
|
public void click(Player player, Runnable backAction) {
|
||||||
List<SWListInv.SWListEntry<T>> entries = new ArrayList<>();
|
List<SWListInv.SWListEntry<Integer>> entries = new ArrayList<>();
|
||||||
for (T element : elements) {
|
Runnable updateRunnable = () -> {
|
||||||
entries.add(new SWListInv.SWListEntry<>(element.menu(player), element));
|
entries.clear();
|
||||||
|
for (int i = 0; i < elements.size(); i++) {
|
||||||
|
SWItem swItem = elements.get(i).menu(player, this, extraPower.get(i), extraTicks.get(i));
|
||||||
|
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
||||||
|
entries.add(new SWListInv.SWListEntry<>(swItem, i));
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
updateRunnable.run();
|
||||||
|
|
||||||
SWListInv<T> listInv = new SWListInv<>(player, "Interaction Settings", false, entries, (clickType, entry) -> {
|
SWListInv<Integer> listInv = new SWListInv<>(player, "Interaction Settings", false, entries, (clickType, entry) -> {});
|
||||||
entry.click(player, () -> {
|
listInv.setCallback((clickType, entry) -> {
|
||||||
click(player, backAction);
|
openIndividualSettingsMenu(player, entry, () -> {
|
||||||
|
updateRunnable.run();
|
||||||
|
listInv.open();
|
||||||
}, () -> {
|
}, () -> {
|
||||||
if (elements.size() == 1) return;
|
elements.remove((int) entry);
|
||||||
elements.remove(entry);
|
extraPower.remove((int) entry);
|
||||||
|
extraTicks.remove((int) entry);
|
||||||
|
if (elements.isEmpty()) {
|
||||||
|
elements.add(newSetting);
|
||||||
|
extraPower.add(0);
|
||||||
|
extraTicks.add(1L);
|
||||||
|
}
|
||||||
click(player, backAction);
|
click(player, backAction);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -77,48 +115,190 @@ public abstract class LoaderInteractionElement<T extends ElementSettings> implem
|
|||||||
backAction.run();
|
backAction.run();
|
||||||
}));
|
}));
|
||||||
listInv.setItem(50, new SWItem(Material.GHAST_SPAWN_EGG, "§7Insert another Setting", clickType -> {
|
listInv.setItem(50, new SWItem(Material.GHAST_SPAWN_EGG, "§7Insert another Setting", clickType -> {
|
||||||
T element = createNewElement();
|
elements.add(defaultSetting);
|
||||||
elements.add(element);
|
extraPower.add(0);
|
||||||
element.click(player, () -> click(player, backAction), () -> {
|
extraTicks.add(1L);
|
||||||
if (elements.size() == 1) return;
|
openIndividualSettingsMenu(player, elements.size() - 1, () -> {
|
||||||
elements.remove(element);
|
updateRunnable.run();
|
||||||
|
listInv.open();
|
||||||
|
}, () -> {
|
||||||
|
elements.remove(elements.size() - 1);
|
||||||
|
extraPower.remove(extraPower.size() - 1);
|
||||||
|
extraTicks.remove(extraTicks.size() - 1);
|
||||||
|
if (elements.isEmpty()) {
|
||||||
|
elements.add(newSetting);
|
||||||
|
extraPower.add(0);
|
||||||
|
extraTicks.add(1L);
|
||||||
|
}
|
||||||
click(player, backAction);
|
click(player, backAction);
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
listInv.open();
|
listInv.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openIndividualSettingsMenu(Player player, int index, Runnable back, Runnable delete) {
|
||||||
|
T currentElement = elements.get(index);
|
||||||
|
int guiSize = settingsGuiSize;
|
||||||
|
int powerStart = guiSize - 9;
|
||||||
|
if (currentElement.hasPower(this)) {
|
||||||
|
guiSize += 18;
|
||||||
|
}
|
||||||
|
int ticksStart = guiSize - 9;
|
||||||
|
if (currentElement.hasTicks(this)) {
|
||||||
|
guiSize += 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWInventory swInventory = new SWInventory(player, guiSize, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
||||||
|
for (int i = guiSize - 9; i < guiSize; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7", clickType -> {}));
|
||||||
|
swInventory.setItem(guiSize - 9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> back.run());
|
||||||
|
swInventory.setItem(guiSize - 5, new SWItem(Material.WOODEN_AXE, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_COPY", player)).getItemStack(), clickType -> {
|
||||||
|
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_GUI_COPY_TITLE", player), "1");
|
||||||
|
swAnvilInv.setCallback(s -> {
|
||||||
|
try {
|
||||||
|
int count = Integer.parseInt(s);
|
||||||
|
if (count < 1) count = 1;
|
||||||
|
if (count > 65536) count = 65536;
|
||||||
|
|
||||||
|
int power = extraPower.get(index);
|
||||||
|
long ticks = extraTicks.get(index);
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
elements.add(currentElement);
|
||||||
|
extraPower.add(power);
|
||||||
|
extraTicks.add(ticks);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 1) {
|
||||||
|
openIndividualSettingsMenu(player, elements.size() - 1, back, delete);
|
||||||
|
} else {
|
||||||
|
back.run();
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
back.run();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
swAnvilInv.open();
|
||||||
|
});
|
||||||
|
swInventory.setItem(guiSize - 1, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> delete.run());
|
||||||
|
|
||||||
|
for (T element : allSettings) {
|
||||||
|
SWItem item = element.menu(player, this, extraPower.get(index), extraTicks.get(index));
|
||||||
|
if (element == currentElement) {
|
||||||
|
item.setEnchanted(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
swInventory.setItem(element.getPos(), item.getItemStack(), clickType -> {
|
||||||
|
elements.set(index, element);
|
||||||
|
openIndividualSettingsMenu(player, index, back, delete);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentElement.hasPower(this)) {
|
||||||
|
for (int power = 0; power < 16; power++) {
|
||||||
|
int finalPowerPosition = power;
|
||||||
|
if (power >= 9) finalPowerPosition++;
|
||||||
|
SWItem powerItem = new SWItem(Material.REDSTONE, BauSystem.MESSAGE.parse("LOADER_SETTING_POWER", player, power), Arrays.asList(), false, clickType -> {});
|
||||||
|
powerItem.getItemStack().setAmount(Math.max(power, 1));
|
||||||
|
if (extraPower.get(index) == power) powerItem.setEnchanted(true);
|
||||||
|
|
||||||
|
int finalPower = power;
|
||||||
|
swInventory.setItem(finalPowerPosition + powerStart, powerItem.getItemStack(), clickType -> {
|
||||||
|
extraPower.set(index, finalPower);
|
||||||
|
openIndividualSettingsMenu(player, index, back, delete);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentElement.hasTicks(this)) {
|
||||||
|
swInventory.setItem(ticksStart + 3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
|
||||||
|
long ticks = extraTicks.get(index);
|
||||||
|
ticks -= clickType.isShiftClick() ? 5 : 1;
|
||||||
|
if (ticks < 1) ticks = 1;
|
||||||
|
extraTicks.set(index, ticks);
|
||||||
|
openIndividualSettingsMenu(player, index, back, delete);
|
||||||
|
});
|
||||||
|
|
||||||
|
SWItem ticksItem = new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS", player, extraTicks.get(index)), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)), false, clickType -> {});
|
||||||
|
ticksItem.getItemStack().setAmount((int) Math.min(extraTicks.get(index), 64));
|
||||||
|
swInventory.setItem(ticksStart + 4, ticksItem.getItemStack(), clickType -> {
|
||||||
|
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_NAME", player), extraTicks.get(index) + "");
|
||||||
|
swAnvilInv.setCallback(s -> {
|
||||||
|
try {
|
||||||
|
long ticks = Long.parseLong(s);
|
||||||
|
if (ticks < 1) ticks = 1;
|
||||||
|
extraTicks.set(index, ticks);
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
openIndividualSettingsMenu(player, index, back, delete);
|
||||||
|
});
|
||||||
|
swAnvilInv.open();
|
||||||
|
});
|
||||||
|
|
||||||
|
swInventory.setItem(ticksStart + 5, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
|
||||||
|
long ticks = extraTicks.get(index);
|
||||||
|
ticks += clickType.isShiftClick() ? 5 : 1;
|
||||||
|
extraTicks.set(index, ticks);
|
||||||
|
openIndividualSettingsMenu(player, index, back, delete);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
swInventory.open();
|
||||||
|
}
|
||||||
|
|
||||||
protected void update(BlockData blockData) {
|
protected void update(BlockData blockData) {
|
||||||
Material material = blockData.getMaterial();
|
|
||||||
Block block = location.getBlock();
|
Block block = location.getBlock();
|
||||||
if (blockData instanceof Switch) {
|
if (blockData instanceof Door) {
|
||||||
|
Door door = (Door) blockData;
|
||||||
|
block.setBlockData(door);
|
||||||
|
if (door.getHalf() == Bisected.Half.BOTTOM) {
|
||||||
|
updateBlock(block.getRelative(BlockFace.UP), door.isOpen() ? 15 : 0);
|
||||||
|
} else {
|
||||||
|
updateBlock(block.getRelative(BlockFace.DOWN), door.isOpen() ? 15 : 0);
|
||||||
|
}
|
||||||
|
} else if (blockData instanceof Switch) {
|
||||||
Switch sw = (Switch) blockData;
|
Switch sw = (Switch) blockData;
|
||||||
updateBlock(block, sw);
|
updateBlock(block, sw);
|
||||||
FaceAttachable.AttachedFace face = sw.getAttachedFace();
|
FaceAttachable.AttachedFace face = sw.getAttachedFace();
|
||||||
if (face == FaceAttachable.AttachedFace.FLOOR) {
|
if (face == FaceAttachable.AttachedFace.FLOOR) {
|
||||||
updateBlock(block.getRelative(BlockFace.DOWN));
|
updateBlock(block.getRelative(BlockFace.DOWN), sw.isPowered() ? 15 : 0);
|
||||||
} else if (face == FaceAttachable.AttachedFace.CEILING) {
|
} else if (face == FaceAttachable.AttachedFace.CEILING) {
|
||||||
updateBlock(block.getRelative(BlockFace.UP));
|
updateBlock(block.getRelative(BlockFace.UP), sw.isPowered() ? 15 : 0);
|
||||||
} else {
|
} else {
|
||||||
updateBlock(block.getRelative(sw.getFacing().getOppositeFace()));
|
updateBlock(block.getRelative(sw.getFacing().getOppositeFace()), sw.isPowered() ? 15 : 0);
|
||||||
}
|
}
|
||||||
} else if (material == Material.TRIPWIRE) {
|
} else if (blockData instanceof Powerable) {
|
||||||
|
updateBlock(block, blockData);
|
||||||
|
updateBlock(block.getRelative(BlockFace.DOWN), ((Powerable) blockData).isPowered() ? 15 : 0);
|
||||||
|
} else if (blockData instanceof AnaloguePowerable) {
|
||||||
|
updateBlock(block, blockData);
|
||||||
|
updateBlock(block.getRelative(BlockFace.DOWN), ((AnaloguePowerable) blockData).getPower());
|
||||||
|
} else {
|
||||||
updateBlock(block, blockData);
|
updateBlock(block, blockData);
|
||||||
} else if (material.name().endsWith("_PLATE")) {
|
|
||||||
updateBlock(block.getRelative(BlockFace.DOWN));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateBlock(Block block) {
|
private void updateBlock(Block block, int powered) {
|
||||||
updateBlock(block, block.getBlockData());
|
BlockData data = block.getBlockData();
|
||||||
|
if (data instanceof Door) {
|
||||||
|
Door door = (Door) data;
|
||||||
|
door.setOpen(powered > 0);
|
||||||
|
block.setBlockData(door);
|
||||||
|
return;
|
||||||
|
} else if (data instanceof Powerable) {
|
||||||
|
Powerable powerable = (Powerable) data;
|
||||||
|
powerable.setPowered(powered > 0);
|
||||||
|
} else if (data instanceof AnaloguePowerable) {
|
||||||
|
AnaloguePowerable analoguePowerable = (AnaloguePowerable) data;
|
||||||
|
analoguePowerable.setPower(powered);
|
||||||
|
}
|
||||||
|
updateBlock(block, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateBlock(Block block, BlockData data) {
|
private void updateBlock(Block block, BlockData data) {
|
||||||
block.setType(Material.BARRIER, true);
|
block.setType(Material.BARRIER);
|
||||||
block.setBlockData(data, true);
|
block.setBlockData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract T createNewElement();
|
public abstract boolean checkBlockInWorld();
|
||||||
|
|
||||||
protected final String translateItemName(String name, Player player) {
|
protected final String translateItemName(String name, Player player) {
|
||||||
return BauSystem.MESSAGE.parse("LOADER_SETTING_NAME", player, BauSystem.MESSAGE.parse(name, player));
|
return BauSystem.MESSAGE.parse("LOADER_SETTING_NAME", player, BauSystem.MESSAGE.parse(name, player));
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.features.loader.elements;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.inventory.SWItem;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
public interface LoaderSettingsEnum<T, P extends LoaderInteractionElement<E>, E extends Enum<E> & LoaderSettingsEnum<T, P, E>> {
|
||||||
|
int getPos();
|
||||||
|
SWItem menu(Player player, P parent, int power, long ticks);
|
||||||
|
default boolean hasPower(P parent) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
default boolean hasTicks(P parent) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void execute(Location location, T blockData, P parent, int power, long ticks, Consumer<Long> delay);
|
||||||
|
|
||||||
|
default String translateItemName(String name, String mode, Player player, Object... args) {
|
||||||
|
return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player, args));
|
||||||
|
}
|
||||||
|
}
|
@ -19,10 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -30,95 +28,83 @@ import org.bukkit.block.data.type.Comparator;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderComparator extends LoaderInteractionElement<LoaderComparator.ComparatorSettings> {
|
public class LoaderComparator extends LoaderInteractionElement<LoaderComparator.ComparatorSettingsEnum> {
|
||||||
|
|
||||||
public LoaderComparator(Location location) {
|
public LoaderComparator(Location location) {
|
||||||
super(location);
|
super(location, ComparatorSettingsEnum.INTERACT, ComparatorSettingsEnum.NOOP, ComparatorSettingsEnum.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ComparatorSettings implements ElementSettings {
|
public enum ComparatorSettingsEnum implements LoaderSettingsEnum<Comparator, LoaderComparator, ComparatorSettingsEnum> {
|
||||||
|
NOOP {
|
||||||
private boolean interact = false;
|
|
||||||
private Comparator.Mode mode = Comparator.Mode.COMPARE;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, interact, mode);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean interact, Comparator.Mode mode) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (interact) {
|
|
||||||
swItem = new SWItem(Material.STICK, "§7Comparator§8: §eInteract");
|
|
||||||
} else if (mode == null) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, "§7Comparator§8: §eNOOP");
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(Material.COMPARATOR, "§7Comparator§8: §e" + mode.name());
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderComparator parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != Material.COMPARATOR) return;
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_COMPARATOR", "LOADER_INTERACTION_NOOP", player));
|
||||||
Comparator comparator = (Comparator) location.getBlock().getBlockData();
|
|
||||||
if (interact) {
|
|
||||||
comparator.setMode(comparator.getMode() == Comparator.Mode.COMPARE ? Comparator.Mode.SUBTRACT : Comparator.Mode.COMPARE);
|
|
||||||
} else if (mode == null) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
comparator.setMode(mode);
|
|
||||||
}
|
|
||||||
location.getBlock().setBlockData(comparator, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public void execute(Location location, Comparator blockData, LoaderComparator parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(17, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, false, null).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
mode = null;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(3, item(player, true, null).getItemStack(), clickType -> {
|
|
||||||
interact = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(5, item(player, false, Comparator.Mode.COMPARE).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
mode = Comparator.Mode.COMPARE;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, Comparator.Mode.SUBTRACT).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
mode = Comparator.Mode.SUBTRACT;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
swInventory.open();
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
private SWItem item(Player player, boolean interact, Comparator.Mode mode) {
|
INTERACT {
|
||||||
SWItem swItem = menu(player, interact, mode);
|
@Override
|
||||||
if (swItem.getItemStack().equals(menu(player, this.interact, this.mode).getItemStack())) {
|
public int getPos() {
|
||||||
swItem.setEnchanted(true);
|
return 3;
|
||||||
}
|
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playerInteract() {
|
public SWItem menu(Player player, LoaderComparator parent, int power, long ticks) {
|
||||||
interact = true;
|
return new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_COMPARATOR", "LOADER_INTERACTION_INTERACT", player));
|
||||||
mode = null;
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Comparator blockData, LoaderComparator parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setMode(blockData.getMode() == Comparator.Mode.COMPARE ? Comparator.Mode.SUBTRACT : Comparator.Mode.COMPARE);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
COMPARE {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderComparator parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.COMPARATOR, translateItemName("LOADER_BUTTON_COMPARATOR", "LOADER_INTERACTION_COMPARE", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Comparator blockData, LoaderComparator parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setMode(Comparator.Mode.COMPARE);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
SUBTRACT {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderComparator parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.COMPARATOR, translateItemName("LOADER_BUTTON_COMPARATOR", "LOADER_INTERACTION_SUBTRACT", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Comparator blockData, LoaderComparator parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setMode(Comparator.Mode.SUBTRACT);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +116,7 @@ public class LoaderComparator extends LoaderInteractionElement<LoaderComparator.
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ComparatorSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new ComparatorSettings();
|
return location.getBlock().getType() == Material.COMPARATOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,130 +19,98 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.type.DaylightDetector;
|
import org.bukkit.block.data.type.DaylightDetector;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderDaylightDetector extends LoaderInteractionElement<LoaderDaylightDetector.DaylightDetectorSettings> {
|
public class LoaderDaylightDetector extends LoaderInteractionElement<LoaderDaylightDetector.DaylightSettingsEnum> {
|
||||||
|
|
||||||
public LoaderDaylightDetector(Location location) {
|
public LoaderDaylightDetector(Location location) {
|
||||||
super(location);
|
super(location, DaylightSettingsEnum.INTERACT, DaylightSettingsEnum.NOOP, DaylightSettingsEnum.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DaylightDetectorSettings implements ElementSettings {
|
public enum DaylightSettingsEnum implements LoaderSettingsEnum<DaylightDetector, LoaderDaylightDetector, DaylightSettingsEnum> {
|
||||||
|
NOOP {
|
||||||
private boolean noop = false;
|
|
||||||
private boolean interact = false;
|
|
||||||
private boolean inverted = true;
|
|
||||||
private int power = 0;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, noop, interact, inverted);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean noop, boolean interact, boolean powered) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (noop) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else if (interact) {
|
|
||||||
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", "LOADER_INTERACTION_INTERACT", player));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(Material.DAYLIGHT_DETECTOR, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", powered ? "LOADER_INTERACTION_POWERED": "LOADER_INTERACTION_UNPOWERED", player));
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderDaylightDetector parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != Material.DAYLIGHT_DETECTOR) return;
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", "LOADER_INTERACTION_NOOP", player));
|
||||||
DaylightDetector daylightDetector = (DaylightDetector) location.getBlock().getBlockData();
|
|
||||||
if (noop) {
|
|
||||||
return;
|
|
||||||
} else if (interact) {
|
|
||||||
daylightDetector.setInverted(!daylightDetector.isInverted());
|
|
||||||
} else {
|
|
||||||
daylightDetector.setInverted(inverted);
|
|
||||||
}
|
|
||||||
daylightDetector.setPower(daylightDetector.isInverted() ? 15 - power : power);
|
|
||||||
location.getBlock().setBlockData(daylightDetector);
|
|
||||||
updateBlock(location.getBlock().getRelative(0, -1, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public void execute(Location location, DaylightDetector blockData, LoaderDaylightDetector parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
SWInventory swInventory = new SWInventory(player, 36, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
|
||||||
for (int i = 27; i < 35; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
|
||||||
swInventory.setItem(27, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(35, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, true, false, false).getItemStack(), clickType -> {
|
|
||||||
noop = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(3, item(player, false, true, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(5, item(player, false, false, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = false;
|
|
||||||
inverted = false;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, false, true).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = false;
|
|
||||||
inverted = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
for (int i = 0; i < 16; i++) {
|
|
||||||
int finalI = i;
|
|
||||||
int finalI2 = i;
|
|
||||||
if (i >= 9) finalI2++;
|
|
||||||
swInventory.setItem(finalI2 + 9, item(player, finalI).getItemStack(), clickType -> {
|
|
||||||
power = finalI;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
swInventory.open();
|
INTERACT {
|
||||||
}
|
@Override
|
||||||
|
public int getPos() {
|
||||||
private SWItem item(Player player, boolean noop, boolean interact, boolean inverted) {
|
return 3;
|
||||||
SWItem swItem = menu(player, noop, interact, inverted);
|
|
||||||
if (swItem.getItemStack().equals(menu(player, this.noop, this.interact, this.inverted).getItemStack())) {
|
|
||||||
swItem.setEnchanted(true);
|
|
||||||
}
|
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem item(Player player, int power) {
|
|
||||||
SWItem swItem = new SWItem(power == 0 ? Material.GUNPOWDER : Material.REDSTONE, BauSystem.MESSAGE.parse("LOADER_SETTING_POWER", player, power));
|
|
||||||
swItem.getItemStack().setAmount(power == 0 ? 1 : power);
|
|
||||||
if (!this.noop && this.power == power) swItem.setEnchanted(true);
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playerInteract() {
|
public SWItem menu(Player player, LoaderDaylightDetector parent, int power, long ticks) {
|
||||||
noop = false;
|
return new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", "LOADER_INTERACTION_INTERACT", player));
|
||||||
interact = true;
|
}
|
||||||
inverted = false;
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, DaylightDetector blockData, LoaderDaylightDetector parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setInverted(!blockData.isInverted());
|
||||||
|
blockData.setPower(15 - blockData.getPower());
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
DAY_MODE {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderDaylightDetector parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.DAYLIGHT_DETECTOR, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", "LOADER_INTERACTION_UNPOWERED", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, DaylightDetector blockData, LoaderDaylightDetector parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (blockData.isInverted()) {
|
||||||
|
blockData.setInverted(false);
|
||||||
|
blockData.setPower(15 - blockData.getPower());
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
NIGHT_MODE {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderDaylightDetector parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.DAYLIGHT_DETECTOR, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", "LOADER_INTERACTION_POWERED", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, DaylightDetector blockData, LoaderDaylightDetector parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.isInverted()) {
|
||||||
|
blockData.setInverted(true);
|
||||||
|
blockData.setPower(15 - blockData.getPower());
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +120,7 @@ public class LoaderDaylightDetector extends LoaderInteractionElement<LoaderDayli
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DaylightDetectorSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new DaylightDetectorSettings();
|
return location.getBlock().getType() == Material.DAYLIGHT_DETECTOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,127 +19,493 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Lectern;
|
import org.bukkit.block.Lectern;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.BookMeta;
|
import org.bukkit.inventory.meta.BookMeta;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderLectern extends LoaderInteractionElement<LoaderLectern.LecternSettings> {
|
public class LoaderLectern extends LoaderInteractionElement<LoaderLectern.LecternSettingsEnum> {
|
||||||
|
|
||||||
|
|
||||||
public LoaderLectern(Location location) {
|
public LoaderLectern(Location location) {
|
||||||
super(location);
|
super(location, LecternSettingsEnum.NEXT_PAGE, LecternSettingsEnum.NOOP, LecternSettingsEnum.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LecternSettings implements ElementSettings {
|
public enum LecternSettingsEnum implements LoaderSettingsEnum<org.bukkit.block.data.type.Lectern, LoaderLectern, LecternSettingsEnum> {
|
||||||
|
NOOP {
|
||||||
private boolean noop = true;
|
|
||||||
private LecternAction action = LecternAction.PAGE_NEXT;
|
|
||||||
private int page = 0;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, noop, action, page);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean noop, LecternAction action, int page) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (noop) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else if (action == LecternAction.PAGE_PREV) {
|
|
||||||
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE_PREV", player));
|
|
||||||
} else if (action == LecternAction.PAGE_NEXT) {
|
|
||||||
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE_NEXT", player));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, page));
|
|
||||||
swItem.getItemStack().setAmount(page);
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != Material.LECTERN) return;
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_NOOP", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PREVIOUS_PAGE {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE_PREV", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
Lectern lectern = (Lectern) location.getBlock().getState();
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
if (!((org.bukkit.block.data.type.Lectern) lectern.getBlockData()).hasBook()) return;
|
if (lectern.getPage() > 0) {
|
||||||
int pages = ((BookMeta) lectern.getInventory().getItem(0).getItemMeta()).getPages().size();
|
lectern.setPage(lectern.getPage() - 1);
|
||||||
if (noop) {
|
parent.update(blockData);
|
||||||
return;
|
|
||||||
} else if (action == LecternAction.PAGE_PREV) {
|
|
||||||
int page = lectern.getPage();
|
|
||||||
if (page > 1) lectern.setPage(page - 1);
|
|
||||||
} else if (action == LecternAction.PAGE_NEXT) {
|
|
||||||
int page = lectern.getPage();
|
|
||||||
if (page < pages) lectern.setPage(page + 1);
|
|
||||||
} else if (action == LecternAction.PAGE_SET) {
|
|
||||||
if (page <= pages) lectern.setPage(page);
|
|
||||||
}
|
}
|
||||||
lectern.update(false, true);
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
NEXT_PAGE {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
SWInventory swInventory = new SWInventory(player, 36, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
return new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE_NEXT", player));
|
||||||
for (int i = 27; i < 35; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
|
||||||
swInventory.setItem(27, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(35, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, true, LecternAction.PAGE_SET, 0).getItemStack(), clickType -> {
|
|
||||||
noop = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(5, item(player, false, LecternAction.PAGE_PREV, 0).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
action = LecternAction.PAGE_PREV;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, LecternAction.PAGE_NEXT, 0).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
action = LecternAction.PAGE_NEXT;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
for (int i = 0; i < 15; i++) {
|
|
||||||
int finalI = i;
|
|
||||||
int finalI2 = i;
|
|
||||||
if (i >= 9) finalI2++;
|
|
||||||
if (i >= 12) finalI2++;
|
|
||||||
swInventory.setItem(finalI2 + 9, item(player, false, LecternAction.PAGE_SET, finalI + 1).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
action = LecternAction.PAGE_SET;
|
|
||||||
page = finalI + 1;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
swInventory.open();
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (lectern.getPage() < pages) {
|
||||||
|
lectern.setPage(lectern.getPage() + 1);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_1 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player, boolean noop, LecternAction action, int page) {
|
@Override
|
||||||
SWItem swItem = menu(player, noop, action, page);
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
if (swItem.getItemStack().equals(menu(player, this.noop, this.action, this.page).getItemStack())) {
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 1));
|
||||||
swItem.setEnchanted(true);
|
swItem.getItemStack().setAmount(1);
|
||||||
}
|
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
return swItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (1 <= pages) {
|
||||||
|
lectern.setPage(1);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_2 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum LecternAction {
|
@Override
|
||||||
PAGE_NEXT,
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
PAGE_PREV,
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 2));
|
||||||
PAGE_SET
|
swItem.getItemStack().setAmount(2);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (2 <= pages) {
|
||||||
|
lectern.setPage(2);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_3 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 3));
|
||||||
|
swItem.getItemStack().setAmount(3);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (3 <= pages) {
|
||||||
|
lectern.setPage(3);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_4 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 4));
|
||||||
|
swItem.getItemStack().setAmount(4);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (4 <= pages) {
|
||||||
|
lectern.setPage(4);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_5 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 13;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 5));
|
||||||
|
swItem.getItemStack().setAmount(5);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (5 <= pages) {
|
||||||
|
lectern.setPage(5);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_6 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 6));
|
||||||
|
swItem.getItemStack().setAmount(6);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (6 <= pages) {
|
||||||
|
lectern.setPage(6);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_7 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 7));
|
||||||
|
swItem.getItemStack().setAmount(7);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (7 <= pages) {
|
||||||
|
lectern.setPage(7);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_8 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 8));
|
||||||
|
swItem.getItemStack().setAmount(8);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (8 <= pages) {
|
||||||
|
lectern.setPage(8);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_9 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 17;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 9));
|
||||||
|
swItem.getItemStack().setAmount(9);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (9 <= pages) {
|
||||||
|
lectern.setPage(9);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_10 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 19;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 10));
|
||||||
|
swItem.getItemStack().setAmount(10);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (10 <= pages) {
|
||||||
|
lectern.setPage(10);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_11 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 11));
|
||||||
|
swItem.getItemStack().setAmount(11);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (11 <= pages) {
|
||||||
|
lectern.setPage(11);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_12 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 21;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 12));
|
||||||
|
swItem.getItemStack().setAmount(12);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (12 <= pages) {
|
||||||
|
lectern.setPage(12);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_13 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 23;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 13));
|
||||||
|
swItem.getItemStack().setAmount(13);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (13 <= pages) {
|
||||||
|
lectern.setPage(13);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_14 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 14));
|
||||||
|
swItem.getItemStack().setAmount(14);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (14 <= pages) {
|
||||||
|
lectern.setPage(14);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PAGE_15 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLectern parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, 15));
|
||||||
|
swItem.getItemStack().setAmount(15);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, org.bukkit.block.data.type.Lectern blockData, LoaderLectern parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (!blockData.hasBook()) return;
|
||||||
|
Lectern lectern = (Lectern) location.getBlock().getState();
|
||||||
|
ItemStack itemStack = lectern.getInventory().getItem(0);
|
||||||
|
if (itemStack == null) return;
|
||||||
|
int pages = ((BookMeta) itemStack.getItemMeta()).getPages().size();
|
||||||
|
if (15 <= pages) {
|
||||||
|
lectern.setPage(15);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -148,7 +514,7 @@ public class LoaderLectern extends LoaderInteractionElement<LoaderLectern.Lecter
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LecternSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new LecternSettings();
|
return location.getBlock().getType() == Material.LECTERN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,103 +19,91 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.type.Switch;
|
import org.bukkit.block.data.type.Switch;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSettings> {
|
public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSettingsEnum> {
|
||||||
|
|
||||||
public LoaderLever(Location location) {
|
public LoaderLever(Location location) {
|
||||||
super(location);
|
super(location, LeverSettingsEnum.INTERACT, LeverSettingsEnum.NOOP, LeverSettingsEnum.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LeverSettings implements ElementSettings {
|
public enum LeverSettingsEnum implements LoaderSettingsEnum<Switch, LoaderLever, LeverSettingsEnum> {
|
||||||
|
|
||||||
private boolean noop = false;
|
|
||||||
private boolean interact = false;
|
|
||||||
private boolean power = false;
|
|
||||||
|
|
||||||
|
NOOP {
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, noop, interact, power);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean noop, boolean interact, boolean power) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (noop) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_SWITCH", "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else if (interact) {
|
|
||||||
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_SWITCH", "LOADER_INTERACTION_INTERACT", player));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(Material.LEVER, translateItemName("LOADER_BUTTON_SWITCH", power ? "LOADER_INTERACTION_ACTIVE" : "LOADER_INTERACTION_INACTIVE", player));
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderLever parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != Material.LEVER) return;
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_SWITCH", "LOADER_INTERACTION_NOOP", player));
|
||||||
if (noop) return;
|
|
||||||
|
|
||||||
Switch lever = (Switch) location.getBlock().getBlockData();
|
|
||||||
if (interact) {
|
|
||||||
lever.setPowered(!lever.isPowered());
|
|
||||||
} else {
|
|
||||||
lever.setPowered(power);
|
|
||||||
}
|
|
||||||
location.getBlock().setBlockData(lever, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public void execute(Location location, Switch blockData, LoaderLever parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
}
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
},
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(17, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, true, false, false).getItemStack(), clickType -> {
|
INTERACT {
|
||||||
noop = true;
|
@Override
|
||||||
click(player, backAction, deleteAction);
|
public int getPos() {
|
||||||
});
|
return 3;
|
||||||
swInventory.setItem(3, item(player, false, true, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(5, item(player, false, false, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = false;
|
|
||||||
power = false;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, false, true).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = false;
|
|
||||||
power = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
swInventory.open();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player, boolean noop, boolean interact, boolean power) {
|
@Override
|
||||||
SWItem swItem = menu(player, noop, interact, power);
|
public SWItem menu(Player player, LoaderLever parent, int power, long ticks) {
|
||||||
if (swItem.getItemStack().equals(menu(player, this.noop, this.interact, this.power).getItemStack())) {
|
return new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_SWITCH", "LOADER_INTERACTION_INTERACT", player));
|
||||||
swItem.setEnchanted(true);
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Switch blockData, LoaderLever parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setPowered(!blockData.isPowered());
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
POWER_OFF {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLever parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.LEVER, translateItemName("LOADER_BUTTON_SWITCH", "LOADER_INTERACTION_INACTIVE", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Switch blockData, LoaderLever parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setPowered(false);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
POWER_ON {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderLever parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.LEVER, translateItemName("LOADER_BUTTON_SWITCH", "LOADER_INTERACTION_ACTIVE", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Switch blockData, LoaderLever parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setPowered(true);
|
||||||
}
|
}
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +113,7 @@ public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSetti
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LeverSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new LeverSettings();
|
return location.getBlock().getType() == Material.LEVER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,9 @@
|
|||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWAnvilInv;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWInventory;
|
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.AnaloguePowerable;
|
import org.bukkit.block.data.AnaloguePowerable;
|
||||||
@ -33,18 +30,16 @@ import org.bukkit.block.data.BlockData;
|
|||||||
import org.bukkit.block.data.Powerable;
|
import org.bukkit.block.data.Powerable;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.MovementSettings> {
|
public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.MovementSettingsEnum> {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Material material;
|
private Material material;
|
||||||
private boolean analogue;
|
private boolean analogue;
|
||||||
|
|
||||||
public LoaderMovement(Location location, String name, Material material) {
|
public LoaderMovement(Location location, String name, Material material) {
|
||||||
super(location);
|
super(location, MovementSettingsEnum.NO_WAIT_FOR, MovementSettingsEnum.NOOP, MovementSettingsEnum.values());
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.material = material;
|
this.material = material;
|
||||||
this.analogue = location.getBlock().getBlockData() instanceof AnaloguePowerable;
|
this.analogue = location.getBlock().getBlockData() instanceof AnaloguePowerable;
|
||||||
@ -52,48 +47,56 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
|
|||||||
|
|
||||||
public void setInitialTicks(long ticks) {
|
public void setInitialTicks(long ticks) {
|
||||||
if (ticks < 1) ticks = 1;
|
if (ticks < 1) ticks = 1;
|
||||||
elements.get(currentShot).ticks = ticks;
|
extraTicks.set(currentShot, ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MovementSettings implements ElementSettings {
|
public enum MovementSettingsEnum implements LoaderSettingsEnum<BlockData, LoaderMovement, MovementSettingsEnum> {
|
||||||
|
|
||||||
private boolean noop = false;
|
NOOP {
|
||||||
private boolean waitFor = false;
|
@Override
|
||||||
private int power = 15;
|
public int getPos() {
|
||||||
private long ticks = 1;
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player, LoaderMovement parent, int power, long ticks) {
|
||||||
return menu(player, noop, waitFor);
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName(parent.name, "LOADER_INTERACTION_NOOP", player));
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean noop, boolean waitFor) {
|
@Override
|
||||||
SWItem swItem;
|
public void execute(Location location, BlockData blockData, LoaderMovement parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
if (noop) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName(name, "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else if (waitFor) {
|
|
||||||
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_WAIT_FOR", player));
|
|
||||||
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_NO_WAIT_FOR", player));
|
|
||||||
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
|
|
||||||
swItem.setEnchanted(true);
|
|
||||||
}
|
}
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
},
|
||||||
|
|
||||||
|
NO_WAIT_FOR {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderMovement parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(parent.material, translateItemName(parent.name, "LOADER_INTERACTION_WAIT_FOR", player));
|
||||||
|
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
|
||||||
return swItem;
|
return swItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public boolean hasPower(LoaderMovement parent) {
|
||||||
if (!(material == Material.STRING && location.getBlock().getType() == Material.TRIPWIRE) && location.getBlock().getType() != material) return;
|
return parent.analogue;
|
||||||
if (noop) return;
|
}
|
||||||
|
|
||||||
BlockData blockData = location.getBlock().getBlockData();
|
@Override
|
||||||
|
public boolean hasTicks(LoaderMovement parent) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, BlockData blockData, LoaderMovement parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
if (blockData instanceof AnaloguePowerable) {
|
if (blockData instanceof AnaloguePowerable) {
|
||||||
AnaloguePowerable analoguePowerable = (AnaloguePowerable) location.getBlock().getBlockData();
|
AnaloguePowerable analoguePowerable = (AnaloguePowerable) location.getBlock().getBlockData();
|
||||||
analoguePowerable.setPower(power);
|
analoguePowerable.setPower(power);
|
||||||
location.getBlock().setBlockData(analoguePowerable, true);
|
parent.update(analoguePowerable);
|
||||||
update(analoguePowerable);
|
|
||||||
} else if (blockData instanceof Powerable) {
|
} else if (blockData instanceof Powerable) {
|
||||||
Powerable powerable = (Powerable) location.getBlock().getBlockData();
|
Powerable powerable = (Powerable) location.getBlock().getBlockData();
|
||||||
if (ticks < 0) {
|
if (ticks < 0) {
|
||||||
@ -101,113 +104,52 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
|
|||||||
} else {
|
} else {
|
||||||
powerable.setPowered(true);
|
powerable.setPowered(true);
|
||||||
}
|
}
|
||||||
location.getBlock().setBlockData(powerable, true);
|
parent.update(powerable);
|
||||||
update(powerable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ticks >= 0) {
|
|
||||||
if (waitFor) {
|
|
||||||
delay.accept(ticks);
|
|
||||||
}
|
|
||||||
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
if (blockData instanceof AnaloguePowerable) {
|
if (blockData instanceof AnaloguePowerable) {
|
||||||
AnaloguePowerable analoguePowerable = (AnaloguePowerable) blockData;
|
AnaloguePowerable analoguePowerable = (AnaloguePowerable) blockData;
|
||||||
analoguePowerable.setPower(0);
|
analoguePowerable.setPower(0);
|
||||||
location.getBlock().setBlockData(analoguePowerable, true);
|
parent.update(analoguePowerable);
|
||||||
update(analoguePowerable);
|
|
||||||
} else {
|
} else {
|
||||||
Powerable powerable = (Powerable) blockData;
|
Powerable powerable = (Powerable) blockData;
|
||||||
powerable.setPowered(false);
|
powerable.setPowered(false);
|
||||||
location.getBlock().setBlockData(powerable, true);
|
parent.update(powerable);
|
||||||
update(powerable);
|
|
||||||
}
|
}
|
||||||
}, ticks);
|
}, ticks);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
WAIT_FOR {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public SWItem menu(Player player, LoaderMovement parent, int power, long ticks) {
|
||||||
SWInventory swInventory = new SWInventory(player, analogue ? 45 : 27, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
SWItem swItem = new SWItem(parent.material, translateItemName(parent.name, "LOADER_INTERACTION_NO_WAIT_FOR", player));
|
||||||
for (int i = analogue ? 36 : 18; i < (analogue ? 44 : 26); i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
|
||||||
swInventory.setItem(analogue ? 36 : 18, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(analogue ? 44 : 26, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, true, false).getItemStack(), clickType -> {
|
|
||||||
noop = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
if (ticks >= 0) {
|
|
||||||
swInventory.setItem(5, item(player, false, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
waitFor = false;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, true).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
waitFor = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
swInventory.setItem(12, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
|
|
||||||
ticks -= clickType.isShiftClick() ? 5 : 1;
|
|
||||||
if (ticks < 1) ticks = 1;
|
|
||||||
swInventory.setItem(13, item(player));
|
|
||||||
});
|
|
||||||
swInventory.setItem(13, item(player).getItemStack(), clickType -> {
|
|
||||||
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_NAME", player), ticks + "");
|
|
||||||
swAnvilInv.setCallback(s -> {
|
|
||||||
try {
|
|
||||||
ticks = Long.parseLong(s);
|
|
||||||
if (ticks < 1) ticks = 1;
|
|
||||||
} catch (NumberFormatException ignored) {
|
|
||||||
}
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swAnvilInv.open();
|
|
||||||
});
|
|
||||||
swInventory.setItem(14, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
|
|
||||||
ticks += clickType.isShiftClick() ? 5 : 1;
|
|
||||||
swInventory.setItem(13, item(player));
|
|
||||||
});
|
|
||||||
|
|
||||||
if (analogue) {
|
|
||||||
for (int i = 0; i < 16; i++) {
|
|
||||||
int finalI = i;
|
|
||||||
int finalI2 = i;
|
|
||||||
if (i >= 9) finalI2++;
|
|
||||||
swInventory.setItem(finalI2 + 18, item(player, finalI).getItemStack(), clickType -> {
|
|
||||||
power = finalI;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
swInventory.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem item(Player player, boolean noop, boolean waitFor) {
|
|
||||||
SWItem swItem = menu(player, noop, waitFor);
|
|
||||||
if (swItem.getItemStack().equals(menu(player, this.noop, this.waitFor).getItemStack())) {
|
|
||||||
swItem.setEnchanted(true);
|
|
||||||
}
|
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem item(Player player, int power) {
|
|
||||||
SWItem swItem = new SWItem(power == 0 ? Material.GUNPOWDER : Material.REDSTONE, BauSystem.MESSAGE.parse("LOADER_SETTING_POWER", player, power));
|
|
||||||
swItem.getItemStack().setAmount(power == 0 ? 1 : power);
|
|
||||||
if (!this.noop && this.power == power) swItem.setEnchanted(true);
|
|
||||||
return swItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem item(Player player) {
|
|
||||||
SWItem swItem = new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS", player, ticks));
|
|
||||||
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
|
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
return swItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPower(LoaderMovement parent) {
|
||||||
|
return parent.analogue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasTicks(LoaderMovement parent) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, BlockData blockData, LoaderMovement parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
NO_WAIT_FOR.execute(location, blockData, parent, power, ticks, delay);
|
||||||
|
delay.accept(ticks);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -216,7 +158,8 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MovementSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new MovementSettings();
|
if (material == Material.STRING && location.getBlock().getType() == Material.TRIPWIRE) return true;
|
||||||
|
return location.getBlock().getType() == material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Instrument;
|
import org.bukkit.Instrument;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -30,75 +28,50 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.data.type.NoteBlock;
|
import org.bukkit.block.data.type.NoteBlock;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.NoteBlockSettings> {
|
public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.NoteBlockSettingsEnum> {
|
||||||
|
|
||||||
public LoaderNoteBlock(Location location) {
|
public LoaderNoteBlock(Location location) {
|
||||||
super(location);
|
super(location, NoteBlockSettingsEnum.INTERACT, NoteBlockSettingsEnum.NOOP, NoteBlockSettingsEnum.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NoteBlockSettings implements ElementSettings {
|
public enum NoteBlockSettingsEnum implements LoaderSettingsEnum<NoteBlock, LoaderNoteBlock, NoteBlockSettingsEnum> {
|
||||||
|
|
||||||
private boolean interact = true;
|
|
||||||
|
|
||||||
|
NOOP {
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, interact);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean interact) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (interact) {
|
|
||||||
swItem = new SWItem(Material.NOTE_BLOCK, translateItemName("LOADER_BUTTON_NOTEBLOCK", "LOADER_INTERACTION_INTERACT", player));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_NOTEBLOCK", "LOADER_INTERACTION_NOOP", player));
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderNoteBlock parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != Material.NOTE_BLOCK) return;
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_NOTEBLOCK", "LOADER_INTERACTION_NOOP", player));
|
||||||
NoteBlock noteBlock = (NoteBlock) location.getBlock().getBlockData();
|
|
||||||
if (interact) {
|
|
||||||
if (noteBlock.getInstrument() == Instrument.BANJO) noteBlock.setInstrument(Instrument.BIT);
|
|
||||||
else noteBlock.setInstrument(Instrument.BANJO);
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
location.getBlock().setBlockData(noteBlock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public void execute(Location location, NoteBlock blockData, LoaderNoteBlock parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(17, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, false).getItemStack(), clickType -> {
|
}
|
||||||
interact = false;
|
},
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(3, item(player, true).getItemStack(), clickType -> {
|
|
||||||
interact = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
swInventory.open();
|
INTERACT {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player, boolean interact) {
|
@Override
|
||||||
SWItem swItem = menu(player, interact);
|
public SWItem menu(Player player, LoaderNoteBlock parent, int power, long ticks) {
|
||||||
if (swItem.getItemStack().equals(menu(player, this.interact).getItemStack())) {
|
return new SWItem(Material.NOTE_BLOCK, translateItemName("LOADER_BUTTON_NOTEBLOCK", "LOADER_INTERACTION_INTERACT", player));
|
||||||
swItem.setEnchanted(true);
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, NoteBlock blockData, LoaderNoteBlock parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
if (blockData.getInstrument() == Instrument.BANJO) blockData.setInstrument(Instrument.BIT);
|
||||||
|
else blockData.setInstrument(Instrument.BANJO);
|
||||||
|
parent.update(blockData);
|
||||||
}
|
}
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +81,7 @@ public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.No
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NoteBlockSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new NoteBlockSettings();
|
return location.getBlock().getType() == Material.NOTE_BLOCK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,108 +19,97 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.Openable;
|
import org.bukkit.block.data.Openable;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.TrapdoorSettings> {
|
public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.OpenableSettingsEnum> {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Material material;
|
private Material material;
|
||||||
|
|
||||||
public LoaderOpenable(Location location, String name, Material material) {
|
public LoaderOpenable(Location location, String name, Material material) {
|
||||||
super(location);
|
super(location, OpenableSettingsEnum.INTERACT, OpenableSettingsEnum.NOOP, OpenableSettingsEnum.values());
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.material = material;
|
this.material = material;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrapdoorSettings implements ElementSettings {
|
public enum OpenableSettingsEnum implements LoaderSettingsEnum<Openable, LoaderOpenable, OpenableSettingsEnum> {
|
||||||
|
|
||||||
private boolean noop = false;
|
|
||||||
private boolean interact = true;
|
|
||||||
private boolean open = false;
|
|
||||||
|
|
||||||
|
NOOP {
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, noop, interact, open);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean noop, boolean interact, boolean powered) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (noop) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName(name, "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else if (interact) {
|
|
||||||
swItem = new SWItem(Material.STICK, translateItemName(name, "LOADER_INTERACTION_INTERACT", player));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(material, translateItemName(name, open ? "LOADER_INTERACTION_OPEN" : "LOADER_INTERACTION_CLOSED", player));
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderOpenable parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != material) return;
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName(parent.name, "LOADER_INTERACTION_NOOP", player));
|
||||||
Openable openable = (Openable) location.getBlock().getBlockData();
|
|
||||||
if (noop) {
|
|
||||||
return;
|
|
||||||
} else if (interact) {
|
|
||||||
openable.setOpen(!openable.isOpen());
|
|
||||||
} else {
|
|
||||||
openable.setOpen(open);
|
|
||||||
}
|
|
||||||
location.getBlock().setBlockData(openable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public void execute(Location location, Openable blockData, LoaderOpenable parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
}
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
},
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(17, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, true, false, false).getItemStack(), clickType -> {
|
INTERACT {
|
||||||
noop = true;
|
@Override
|
||||||
click(player, backAction, deleteAction);
|
public int getPos() {
|
||||||
});
|
return 3;
|
||||||
swInventory.setItem(3, item(player, false, true, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(5, item(player, false, false, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = false;
|
|
||||||
open = false;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, false, true).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
interact = false;
|
|
||||||
open = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
swInventory.open();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player, boolean noop, boolean interact, boolean open) {
|
@Override
|
||||||
SWItem swItem = menu(player, noop, interact, open);
|
public SWItem menu(Player player, LoaderOpenable parent, int power, long ticks) {
|
||||||
if (swItem.getItemStack().equals(menu(player, this.noop, this.interact, this.open).getItemStack())) {
|
return new SWItem(Material.STICK, translateItemName(parent.name, "LOADER_INTERACTION_INTERACT", player));
|
||||||
swItem.setEnchanted(true);
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Openable blockData, LoaderOpenable parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setOpen(!blockData.isOpen());
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
CLOSED {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderOpenable parent, int power, long ticks) {
|
||||||
|
return new SWItem(parent.material, translateItemName(parent.name, "LOADER_INTERACTION_CLOSED", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Openable blockData, LoaderOpenable parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setOpen(false);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
OPEN {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderOpenable parent, int power, long ticks) {
|
||||||
|
return new SWItem(parent.material, translateItemName(parent.name, "LOADER_INTERACTION_OPEN", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Openable blockData, LoaderOpenable parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setOpen(true);
|
||||||
|
parent.update(blockData);
|
||||||
}
|
}
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +119,7 @@ public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.Trap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TrapdoorSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new TrapdoorSettings();
|
return location.getBlock().getType() == material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,119 +20,140 @@
|
|||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.type.Repeater;
|
import org.bukkit.block.data.type.Repeater;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderRepeater extends LoaderInteractionElement<LoaderRepeater.RepeaterSettings> {
|
public class LoaderRepeater extends LoaderInteractionElement<LoaderRepeater.RepeaterSettingsEnum> {
|
||||||
|
|
||||||
public LoaderRepeater(Location location) {
|
public LoaderRepeater(Location location) {
|
||||||
super(location);
|
super(location, RepeaterSettingsEnum.INTERACT, RepeaterSettingsEnum.NOOP, RepeaterSettingsEnum.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RepeaterSettings implements ElementSettings {
|
public enum RepeaterSettingsEnum implements LoaderSettingsEnum<Repeater, LoaderRepeater, RepeaterSettingsEnum> {
|
||||||
|
|
||||||
private boolean interact = false;
|
NOOP {
|
||||||
private int delay = 1;
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player, LoaderRepeater parent, int power, long ticks) {
|
||||||
return menu(player, interact, delay);
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_REPEATER", "LOADER_INTERACTION_NOOP", player));
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean interact, int delay) {
|
@Override
|
||||||
SWItem swItem;
|
public void execute(Location location, Repeater blockData, LoaderRepeater parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
if (interact) {
|
|
||||||
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_REPEATER", "LOADER_INTERACTION_INTERACT", player));
|
|
||||||
} else if (delay == 0) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_REPEATER", "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_SETTING_REPEATER", player, delay));
|
|
||||||
swItem.getItemStack().setAmount(delay);
|
|
||||||
}
|
}
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
},
|
||||||
|
|
||||||
|
INTERACT {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderRepeater parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_REPEATER", "LOADER_INTERACTION_INTERACT", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Repeater blockData, LoaderRepeater parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
int repeaterDelay = blockData.getDelay();
|
||||||
|
repeaterDelay++;
|
||||||
|
if (repeaterDelay > 4) repeaterDelay = 1;
|
||||||
|
blockData.setDelay(repeaterDelay);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
DELAY_1 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderRepeater parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_SETTING_REPEATER", player, 1));
|
||||||
|
swItem.getItemStack().setAmount(1);
|
||||||
return swItem;
|
return swItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> __) {
|
public void execute(Location location, Repeater blockData, LoaderRepeater parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
if (location.getBlock().getType() != Material.REPEATER) return;
|
blockData.setDelay(1);
|
||||||
Repeater repeater = (Repeater) location.getBlock().getBlockData();
|
parent.update(blockData);
|
||||||
if (interact) {
|
|
||||||
int delay = repeater.getDelay();
|
|
||||||
delay++;
|
|
||||||
if (delay > 4) delay = 1;
|
|
||||||
repeater.setDelay(delay);
|
|
||||||
} else if (delay == 0) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
repeater.setDelay(delay);
|
|
||||||
}
|
}
|
||||||
location.getBlock().setBlockData(repeater, true);
|
},
|
||||||
|
|
||||||
|
DELAY_2 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public SWItem menu(Player player, LoaderRepeater parent, int power, long ticks) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
SWItem swItem = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_SETTING_REPEATER", player, 2));
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
swItem.getItemStack().setAmount(2);
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(17, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(1, item(player, false, 0).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
delay = 0;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(2, item(player, true, -1).getItemStack(), clickType -> {
|
|
||||||
interact = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(4, item(player, false, 1).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
delay = 1;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(5, item(player, false, 2).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
delay = 2;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, 3).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
delay = 3;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(7, item(player, false, 4).getItemStack(), clickType -> {
|
|
||||||
interact = false;
|
|
||||||
delay = 4;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
|
|
||||||
swInventory.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem item(Player player, boolean interact, int delay) {
|
|
||||||
SWItem swItem = menu(player, interact, delay);
|
|
||||||
if (swItem.getItemStack().equals(menu(player, this.interact, this.delay).getItemStack())) {
|
|
||||||
swItem.setEnchanted(true);
|
|
||||||
}
|
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
return swItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playerInteract() {
|
public void execute(Location location, Repeater blockData, LoaderRepeater parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
interact = true;
|
blockData.setDelay(2);
|
||||||
delay = 0;
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
DELAY_3 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderRepeater parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_SETTING_REPEATER", player, 3));
|
||||||
|
swItem.getItemStack().setAmount(3);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Repeater blockData, LoaderRepeater parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setDelay(3);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
DELAY_4 {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderRepeater parent, int power, long ticks) {
|
||||||
|
SWItem swItem = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_SETTING_REPEATER", player, 4));
|
||||||
|
swItem.getItemStack().setAmount(4);
|
||||||
|
return swItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Repeater blockData, LoaderRepeater parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
blockData.setDelay(4);
|
||||||
|
parent.update(blockData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +163,7 @@ public class LoaderRepeater extends LoaderInteractionElement<LoaderRepeater.Repe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RepeaterSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new RepeaterSettings();
|
return location.getBlock().getType() == Material.REPEATER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,23 +20,57 @@
|
|||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderTNT implements LoaderElement {
|
public class LoaderTNT extends LoaderInteractionElement<LoaderTNT.TNTSettingsEnum> {
|
||||||
|
|
||||||
private Location location;
|
|
||||||
|
|
||||||
public LoaderTNT(Location location) {
|
public LoaderTNT(Location location) {
|
||||||
this.location = location;
|
super(location, TNTSettingsEnum.PLACE, TNTSettingsEnum.NOOP, TNTSettingsEnum.values());
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TNTSettingsEnum implements LoaderSettingsEnum<BlockData, LoaderTNT, TNTSettingsEnum> {
|
||||||
|
NOOP {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderTNT parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_TNT", "LOADER_INTERACTION_NOOP", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, BlockData blockData, LoaderTNT parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
PLACE {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderTNT parent, int power, long ticks) {
|
||||||
|
return new SWItem(Material.TNT, translateItemName("LOADER_BUTTON_TNT", "LOADER_INTERACTION_PLACE", player));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, BlockData blockData, LoaderTNT parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
location.getBlock().setType(Material.TNT);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -54,10 +88,11 @@ public class LoaderTNT implements LoaderElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
block.setType(Material.TNT, true);
|
super.execute(delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction) {
|
public boolean checkBlockInWorld() {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,115 +20,87 @@
|
|||||||
package de.steamwar.bausystem.features.loader.elements.impl;
|
package de.steamwar.bausystem.features.loader.elements.impl;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.features.loader.elements.ElementSettings;
|
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderInteractionElement;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.bausystem.features.loader.elements.LoaderSettingsEnum;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.Powerable;
|
import org.bukkit.block.data.Powerable;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderTicks extends LoaderInteractionElement<LoaderTicks.TicksSettings> {
|
public class LoaderTicks extends LoaderInteractionElement<LoaderTicks.TicksSettingsEnum> {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Material material;
|
private Material material;
|
||||||
private int ticks;
|
private int ticks;
|
||||||
|
|
||||||
public LoaderTicks(Location location, String name, Material material, int ticks) {
|
public LoaderTicks(Location location, String name, Material material, int ticks) {
|
||||||
super(location);
|
super(location, TicksSettingsEnum.NO_WAIT_FOR, TicksSettingsEnum.NOOP, TicksSettingsEnum.values());
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.material = material;
|
this.material = material;
|
||||||
this.ticks = ticks;
|
this.ticks = ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TicksSettings implements ElementSettings {
|
public enum TicksSettingsEnum implements LoaderSettingsEnum<Powerable, LoaderTicks, TicksSettingsEnum> {
|
||||||
|
|
||||||
private boolean noop = false;
|
|
||||||
private boolean waitFor = false;
|
|
||||||
|
|
||||||
|
NOOP {
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public int getPos() {
|
||||||
return menu(player, noop, waitFor);
|
return 2;
|
||||||
}
|
|
||||||
|
|
||||||
private SWItem menu(Player player, boolean noop, boolean waitFor) {
|
|
||||||
SWItem swItem;
|
|
||||||
if (noop) {
|
|
||||||
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName(name, "LOADER_INTERACTION_NOOP", player));
|
|
||||||
} else if (waitFor) {
|
|
||||||
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_WAIT_FOR", player, ticks));
|
|
||||||
} else {
|
|
||||||
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_NO_WAIT_FOR", player, ticks));
|
|
||||||
swItem.setEnchanted(true);
|
|
||||||
}
|
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> delay) {
|
public SWItem menu(Player player, LoaderTicks parent, int power, long ticks) {
|
||||||
if (location.getBlock().getType() != material) {
|
return new SWItem(Material.STRUCTURE_VOID, translateItemName(parent.name, "LOADER_INTERACTION_NOOP", player));
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (noop) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Powerable blockData, LoaderTicks parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
NO_WAIT_FOR {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SWItem menu(Player player, LoaderTicks parent, int power, long ticks) {
|
||||||
|
return new SWItem(parent.material, translateItemName(parent.name, "LOADER_INTERACTION_NO_WAIT_FOR", player, ticks));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Location location, Powerable blockData, LoaderTicks parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
Powerable powerable = (Powerable) location.getBlock().getBlockData();
|
Powerable powerable = (Powerable) location.getBlock().getBlockData();
|
||||||
powerable.setPowered(true);
|
powerable.setPowered(true);
|
||||||
location.getBlock().setBlockData(powerable, true);
|
parent.update(powerable);
|
||||||
update(powerable);
|
|
||||||
|
|
||||||
if (waitFor) {
|
|
||||||
delay.accept((long) ticks);
|
|
||||||
}
|
|
||||||
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
BauSystem.runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
powerable.setPowered(false);
|
powerable.setPowered(false);
|
||||||
location.getBlock().setBlockData(powerable, true);
|
parent.update(powerable);
|
||||||
update(powerable);
|
}, parent.ticks);
|
||||||
}, ticks);
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
WAIT_FOR {
|
||||||
|
@Override
|
||||||
|
public int getPos() {
|
||||||
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(Player player, Runnable backAction, Runnable deleteAction) {
|
public SWItem menu(Player player, LoaderTicks parent, int power, long ticks) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
return new SWItem(parent.material, translateItemName(parent.name, "LOADER_INTERACTION_WAIT_FOR", player, ticks));
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).getItemStack(), clickType -> backAction.run());
|
|
||||||
swInventory.setItem(17, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_DELETE", player)).getItemStack(), clickType -> deleteAction.run());
|
|
||||||
|
|
||||||
swInventory.setItem(2, item(player, true, false).getItemStack(), clickType -> {
|
|
||||||
noop = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
if (ticks >= 0) {
|
|
||||||
swInventory.setItem(5, item(player, false, false).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
waitFor = false;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
swInventory.setItem(6, item(player, false, true).getItemStack(), clickType -> {
|
|
||||||
noop = false;
|
|
||||||
waitFor = true;
|
|
||||||
click(player, backAction, deleteAction);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
swInventory.open();
|
@Override
|
||||||
|
public void execute(Location location, Powerable blockData, LoaderTicks parent, int power, long ticks, Consumer<Long> delay) {
|
||||||
|
NO_WAIT_FOR.execute(location, blockData, parent, power, ticks, delay);
|
||||||
|
delay.accept((long) parent.ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player, boolean noop, boolean waitFor) {
|
|
||||||
SWItem swItem = menu(player, noop, waitFor);
|
|
||||||
if (swItem.getItemStack().equals(menu(player, this.noop, this.waitFor).getItemStack())) {
|
|
||||||
swItem.setEnchanted(true);
|
|
||||||
}
|
|
||||||
swItem.setLore(Collections.emptyList());
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +110,7 @@ public class LoaderTicks extends LoaderInteractionElement<LoaderTicks.TicksSetti
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TicksSettings createNewElement() {
|
public boolean checkBlockInWorld() {
|
||||||
return new TicksSettings();
|
return location.getBlock().getType() == material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,15 +26,13 @@ import de.steamwar.inventory.SWInventory;
|
|||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LoaderWait implements LoaderElement, Listener {
|
public class LoaderWait implements LoaderElement {
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ -54,8 +52,8 @@ public class LoaderWait implements LoaderElement, Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Consumer<Long> __) {
|
public void execute(Consumer<Long> wait) {
|
||||||
__.accept(delay);
|
wait.accept(delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,12 +32,12 @@ public class LoadtimerCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "start", description = "LOADTIMER_HELP_START_1")
|
@Register(value = "start", description = "LOADTIMER_HELP_START_1")
|
||||||
public void start(Player p) {
|
public void start(@Validator Player p) {
|
||||||
start(p, TimerMode.HALF);
|
start(p, TimerMode.HALF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "start", description = {"LOADTIMER_HELP_START_2", "LOADTIMER_HELP_START_3"})
|
@Register(value = "start", description = {"LOADTIMER_HELP_START_2", "LOADTIMER_HELP_START_3"})
|
||||||
public void start(Player p, TimerMode mode) {
|
public void start(@Validator Player p, TimerMode mode) {
|
||||||
Region r = Region.getRegion(p.getLocation());
|
Region r = Region.getRegion(p.getLocation());
|
||||||
if (r.isGlobal()) return;
|
if (r.isGlobal()) return;
|
||||||
if (!Loadtimer.hasTimer(r))
|
if (!Loadtimer.hasTimer(r))
|
||||||
@ -45,7 +45,7 @@ public class LoadtimerCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "stop", description = "LOADTIMER_HELP_STOP")
|
@Register(value = "stop", description = "LOADTIMER_HELP_STOP")
|
||||||
public void stop(Player p) {
|
public void stop(@Validator Player p) {
|
||||||
Region r = Region.getRegion(p.getLocation());
|
Region r = Region.getRegion(p.getLocation());
|
||||||
if (r.isGlobal()) return;
|
if (r.isGlobal()) return;
|
||||||
if (Loadtimer.hasTimer(r))
|
if (Loadtimer.hasTimer(r))
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.observer;
|
package de.steamwar.bausystem.features.observer;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -46,13 +47,13 @@ public class ObserverTracerCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "delete", description = "OBSERVER_HELP_DELETE")
|
@Register(value = "delete", description = "OBSERVER_HELP_DELETE")
|
||||||
public void delete(Player p) {
|
public void delete(@Validator Player p) {
|
||||||
ObserverTracerListener.observerTracerMap.remove(p);
|
ObserverTracerListener.observerTracerMap.remove(p);
|
||||||
BauSystem.MESSAGE.send("OBSERVER_DELETE", p);
|
BauSystem.MESSAGE.send("OBSERVER_DELETE", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "retrace", description = "OBSERVER_HELP_RETRACE")
|
@Register(value = "retrace", description = "OBSERVER_HELP_RETRACE")
|
||||||
public void retrace(Player p) {
|
public void retrace(@Validator Player p) {
|
||||||
if (ObserverTracerListener.observerTracerMap.containsKey(p)) {
|
if (ObserverTracerListener.observerTracerMap.containsKey(p)) {
|
||||||
BauSystem.MESSAGE.send("OBSERVER_RETRACE_NO_TRACE", p);
|
BauSystem.MESSAGE.send("OBSERVER_RETRACE_NO_TRACE", p);
|
||||||
return;
|
return;
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
package de.steamwar.bausystem.features.observer;
|
package de.steamwar.bausystem.features.observer;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -55,6 +57,7 @@ public class ObserverTracerListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if(!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||||
if (!enabled.contains(event.getPlayer())) {
|
if (!enabled.contains(event.getPlayer())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -87,6 +90,11 @@ public class ObserverTracerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBauMemberUpdate(BauMemberUpdateEvent event) {
|
||||||
|
event.getNewSpectator().forEach(observerTracerMap::remove);
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
enabled.add(event.getPlayer());
|
enabled.add(event.getPlayer());
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.redstonetester;
|
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.Permission;
|
|
||||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
|
||||||
import de.steamwar.inventory.SWItem;
|
|
||||||
import de.steamwar.linkage.Linked;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
@Linked
|
|
||||||
public class RedstoneTesterGuiItem extends BauGuiItem {
|
|
||||||
|
|
||||||
public RedstoneTesterGuiItem() {
|
|
||||||
super(23);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack getItem(Player player) {
|
|
||||||
return new SWItem(Material.REPEATER,
|
|
||||||
BauSystem.MESSAGE.parse("RT_ITEM_NAME", player),
|
|
||||||
Arrays.asList(BauSystem.MESSAGE.parse("RT_ITEM_LORE_1", player),
|
|
||||||
BauSystem.MESSAGE.parse("RT_ITEM_LORE_2", player),
|
|
||||||
BauSystem.MESSAGE.parse("RT_ITEM_LORE_3", player))
|
|
||||||
, false, null).getItemStack();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean click(ClickType click, Player p) {
|
|
||||||
p.closeInventory();
|
|
||||||
p.performCommand("redstonetester");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Permission permission() {
|
|
||||||
return Permission.MEMBER;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.redstonetester;
|
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.SWUtils;
|
|
||||||
import de.steamwar.command.SWCommand;
|
|
||||||
import de.steamwar.linkage.Linked;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
@Linked
|
|
||||||
public class RedstonetesterCommand extends SWCommand {
|
|
||||||
|
|
||||||
public RedstonetesterCommand() {
|
|
||||||
super("redstonetester", "rt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Register(description = "RT_HELP")
|
|
||||||
public void genericCommand(Player p) {
|
|
||||||
BauSystem.MESSAGE.send("RT_GIVEN", p);
|
|
||||||
SWUtils.giveItemToPlayer(p, RedstonetesterUtils.getWand(p));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,108 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.redstonetester;
|
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
|
||||||
import de.steamwar.bausystem.utils.ItemUtils;
|
|
||||||
import de.steamwar.inventory.SWItem;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.experimental.UtilityClass;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.data.BlockData;
|
|
||||||
import org.bukkit.block.data.Powerable;
|
|
||||||
import org.bukkit.block.data.type.Piston;
|
|
||||||
import org.bukkit.block.data.type.RedstoneWire;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@UtilityClass
|
|
||||||
public class RedstonetesterUtils {
|
|
||||||
|
|
||||||
public static ItemStack getWand(Player player) {
|
|
||||||
ItemStack i = new SWItem(Material.BLAZE_ROD,
|
|
||||||
BauSystem.MESSAGE.parse("RT_ITEM_NAME", player),
|
|
||||||
Arrays.asList(BauSystem.MESSAGE.parse("RT_ITEM_LORE_1", player),
|
|
||||||
BauSystem.MESSAGE.parse("RT_ITEM_LORE_2", player),
|
|
||||||
BauSystem.MESSAGE.parse("RT_ITEM_LORE_3", player)),
|
|
||||||
false, null).getItemStack();
|
|
||||||
ItemUtils.setItem(i, "redstonetester");
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<Player, RedstoneTester> playerMap = new HashMap<>();
|
|
||||||
|
|
||||||
public void sendLocation(Player player, String prefix, Location location) {
|
|
||||||
BauSystem.MESSAGE.send("RT_LOC", player, location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
|
||||||
public boolean validBlock(Player player, BlockData block) {
|
|
||||||
if (block instanceof Powerable) return true;
|
|
||||||
if (block instanceof Piston) return true;
|
|
||||||
if (block instanceof RedstoneWire) return true;
|
|
||||||
BauSystem.MESSAGE.send("RT_INVALID_LOC", player);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public static class RedstoneTester {
|
|
||||||
|
|
||||||
private final Player player;
|
|
||||||
private Location loc1 = null;
|
|
||||||
private Location loc2 = null;
|
|
||||||
|
|
||||||
private long lastTick = 0;
|
|
||||||
private Long tick = null;
|
|
||||||
|
|
||||||
public RedstoneTester(Player player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void activate(Location location) {
|
|
||||||
if (loc1 == null || loc2 == null) {
|
|
||||||
tick = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (TPSUtils.currentRealTick.get() - lastTick > 100) {
|
|
||||||
tick = null;
|
|
||||||
}
|
|
||||||
if (loc1.equals(location)) {
|
|
||||||
lastTick = TPSUtils.currentRealTick.get();
|
|
||||||
if (tick == null) {
|
|
||||||
tick = TPSUtils.currentRealTick.get();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (tick != null && loc2.equals(location)) {
|
|
||||||
BauSystem.MESSAGE.send("RT_RESULT", player, (TPSUtils.currentRealTick.get() - tick), ((TPSUtils.currentRealTick.get() - tick) / 2.0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is a part of the SteamWar software.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 SteamWar.de-Serverteam
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bausystem.features.redstonetester;
|
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
|
||||||
import de.steamwar.bausystem.utils.ItemUtils;
|
|
||||||
import de.steamwar.linkage.Linked;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.event.block.BlockDispenseEvent;
|
|
||||||
import org.bukkit.event.block.BlockPistonExtendEvent;
|
|
||||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
|
||||||
import org.bukkit.event.block.BlockRedstoneEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Linked
|
|
||||||
public class RestonetesterListener implements Listener {
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
|
||||||
if (!ItemUtils.isItem(event.getItem(), "redstonetester")) return;
|
|
||||||
Player player = event.getPlayer();
|
|
||||||
Block block = event.getClickedBlock();
|
|
||||||
event.setCancelled(true);
|
|
||||||
|
|
||||||
switch (event.getAction()) {
|
|
||||||
case RIGHT_CLICK_AIR:
|
|
||||||
if (player.isSneaking()) {
|
|
||||||
RedstonetesterUtils.getPlayerMap().remove(event.getPlayer());
|
|
||||||
BauSystem.MESSAGE.send("RT_ACTIVATE", player);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LEFT_CLICK_BLOCK:
|
|
||||||
if (!RedstonetesterUtils.validBlock(event.getPlayer(), Objects.requireNonNull(block).getBlockData())) return;
|
|
||||||
RedstonetesterUtils.getPlayerMap().computeIfAbsent(event.getPlayer(), RedstonetesterUtils.RedstoneTester::new).setLoc1(block.getLocation());
|
|
||||||
RedstonetesterUtils.sendLocation(event.getPlayer(), "POS1", block.getLocation());
|
|
||||||
break;
|
|
||||||
case RIGHT_CLICK_BLOCK:
|
|
||||||
if (!RedstonetesterUtils.validBlock(event.getPlayer(), Objects.requireNonNull(block).getBlockData())) return;
|
|
||||||
RedstonetesterUtils.getPlayerMap().computeIfAbsent(event.getPlayer(), RedstonetesterUtils.RedstoneTester::new).setLoc2(block.getLocation());
|
|
||||||
RedstonetesterUtils.sendLocation(event.getPlayer(), "POS2", block.getLocation());
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
|
||||||
RedstonetesterUtils.getPlayerMap().remove(event.getPlayer());
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onPistonExtend(BlockPistonExtendEvent e) {
|
|
||||||
RedstonetesterUtils.getPlayerMap().forEach((player, redstoneTester) -> redstoneTester.activate(e.getBlock().getLocation()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onPistonRetract(BlockPistonRetractEvent e) {
|
|
||||||
RedstonetesterUtils.getPlayerMap().forEach((player, redstoneTester) -> redstoneTester.activate(e.getBlock().getLocation()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onRedstoneEvent(BlockRedstoneEvent e) {
|
|
||||||
RedstonetesterUtils.getPlayerMap().forEach((player, redstoneTester) -> redstoneTester.activate(e.getBlock().getLocation()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onBlockDispense(BlockDispenseEvent e) {
|
|
||||||
RedstonetesterUtils.getPlayerMap().forEach((player, redstoneTester) -> redstoneTester.activate(e.getBlock().getLocation()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -27,6 +27,7 @@ import de.steamwar.bausystem.region.flags.Flag;
|
|||||||
import de.steamwar.bausystem.region.flags.flagvalues.ColorMode;
|
import de.steamwar.bausystem.region.flags.flagvalues.ColorMode;
|
||||||
import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
||||||
import de.steamwar.bausystem.region.utils.RegionType;
|
import de.steamwar.bausystem.region.utils.RegionType;
|
||||||
|
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
@ -64,10 +65,14 @@ public class ColorCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
region.set(Flag.COLOR, color);
|
region.set(Flag.COLOR, color);
|
||||||
try {
|
try {
|
||||||
region.reset(null, RegionType.NORMAL, RegionExtensionType.NORMAL, true, true);
|
PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getResetFile(RegionType.NORMAL)))
|
||||||
|
.ignoreAir(true)
|
||||||
|
.onlyColors(true)
|
||||||
|
.color(color.getColor());
|
||||||
|
region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL);
|
||||||
RegionUtils.message(region, "REGION_REGION_COLORED");
|
RegionUtils.message(region, "REGION_REGION_COLORED");
|
||||||
RegionUtils.message(region, "REGION_REGION_COLORED_FAILED");
|
RegionUtils.message(region, "REGION_REGION_COLORED_FAILED");
|
||||||
} catch (IOException e) {
|
} catch (SecurityException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_FAILED_COLORED", p);
|
BauSystem.MESSAGE.send("REGION_REGION_FAILED_COLORED", p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,7 +85,7 @@ public class ColorCommand extends SWCommand {
|
|||||||
@ClassValidator(value = Player.class, local = true)
|
@ClassValidator(value = Player.class, local = true)
|
||||||
public TypeValidator<Player> validator() {
|
public TypeValidator<Player> validator() {
|
||||||
return (commandSender, player, messageSender) -> {
|
return (commandSender, player, messageSender) -> {
|
||||||
return !messageSender.send(!bauServer.getOwner().equals(player.getUniqueId()), "REGION_COLOR_NO_PERMS");
|
return !messageSender.send(!bauServer.getOwner().equals(player.getUniqueId()), "NO_PERMISSION");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,10 +46,6 @@ public class FireCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getNoPermMessage() {
|
|
||||||
return "REGION_FIRE_NO_PERMS";
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getEnableMessage() {
|
private String getEnableMessage() {
|
||||||
return "REGION_FIRE_ENABLED";
|
return "REGION_FIRE_ENABLED";
|
||||||
}
|
}
|
||||||
@ -69,11 +65,4 @@ public class FireCommand extends SWCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
|
||||||
public TypeValidator<Player> validator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), getNoPermMessage());
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,6 @@ public class FreezeCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getNoPermMessage() {
|
|
||||||
return "REGION_FREEZE_NO_PERMS";
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getEnableMessage(){
|
private String getEnableMessage(){
|
||||||
return "REGION_FREEZE_ENABLED";
|
return "REGION_FREEZE_ENABLED";
|
||||||
}
|
}
|
||||||
@ -69,11 +65,4 @@ public class FreezeCommand extends SWCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
|
||||||
public TypeValidator<Player> validator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), getNoPermMessage());
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -42,11 +42,6 @@ public class ItemsCommand extends SWCommand {
|
|||||||
@Register(description = "REGION_ITEMS_HELP")
|
@Register(description = "REGION_ITEMS_HELP")
|
||||||
public void toggleCommand(@Validator Player p) {
|
public void toggleCommand(@Validator Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (region != GlobalRegion.getInstance() && GlobalRegion.getInstance().getPlain(Flag.ITEMS, ItemMode.class) == ItemMode.INACTIVE) {
|
|
||||||
RegionUtils.actionBar(region, "REGION_ITEMS_DISABLED_GLOBAL");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toggle(region)) {
|
if (toggle(region)) {
|
||||||
RegionUtils.actionBar(region, getEnableMessage());
|
RegionUtils.actionBar(region, getEnableMessage());
|
||||||
} else {
|
} else {
|
||||||
@ -54,10 +49,6 @@ public class ItemsCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getNoPermMessage() {
|
|
||||||
return "REGION_ITEMS_NO_PERMS";
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getEnableMessage(){
|
private String getEnableMessage(){
|
||||||
return "REGION_ITEMS_ENABLED";
|
return "REGION_ITEMS_ENABLED";
|
||||||
}
|
}
|
||||||
@ -77,11 +68,4 @@ public class ItemsCommand extends SWCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
|
||||||
public TypeValidator<Player> validator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), getNoPermMessage());
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.features.region;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.region.Region;
|
||||||
|
import de.steamwar.bausystem.region.RegionUtils;
|
||||||
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
|
import de.steamwar.bausystem.region.flags.flagvalues.NoGravityMode;
|
||||||
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@Linked
|
||||||
|
public class NoGravityCommand extends SWCommand {
|
||||||
|
|
||||||
|
public NoGravityCommand() {
|
||||||
|
super("nogravity");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(description = "REGION_NO_GRAVITY_HELP")
|
||||||
|
public void toggleCommand(@Validator Player p) {
|
||||||
|
Region region = Region.getRegion(p.getLocation());
|
||||||
|
if (toggle(region)) {
|
||||||
|
RegionUtils.actionBar(region, getEnableMessage());
|
||||||
|
} else {
|
||||||
|
RegionUtils.actionBar(region, getDisableMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getEnableMessage() {
|
||||||
|
return "REGION_NO_GRAVITY_ENABLED";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getDisableMessage() {
|
||||||
|
return "REGION_NO_GRAVITY_DISABLED";
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean toggle(Region region) {
|
||||||
|
switch (region.getPlain(Flag.NO_GRAVITY, NoGravityMode.class)) {
|
||||||
|
case ACTIVE:
|
||||||
|
region.set(Flag.NO_GRAVITY, NoGravityMode.INACTIVE);
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
case INACTIVE:
|
||||||
|
region.set(Flag.NO_GRAVITY, NoGravityMode.ACTIVE);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.features.region;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.bausystem.region.Region;
|
||||||
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
|
import de.steamwar.bausystem.region.flags.flagvalues.NoGravityMode;
|
||||||
|
import de.steamwar.bausystem.utils.ScoreboardElement;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||||
|
|
||||||
|
@Linked
|
||||||
|
public class NoGravityListener implements Listener, ScoreboardElement {
|
||||||
|
|
||||||
|
private static NoGravityMode getMode(Region region) {
|
||||||
|
return region.getPlain(Flag.NO_GRAVITY, NoGravityMode.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onEntitySpawn(EntitySpawnEvent event) {
|
||||||
|
if (event.getEntityType() == EntityType.PLAYER) return;
|
||||||
|
if (getMode(Region.getRegion(event.getLocation())) == NoGravityMode.ACTIVE) {
|
||||||
|
event.getEntity().setGravity(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScoreboardGroup getGroup() {
|
||||||
|
return ScoreboardGroup.REGION;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int order() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String get(Region region, Player p) {
|
||||||
|
if (region.get(Flag.NO_GRAVITY) == Flag.NO_GRAVITY.getDefaultValue()) return null;
|
||||||
|
return "§e" + BauSystem.MESSAGE.parse(Flag.NO_GRAVITY.getChatValue(), p) + "§8: " + BauSystem.MESSAGE.parse(region.get(Flag.NO_GRAVITY).getChatValue(), p);
|
||||||
|
}
|
||||||
|
}
|
@ -54,13 +54,6 @@ public class ProtectCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
|
||||||
public TypeValidator<Player> validator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLDEDIT), "REGION_PROTECT_NO_PERMS");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private Region regionCheck(Player player) {
|
private Region regionCheck(Player player) {
|
||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
if (region.getFloorLevel() == 0) {
|
if (region.getFloorLevel() == 0) {
|
||||||
|
@ -19,28 +19,39 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.region;
|
package de.steamwar.bausystem.features.region;
|
||||||
|
|
||||||
|
import com.sk89q.worldedit.EditSession;
|
||||||
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
|
import com.sk89q.worldedit.function.operation.Operations;
|
||||||
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
|
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
|
||||||
import de.steamwar.bausystem.features.util.SelectCommand;
|
import de.steamwar.bausystem.features.util.SelectCommand;
|
||||||
|
import de.steamwar.bausystem.region.Point;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.region.RegionUtils;
|
import de.steamwar.bausystem.region.RegionUtils;
|
||||||
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
|
import de.steamwar.bausystem.region.flags.flagvalues.ColorMode;
|
||||||
import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
||||||
import de.steamwar.bausystem.region.utils.RegionType;
|
import de.steamwar.bausystem.region.utils.RegionType;
|
||||||
import de.steamwar.bausystem.worlddata.WorldData;
|
import de.steamwar.bausystem.shared.Pair;
|
||||||
|
import de.steamwar.bausystem.utils.FlatteningWrapper;
|
||||||
|
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||||
|
import de.steamwar.bausystem.utils.WorldEditUtils;
|
||||||
import de.steamwar.command.PreviousArguments;
|
import de.steamwar.command.PreviousArguments;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
import de.steamwar.command.TypeValidator;
|
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import de.steamwar.linkage.LinkedInstance;
|
import de.steamwar.linkage.LinkedInstance;
|
||||||
import de.steamwar.sql.SchematicNode;
|
import de.steamwar.sql.SchematicNode;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -68,7 +79,7 @@ public class RegionCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "undo", description = "REGION_REGION_HELP_UNDO")
|
@Register(value = "undo", description = "REGION_REGION_HELP_UNDO")
|
||||||
public void undoCommand(@Validator("WORLD_EDIT") Player p) {
|
public void undoCommand(@Validator Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) return;
|
if (checkGlobalRegion(region, p)) return;
|
||||||
|
|
||||||
@ -80,7 +91,7 @@ public class RegionCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "redo", description = "REGION_REGION_HELP_REDO")
|
@Register(value = "redo", description = "REGION_REGION_HELP_REDO")
|
||||||
public void redoCommand(@Validator("WORLD_EDIT") Player p) {
|
public void redoCommand(@Validator Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) {
|
if (checkGlobalRegion(region, p)) {
|
||||||
return;
|
return;
|
||||||
@ -94,21 +105,24 @@ public class RegionCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "restore", description = "REGION_REGION_HELP_RESTORE")
|
@Register(value = "restore", description = "REGION_REGION_HELP_RESTORE")
|
||||||
public void genericRestoreCommand(@Validator("WORLD_EDIT") Player p) {
|
public void genericRestoreCommand(@Validator Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if(checkGlobalRegion(region, p)) return;
|
if(checkGlobalRegion(region, p)) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
region.reset(null, RegionType.NORMAL, RegionExtensionType.NORMAL, true, false);
|
PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getResetFile(RegionType.NORMAL)))
|
||||||
|
.ignoreAir(true)
|
||||||
|
.color(region.getPlain(Flag.COLOR, ColorMode.class).getColor());
|
||||||
|
region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL);
|
||||||
RegionUtils.message(region, "REGION_REGION_RESTORED");
|
RegionUtils.message(region, "REGION_REGION_RESTORED");
|
||||||
} catch (IOException e) {
|
} catch (SecurityException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_FAILED_RESTORE", p);
|
BauSystem.MESSAGE.send("REGION_REGION_FAILED_RESTORE", p);
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Failed restore", e);
|
Bukkit.getLogger().log(Level.WARNING, "Failed restore", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "restore", description = "REGION_REGION_HELP_RESTORE_SCHEMATIC")
|
@Register(value = "restore", description = "REGION_REGION_HELP_RESTORE_SCHEMATIC")
|
||||||
public void schematicRestoreCommand(@Validator("WORLD_EDIT") Player p, SchematicNode node) {
|
public void schematicRestoreCommand(@Validator Player p, SchematicNode node) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) return;
|
if (checkGlobalRegion(region, p)) return;
|
||||||
|
|
||||||
@ -118,9 +132,12 @@ public class RegionCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
region.reset(node, RegionType.NORMAL, RegionExtensionType.NORMAL, true);
|
PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.SchematicProvider(node))
|
||||||
|
.ignoreAir(true)
|
||||||
|
.color(region.getPlain(Flag.COLOR, ColorMode.class).getColor());
|
||||||
|
region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL);
|
||||||
RegionUtils.message(region, "REGION_REGION_RESTORED");
|
RegionUtils.message(region, "REGION_REGION_RESTORED");
|
||||||
} catch (IOException e) {
|
} catch (SecurityException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_FAILED_RESTORE", p);
|
BauSystem.MESSAGE.send("REGION_REGION_FAILED_RESTORE", p);
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Failed restore", e);
|
Bukkit.getLogger().log(Level.WARNING, "Failed restore", e);
|
||||||
}
|
}
|
||||||
@ -163,7 +180,7 @@ public class RegionCommand extends SWCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INFO", p, region.getSkin());
|
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INFO", p, region.getSkin());
|
||||||
String creator = region.getPrototype().getSkins().get(region.getSkin()).getCreator();
|
String creator = region.getPrototype().getSkinMap().get(region.getSkin()).getCreator();
|
||||||
if (creator != null) {
|
if (creator != null) {
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INFO_CREATOR", p, creator);
|
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_INFO_CREATOR", p, creator);
|
||||||
}
|
}
|
||||||
@ -171,16 +188,15 @@ public class RegionCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(value = "changeskin", description = "REGION_REGION_HELP_CHANGESKIN")
|
@Register(value = "changeskin", description = "REGION_REGION_HELP_CHANGESKIN")
|
||||||
@Register("skin")
|
@Register("skin")
|
||||||
public void changeSkinCommand(@Validator("WORLD") Player p, @Mapper("skinTypeMapper") String s) {
|
public void changeSkinCommand(@Validator Player p, @Mapper("skinTypeMapper") String s) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) {
|
if (checkGlobalRegion(region, p)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!region.getPrototype().getSkins().containsKey(s)) {
|
if (!region.getPrototype().getSkinMap().containsKey(s)) {
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_UNKNOWN", p);
|
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_UNKNOWN", p);
|
||||||
} else {
|
} else {
|
||||||
if (region.setSkin(s)) {
|
if (region.setSkin(s)) {
|
||||||
WorldData.getInstance().save();
|
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_CHANGE", p, s);
|
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_CHANGE", p, s);
|
||||||
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_CHANGE_UPDATE", p, BauSystem.MESSAGE.parse("REGION_REGION_CHANGESKIN_CHANGE_UPDATE_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/reset"));
|
BauSystem.MESSAGE.send("REGION_REGION_CHANGESKIN_CHANGE_UPDATE", p, BauSystem.MESSAGE.parse("REGION_REGION_CHANGESKIN_CHANGE_UPDATE_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/reset"));
|
||||||
} else {
|
} else {
|
||||||
@ -189,6 +205,106 @@ public class RegionCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(value = "copy", description = "REGION_REGION_HELP_COPY")
|
||||||
|
public void copyCommand(@Validator Player p, @OptionalValue("") @StaticValue(value = {"", "-e", "-s"}, allowISE = true) int option) {
|
||||||
|
Region region = Region.getRegion(p.getLocation());
|
||||||
|
if (checkGlobalRegion(region, p)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!region.hasType(RegionType.BUILD)) {
|
||||||
|
BauSystem.MESSAGE.send("REGION_REGION_NO_BUILD", p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (region.getCopyPoint() == null) {
|
||||||
|
BauSystem.MESSAGE.send("REGION_REGION_TP_UNKNOWN", p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point minPoint = region.getMinPoint(RegionType.BUILD, RegionExtensionType.NORMAL);
|
||||||
|
Point maxPoint = region.getMaxPoint(RegionType.BUILD, RegionExtensionType.NORMAL);
|
||||||
|
switch (option) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
minPoint = region.getMinPoint(RegionType.BUILD, RegionExtensionType.EXTENSION);
|
||||||
|
maxPoint = region.getMaxPoint(RegionType.BUILD, RegionExtensionType.EXTENSION);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Pair<Location, Location> selection = WorldEditUtils.getSelection(p);
|
||||||
|
minPoint = Point.fromLocation(selection.getKey());
|
||||||
|
maxPoint = Point.fromLocation(selection.getValue());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Clipboard clipboard = FlatteningWrapper.impl.copy(minPoint, maxPoint, region.getCopyPoint());
|
||||||
|
WorldEdit.getInstance()
|
||||||
|
.getSessionManager()
|
||||||
|
.get(BukkitAdapter.adapt(p))
|
||||||
|
.setClipboard(new ClipboardHolder(clipboard));
|
||||||
|
BauSystem.MESSAGE.send("REGION_REGION_COPY_DONE", p);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(value = "paste", description = "REGION_REGION_HELP_PASTE")
|
||||||
|
public void pasteCommand(@Validator Player p, @OptionalValue("") @StaticValue(value = {"", "-a", "-s", "-as", "-sa"}, allowISE = true) int options) {
|
||||||
|
Region region = Region.getRegion(p.getLocation());
|
||||||
|
if (checkGlobalRegion(region, p)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!region.hasType(RegionType.BUILD)) {
|
||||||
|
BauSystem.MESSAGE.send("REGION_REGION_NO_BUILD", p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (region.getCopyPoint() == null) {
|
||||||
|
BauSystem.MESSAGE.send("REGION_REGION_TP_UNKNOWN", p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClipboardHolder clipboardHolder = WorldEdit.getInstance()
|
||||||
|
.getSessionManager()
|
||||||
|
.get(BukkitAdapter.adapt(p))
|
||||||
|
.getClipboard();
|
||||||
|
|
||||||
|
boolean selectPasted = false;
|
||||||
|
boolean ignoreAir = false;
|
||||||
|
switch (options) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ignoreAir = true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
selectPasted = true;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
selectPasted = true;
|
||||||
|
ignoreAir = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
try (EditSession e = WorldEditUtils.getEditSession(p)) {
|
||||||
|
Operations.completeBlindly(clipboardHolder.createPaste(e).ignoreAirBlocks(ignoreAir).to(toBlockVector3(region.getCopyPoint())).build());
|
||||||
|
WorldEditUtils.addToPlayer(p, e);
|
||||||
|
|
||||||
|
if (selectPasted) {
|
||||||
|
Clipboard clipboard = clipboardHolder.getClipboards().get(0);
|
||||||
|
BlockVector3 minPointSelection = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin()).add(toBlockVector3(region.getCopyPoint()));
|
||||||
|
BlockVector3 maxPointSelection = clipboard.getRegion().getMaximumPoint().subtract(clipboard.getOrigin()).add(toBlockVector3(region.getCopyPoint()));
|
||||||
|
FlatteningWrapper.impl.setSelection(p, Point.fromBlockVector3(minPointSelection), Point.fromBlockVector3(maxPointSelection));
|
||||||
|
}
|
||||||
|
BauSystem.MESSAGE.send("REGION_REGION_PASTE_DONE", p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private BlockVector3 toBlockVector3(Point point) {
|
||||||
|
return BlockVector3.at(point.getX(), point.getY(), point.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Mapper(value = "skinTypeMapper", local = true)
|
@Mapper(value = "skinTypeMapper", local = true)
|
||||||
private TypeMapper<String> skinTypeMapper() {
|
private TypeMapper<String> skinTypeMapper() {
|
||||||
return new TypeMapper<String>() {
|
return new TypeMapper<String>() {
|
||||||
@ -199,7 +315,7 @@ public class RegionCommand extends SWCommand {
|
|||||||
if (region.isGlobal()) {
|
if (region.isGlobal()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
return region.getPrototype().getSkins().keySet().stream().map(c -> c.replace(' ', '_')).collect(Collectors.toList());
|
return region.getPrototype().getSkinMap().keySet().stream().map(c -> c.replace(' ', '_')).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -208,18 +324,4 @@ public class RegionCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Validator(value = "WORLD", local = true)
|
|
||||||
public TypeValidator<Player> worldValidator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), "REGION_REGION_NO_PERMS");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Validator(value = "WORLD_EDIT", local = true)
|
|
||||||
public TypeValidator<Player> worldEditValidator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLDEDIT), "REGION_REGION_NO_PERMS");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -21,14 +21,22 @@ package de.steamwar.bausystem.features.region;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.config.BauServer;
|
||||||
import de.steamwar.bausystem.region.GlobalRegion;
|
import de.steamwar.bausystem.region.GlobalRegion;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
import de.steamwar.bausystem.region.RegionUtils;
|
import de.steamwar.bausystem.region.RegionUtils;
|
||||||
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
|
import de.steamwar.bausystem.region.flags.flagvalues.ColorMode;
|
||||||
|
import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
||||||
import de.steamwar.bausystem.region.utils.RegionType;
|
import de.steamwar.bausystem.region.utils.RegionType;
|
||||||
|
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.LinkedInstance;
|
||||||
|
import de.steamwar.sql.Punishment;
|
||||||
import de.steamwar.sql.SchematicNode;
|
import de.steamwar.sql.SchematicNode;
|
||||||
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -38,6 +46,9 @@ import java.util.logging.Level;
|
|||||||
@Linked
|
@Linked
|
||||||
public class ResetCommand extends SWCommand {
|
public class ResetCommand extends SWCommand {
|
||||||
|
|
||||||
|
@LinkedInstance
|
||||||
|
public BauServer bauServer;
|
||||||
|
|
||||||
public ResetCommand() {
|
public ResetCommand() {
|
||||||
super("reset");
|
super("reset");
|
||||||
}
|
}
|
||||||
@ -47,9 +58,11 @@ public class ResetCommand extends SWCommand {
|
|||||||
Region region = regionCheck(p);
|
Region region = regionCheck(p);
|
||||||
if (region == null) return;
|
if (region == null) return;
|
||||||
try {
|
try {
|
||||||
region.reset(null, RegionType.NORMAL);
|
PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.FileProvider(region.getResetFile(RegionType.NORMAL)))
|
||||||
|
.color(region.getPlain(Flag.COLOR, ColorMode.class).getColor());
|
||||||
|
region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL);
|
||||||
RegionUtils.message(region, "REGION_RESET_RESETED");
|
RegionUtils.message(region, "REGION_RESET_RESETED");
|
||||||
} catch (IOException e) {
|
} catch (SecurityException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_RESET_ERROR", p);
|
BauSystem.MESSAGE.send("REGION_RESET_ERROR", p);
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Failed testblock", e);
|
Bukkit.getLogger().log(Level.WARNING, "Failed testblock", e);
|
||||||
}
|
}
|
||||||
@ -59,26 +72,31 @@ public class ResetCommand extends SWCommand {
|
|||||||
public void schematicResetCommand(@Validator Player p, SchematicNode node) {
|
public void schematicResetCommand(@Validator Player p, SchematicNode node) {
|
||||||
Region region = regionCheck(p);
|
Region region = regionCheck(p);
|
||||||
if (region == null) return;
|
if (region == null) return;
|
||||||
|
|
||||||
|
if (!p.getUniqueId().equals(bauServer.getOwner())) {
|
||||||
|
if (Punishment.isPunished(SteamwarUser.get(bauServer.getOwner()), Punishment.PunishmentType.NoSchemReceiving, punishment -> BauSystem.MESSAGE.send("REGION_TB_NO_SCHEMRECEIVING", p, punishment.getEndTime()))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (Punishment.isPunished(SteamwarUser.get(p.getUniqueId()), Punishment.PunishmentType.NoSchemSharing, punishment -> BauSystem.MESSAGE.send("REGION_TB_NO_SCHEMSHARING", p, punishment.getEndTime()))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (node.isDir()) {
|
if (node.isDir()) {
|
||||||
BauSystem.MESSAGE.send("ONLY_SCHEMS", p);
|
BauSystem.MESSAGE.send("ONLY_SCHEMS", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
region.reset(node, RegionType.NORMAL);
|
PasteBuilder pasteBuilder = new PasteBuilder(new PasteBuilder.SchematicProvider(node))
|
||||||
|
.color(region.getPlain(Flag.COLOR, ColorMode.class).getColor());
|
||||||
|
region.reset(pasteBuilder, RegionType.NORMAL, RegionExtensionType.NORMAL);
|
||||||
RegionUtils.message(region, "REGION_RESET_RESETED");
|
RegionUtils.message(region, "REGION_RESET_RESETED");
|
||||||
} catch (IOException e) {
|
} catch (SecurityException e) {
|
||||||
BauSystem.MESSAGE.send("REGION_RESET_ERROR", p);
|
BauSystem.MESSAGE.send("REGION_RESET_ERROR", p);
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Failed reset", e);
|
Bukkit.getLogger().log(Level.WARNING, "Failed reset", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
|
||||||
public TypeValidator<Player> validator() {
|
|
||||||
return (commandSender, player, messageSender) -> {
|
|
||||||
return !messageSender.send(!Permission.hasPermission(player, Permission.WORLD), "REGION_RESET_NO_PERMS");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private Region regionCheck(Player player) {
|
private Region regionCheck(Player player) {
|
||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
if (region == GlobalRegion.getInstance()) {
|
if (region == GlobalRegion.getInstance()) {
|
||||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
In neuem Issue referenzieren
Einen Benutzer sperren