RegionFix #240
@ -2,9 +2,9 @@ package de.steamwar.bausystem.commands;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.world.Welt;
|
||||
import de.steamwar.bausystem.world.regions.GlobalRegion;
|
||||
import de.steamwar.bausystem.world.regions.Region;
|
||||
import de.steamwar.bausystem.world.Welt;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -27,20 +27,20 @@ public class CommandRegion extends SWCommand {
|
||||
|
||||
@Register
|
||||
public void undoCommand(Player p, Action action) {
|
||||
if(!permissionCheck(p)) return;
|
||||
if (!permissionCheck(p)) return;
|
||||
Region region = Region.getRegion(p.getLocation());
|
||||
if(checkGlobalRegion(region, p)) return;
|
||||
if (checkGlobalRegion(region, p)) return;
|
||||
|
||||
switch (action) {
|
||||
case UNDO:
|
||||
if(region.undo()) {
|
||||
if (region.undo()) {
|
||||
p.sendMessage(BauSystem.PREFIX + "Letzte Aktion rückgangig gemacht");
|
||||
} else {
|
||||
p.sendMessage(BauSystem.PREFIX + "§cNichts zum rückgängig machen");
|
||||
}
|
||||
break;
|
||||
case REDO:
|
||||
if(region.redo()) {
|
||||
if (region.redo()) {
|
||||
p.sendMessage(BauSystem.PREFIX + "Letzte Aktion wiederhohlt");
|
||||
} else {
|
||||
p.sendMessage(BauSystem.PREFIX + "§cNichts zum wiederhohlen");
|
||||
@ -52,7 +52,7 @@ public class CommandRegion extends SWCommand {
|
||||
}
|
||||
|
||||
static boolean checkGlobalRegion(Region region, Player p) {
|
||||
if(GlobalRegion.isGlobalRegion(region)) {
|
||||
if (GlobalRegion.isGlobalRegion(region)) {
|
||||
p.sendMessage(BauSystem.PREFIX + "§cDu bist in keiner Region");
|
||||
return true;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren