Upload via GUI (14 Dateien)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# LandsChunkInfo – Anleitung (Version 1.0.7)
|
# LandsChunkInfo – Anleitung (Version 1.0.8)
|
||||||
|
|
||||||
Dieses Plugin ist eine Erweiterung für das **Lands**-Plugin. Es bietet:
|
Dieses Plugin ist eine Erweiterung für das **Lands**-Plugin. Es bietet:
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ Folia wird **nicht** unterstützt.
|
|||||||
## 2. Installation und Update
|
## 2. Installation und Update
|
||||||
|
|
||||||
1. Stoppe den Server.
|
1. Stoppe den Server.
|
||||||
2. Kopiere `LandsChunkInfo-1.0.7.jar` in den Ordner `plugins` deines Servers (dort liegt auch die Lands-Jar).
|
2. Kopiere `LandsChunkInfo-1.0.8.jar` in den Ordner `plugins` deines Servers (dort liegt auch die Lands-Jar).
|
||||||
**Bei einem Update:** Lösche zuerst die alte `LandsChunkInfo-*.jar`. Es darf nur **eine** Version im Ordner liegen.
|
**Bei einem Update:** Lösche zuerst die alte `LandsChunkInfo-*.jar`. Es darf nur **eine** Version im Ordner liegen.
|
||||||
3. Starte den Server.
|
3. Starte den Server.
|
||||||
4. Schau in die Konsole. Du solltest `[LandsChunkInfo] Enabling LandsChunkInfo` sehen. Steht dort ein roter Fehler, lies Abschnitt 11.
|
4. Schau in die Konsole. Du solltest `[LandsChunkInfo] Enabling LandsChunkInfo` sehen. Steht dort ein roter Fehler, lies Abschnitt 11.
|
||||||
@@ -57,8 +57,8 @@ Der Hauptbefehl heißt **`/chunks`**. Es gibt die Kurzform `/chunkslots`.
|
|||||||
|
|
||||||
| Befehl | Was passiert |
|
| Befehl | Was passiert |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `/chunks` | Zeigt alle deine Lands: Chunks belegt, frei, gesperrt, wann der nächste Chunk frei wird, Upkeep |
|
| `/chunks` | Zeigt dein eigenes Land (bist du nirgends Besitzer, die Lands, in denen du Mitglied bist): Chunks belegt, frei, gesperrt, wann der nächste Chunk frei wird, Upkeep |
|
||||||
| `/chunks MeinLand` | Zeigt nur dieses eine Land |
|
| `/chunks MeinLand` | Zeigt nur dieses eine Land (die Tab-Vorschläge nennen ebenfalls nur dein eigenes Land) |
|
||||||
| `/chunks top` | Zeigt die Lands mit den meisten Chunks |
|
| `/chunks top` | Zeigt die Lands mit den meisten Chunks |
|
||||||
|
|
||||||
**Beispiel einer Anzeige:**
|
**Beispiel einer Anzeige:**
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.landschunkinfo</groupId>
|
<groupId>de.landschunkinfo</groupId>
|
||||||
<artifactId>LandsChunkInfo</artifactId>
|
<artifactId>LandsChunkInfo</artifactId>
|
||||||
<version>1.0.7</version>
|
<version>1.0.8</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ final class InfoCommand implements CommandExecutor, TabCompleter {
|
|||||||
// ------------------------------------------------------------------ Info
|
// ------------------------------------------------------------------ Info
|
||||||
|
|
||||||
private void info(Player p, String[] args) {
|
private void info(Player p, String[] args) {
|
||||||
List<Land> shown = plugin.landsOf(p.getUniqueId());
|
List<Land> shown = plugin.visibleLands(p.getUniqueId());
|
||||||
if (args.length >= 1) {
|
if (args.length >= 1) {
|
||||||
String wanted = String.join(" ", args);
|
String wanted = String.join(" ", args);
|
||||||
shown = shown.stream().filter(l -> l.getName().equalsIgnoreCase(wanted)).toList();
|
shown = shown.stream().filter(l -> l.getName().equalsIgnoreCase(wanted)).toList();
|
||||||
@@ -442,7 +442,7 @@ final class InfoCommand implements CommandExecutor, TabCompleter {
|
|||||||
List<String> out = new ArrayList<>();
|
List<String> out = new ArrayList<>();
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
out.addAll(SUBS);
|
out.addAll(SUBS);
|
||||||
plugin.landsOf(p.getUniqueId()).forEach(l -> out.add(l.getName()));
|
plugin.visibleLands(p.getUniqueId()).forEach(l -> out.add(l.getName()));
|
||||||
} else {
|
} else {
|
||||||
switch (args[0].toLowerCase(Locale.ROOT)) {
|
switch (args[0].toLowerCase(Locale.ROOT)) {
|
||||||
case "queue", "watch" -> out.addAll(args.length == 2 ? List.of("list", "clear") : List.of());
|
case "queue", "watch" -> out.addAll(args.length == 2 ? List.of("list", "clear") : List.of());
|
||||||
@@ -455,12 +455,12 @@ final class InfoCommand implements CommandExecutor, TabCompleter {
|
|||||||
}
|
}
|
||||||
case "skip", "gift" -> {
|
case "skip", "gift" -> {
|
||||||
out.add("confirm");
|
out.add("confirm");
|
||||||
plugin.landsOf(p.getUniqueId()).forEach(l -> out.add(l.getName()));
|
plugin.visibleLands(p.getUniqueId()).forEach(l -> out.add(l.getName()));
|
||||||
}
|
}
|
||||||
default -> { }
|
default -> { }
|
||||||
}
|
}
|
||||||
if (args[0].equalsIgnoreCase("queue")) {
|
if (args[0].equalsIgnoreCase("queue")) {
|
||||||
plugin.landsOf(p.getUniqueId()).forEach(l -> out.add(l.getName()));
|
plugin.visibleLands(p.getUniqueId()).forEach(l -> out.add(l.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out.stream().filter(o -> o.toLowerCase(Locale.ROOT).startsWith(last)).toList();
|
return out.stream().filter(o -> o.toLowerCase(Locale.ROOT).startsWith(last)).toList();
|
||||||
|
|||||||
@@ -156,6 +156,13 @@ public final class LandsChunkInfo extends JavaPlugin implements Listener {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Fuer Anzeige und Vorschlaege: nur eigene Lands; wer keins besitzt, sieht die Lands, in denen er Mitglied ist. */
|
||||||
|
List<Land> visibleLands(UUID uuid) {
|
||||||
|
List<Land> all = landsOf(uuid);
|
||||||
|
List<Land> own = all.stream().filter(l -> uuid.equals(l.getOwnerUID())).toList();
|
||||||
|
return own.isEmpty() ? all : own;
|
||||||
|
}
|
||||||
|
|
||||||
/** Hauptland: eigenes Land, sonst das erste Land, in dem man vertraut ist. */
|
/** Hauptland: eigenes Land, sonst das erste Land, in dem man vertraut ist. */
|
||||||
Land primaryLand(UUID uuid) {
|
Land primaryLand(UUID uuid) {
|
||||||
List<Land> l = landsOf(uuid);
|
List<Land> l = landsOf(uuid);
|
||||||
|
|||||||
Reference in New Issue
Block a user