diff --git a/CHANGELOG.md b/CHANGELOG.md index f1a98bd..85e6ea5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # Change Log -# Beta 29 - Grief Defender Port + +# Beta 29.1 - Grief Defender Port **REQUIRED: Sponge API 7.1 (SF 3682+); Grief Defender 1.12.2-4.3.0.622+; Permissions Plugin (ie. LuckPerms)** **OPTIONAL: Nucleus 1.9.0-S7.1+** +- Fixed a bug where `/is tp` | `/is spawn` would error if an argument was provided -# Beta 29 -**REQUIRED: Sponge API 7.1 (SF 3682+); GP 1.12.2-4.3.0.622+; Permissions Plugin (ie. LuckPerms)** +# Beta 29 - Grief Defender Port +**REQUIRED: Sponge API 7.1 (SF 3682+); Grief Defender 1.12.2-4.3.0.622+; Permissions Plugin (ie. LuckPerms)** **OPTIONAL: Nucleus 1.9.0-S7.1+** - Added support for one player to own multiple islands - `/is spawn` & `/is reset` will now display the chest GUI or island list if you have permission to use them on multiple islands diff --git a/gradle.properties b/gradle.properties index fed7c21..7ad6570 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ ## Version major=0 minor=29 -patch=0 +patch=1 api=S7.1 -suffix=GRIEF-DEFENDER-PR1 +suffix=GRIEF-DEFENDER-PR2 ## Dependencies spongeapi=7.1.0 spongeforge=1.12.2-2768-7.1.4 diff --git a/src/main/java/net/mohron/skyclaims/command/user/CommandSpawn.java b/src/main/java/net/mohron/skyclaims/command/user/CommandSpawn.java index e160d3b..0208703 100644 --- a/src/main/java/net/mohron/skyclaims/command/user/CommandSpawn.java +++ b/src/main/java/net/mohron/skyclaims/command/user/CommandSpawn.java @@ -19,6 +19,7 @@ package net.mohron.skyclaims.command.user; import java.util.Optional; +import java.util.UUID; import java.util.function.Consumer; import net.mohron.skyclaims.command.CommandBase; import net.mohron.skyclaims.command.CommandIsland; @@ -26,6 +27,7 @@ import net.mohron.skyclaims.permissions.Permissions; import net.mohron.skyclaims.util.CommandUtil; import net.mohron.skyclaims.world.Island; +import net.mohron.skyclaims.world.IslandManager; import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandPermissionException; import org.spongepowered.api.command.CommandResult; @@ -60,12 +62,15 @@ public static void register() { @Override public CommandResult execute(Player player, CommandContext args) throws CommandException { - Optional island = args.getOne(ISLAND); - if (island.isPresent()) { - return sendPlayerToSpawn(player, island.get()); - } else { - return listIslands(player, this::sendPlayerToSpawn); + Optional uuid = args.getOne(ISLAND); + if (uuid.isPresent()) { + final Optional island = IslandManager.get(uuid.get()); + if (island.isPresent()) { + return sendPlayerToSpawn(player, island.get()); + } } + + return listIslands(player, this::sendPlayerToSpawn); } private CommandResult sendPlayerToSpawn(Player player, Island island) throws CommandException {