Add initial CommandProtect usability
Dieser Commit ist enthalten in:
Ursprung
2353fb17e7
Commit
010bac9741
@ -48,6 +48,15 @@ public class CommandProtect extends SWCommand {
|
||||
if (!permissionCheck(p)) return;
|
||||
Region region = regionCheck(p);
|
||||
if (region == null) return;
|
||||
if (Region.buildAreaEnabled()) {
|
||||
region.setProtect(!region.isProtect());
|
||||
if (region.isProtect()) {
|
||||
p.sendMessage(BauSystem.PREFIX + "§7Boden geschützt");
|
||||
} else {
|
||||
p.sendMessage(BauSystem.PREFIX + "§7Boden Schutz aufgehoben");
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
region.protect(null);
|
||||
p.sendMessage(BauSystem.PREFIX + "§7Boden geschützt");
|
||||
@ -60,6 +69,10 @@ public class CommandProtect extends SWCommand {
|
||||
@Register
|
||||
public void schematicProtectCommand(Player p, String s) {
|
||||
if (!permissionCheck(p)) return;
|
||||
if (Region.buildAreaEnabled()) {
|
||||
genericHelp(p);
|
||||
return;
|
||||
}
|
||||
Region region = regionCheck(p);
|
||||
if (region == null) return;
|
||||
Schematic schem = Schematic.getSchemFromDB(s, p.getUniqueId());
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren