forked from SteamWar/SteamWar
Improve several things
This commit is contained in:
+2
-4
@@ -29,7 +29,6 @@ import de.steamwar.command.AbstractSWCommand;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -44,9 +43,8 @@ public class DynamicRegionCommand extends SWCommand {
|
||||
public void placeRegion(Player player) {
|
||||
Region region = DynamicRegionSystem.INSTANCE.get(player.getLocation());
|
||||
if (!region.getType().isGlobal()) return;
|
||||
Optional<Tile> optionalTile = Tile.fromLocation(player.getLocation());
|
||||
if (optionalTile.isEmpty()) return;
|
||||
Tile tile = optionalTile.get();
|
||||
Tile tile = Tile.fromLocation(player.getLocation()).validOrNull();
|
||||
if (tile == null) return;
|
||||
|
||||
// TODO: Replace!
|
||||
PathRegion dynamicRegion = new PathRegion(UUID.randomUUID(), tile.getMinX(), tile.getMinZ());
|
||||
|
||||
Reference in New Issue
Block a user