forked from SteamWar/SteamWar
Add supervisor permission on DynamicRegionVisualizer
This commit is contained in:
+4
-1
@@ -19,6 +19,7 @@
|
||||
|
||||
package de.steamwar.bausystem.region;
|
||||
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.features.region.RegionCommand;
|
||||
import de.steamwar.bausystem.region.dynamic.Tile;
|
||||
import de.steamwar.command.AbstractSWCommand;
|
||||
@@ -40,8 +41,10 @@ public class DynamicRegionCommand extends SWCommand {
|
||||
SWPlayer swPlayer = SWPlayer.of(player);
|
||||
if (swPlayer.hasComponent(DynamicRegionVisualizer.class)) {
|
||||
swPlayer.removeComponent(DynamicRegionVisualizer.class);
|
||||
} else {
|
||||
} else if (Permission.SUPERVISOR.hasPermission(player)) {
|
||||
swPlayer.setComponent(new DynamicRegionVisualizer());
|
||||
} else {
|
||||
// TODO: Add Message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user