Update CommandProtect message sending
Add CommandInfo protect status
Dieser Commit ist enthalten in:
Ursprung
bcc972ab6b
Commit
f95fb01eb1
@ -20,8 +20,8 @@
|
|||||||
package de.steamwar.bausystem.commands;
|
package de.steamwar.bausystem.commands;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.world.regions.Region;
|
|
||||||
import de.steamwar.bausystem.world.TPSUtils;
|
import de.steamwar.bausystem.world.TPSUtils;
|
||||||
|
import de.steamwar.bausystem.world.regions.Region;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.core.TPSWatcher;
|
import de.steamwar.core.TPSWatcher;
|
||||||
import de.steamwar.sql.BauweltMember;
|
import de.steamwar.sql.BauweltMember;
|
||||||
@ -52,11 +52,15 @@ public class CommandInfo extends SWCommand {
|
|||||||
p.sendMessage(BauSystem.PREFIX + "Besitzer: §e" + SteamwarUser.get(BauSystem.getOwnerID()).getUserName());
|
p.sendMessage(BauSystem.PREFIX + "Besitzer: §e" + SteamwarUser.get(BauSystem.getOwnerID()).getUserName());
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
p.sendMessage(BauSystem.PREFIX + "§eTNT§8: " + region.getTntMode().getName() + " §eFire§8: " + (region.isFire() ? "§aAUS" : "§cAN") + " §eFreeze§8: " + (region.isFreeze() ? "§aAN" : "§cAUS"));
|
p.sendMessage(BauSystem.PREFIX + "§eTNT§8: " + region.getTntMode().getName() + " §eFire§8: " + (region.isFire() ? "§aAUS" : "§cAN") + " §eFreeze§8: " + (region.isFreeze() ? "§aAN" : "§cAUS"));
|
||||||
|
if (region.hasProtection()) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§eProtect§8: " + (region.isProtect() ? "§aAN" : "§cAUS"));
|
||||||
|
}
|
||||||
|
|
||||||
List<BauweltMember> members = BauweltMember.getMembers(BauSystem.getOwnerID());
|
List<BauweltMember> members = BauweltMember.getMembers(BauSystem.getOwnerID());
|
||||||
StringBuilder membermessage = new StringBuilder().append(BauSystem.PREFIX).append("Mitglieder: ");
|
StringBuilder membermessage = new StringBuilder().append(BauSystem.PREFIX).append("Mitglieder: ");
|
||||||
|
|
||||||
for (BauweltMember member : members) {
|
for (
|
||||||
|
BauweltMember member : members) {
|
||||||
membermessage.append("§e").append(SteamwarUser.get(member.getMemberID()).getUserName()).append("§8[");
|
membermessage.append("§e").append(SteamwarUser.get(member.getMemberID()).getUserName()).append("§8[");
|
||||||
membermessage.append(member.isWorldEdit() ? "§a" : "§c").append("WE").append("§8,");
|
membermessage.append(member.isWorldEdit() ? "§a" : "§c").append("WE").append("§8,");
|
||||||
membermessage.append(member.isWorld() ? "§a" : "§c").append("W").append("§8]").append(" ");
|
membermessage.append(member.isWorld() ? "§a" : "§c").append("W").append("§8]").append(" ");
|
||||||
@ -64,7 +68,9 @@ public class CommandInfo extends SWCommand {
|
|||||||
p.sendMessage(membermessage.toString());
|
p.sendMessage(membermessage.toString());
|
||||||
|
|
||||||
StringBuilder tpsMessage = new StringBuilder();
|
StringBuilder tpsMessage = new StringBuilder();
|
||||||
tpsMessage.append(BauSystem.PREFIX).append("TPS:§e");
|
tpsMessage.append(BauSystem.PREFIX).
|
||||||
|
|
||||||
|
append("TPS:§e");
|
||||||
tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.ONE_SECOND));
|
tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.ONE_SECOND));
|
||||||
tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.TEN_SECONDS));
|
tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.TEN_SECONDS));
|
||||||
if (!TPSUtils.isWarping()) {
|
if (!TPSUtils.isWarping()) {
|
||||||
|
@ -23,8 +23,6 @@ import de.steamwar.bausystem.BauSystem;
|
|||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.Permission;
|
||||||
import de.steamwar.bausystem.world.Welt;
|
import de.steamwar.bausystem.world.Welt;
|
||||||
import de.steamwar.bausystem.world.regions.Region;
|
import de.steamwar.bausystem.world.regions.Region;
|
||||||
import de.steamwar.bausystem.world.regions.RegionExtensionType;
|
|
||||||
import de.steamwar.bausystem.world.regions.RegionType;
|
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.sql.Schematic;
|
import de.steamwar.sql.Schematic;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -59,9 +57,9 @@ public class CommandProtect extends SWCommand implements Listener {
|
|||||||
if (Region.buildAreaEnabled()) {
|
if (Region.buildAreaEnabled()) {
|
||||||
region.setProtect(!region.isProtect());
|
region.setProtect(!region.isProtect());
|
||||||
if (region.isProtect()) {
|
if (region.isProtect()) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§7Boden geschützt");
|
RegionUtils.actionBar(region, "§aBoden geschützt");
|
||||||
} else {
|
} else {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§7Boden Schutz aufgehoben");
|
RegionUtils.actionBar(region, "§cBoden Schutz aufgehoben");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren