diff --git a/core/pom.xml b/core/pom.xml index b2d281c..4d65338 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -83,5 +83,17 @@ 33.1.0-jre compile + + org.bukkit + bukkit + 1.21.1-R0.1-SNAPSHOT + compile + + + org.bukkit + bukkit + 1.21.1-R0.1-SNAPSHOT + compile + diff --git a/core/src/main/java/org/ef3d0c3e/sheepwars/Util.java b/core/src/main/java/org/ef3d0c3e/sheepwars/Util.java index 687aad2..f5bca62 100644 --- a/core/src/main/java/org/ef3d0c3e/sheepwars/Util.java +++ b/core/src/main/java/org/ef3d0c3e/sheepwars/Util.java @@ -7,6 +7,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.profile.PlayerProfile; import org.bukkit.profile.PlayerTextures; +import org.bukkit.util.Vector; import javax.annotation.Nullable; import java.net.MalformedURLException; @@ -71,4 +72,16 @@ public class Util { return skull; } + + /** + * Parses string to vector + * @param text Text in the form ".5 7.5 -10" + * @return Vector + */ + public static Vector parseVector(final String text) + { + String[] split = text.split(" ", 3); + + return new Vector(Double.valueOf(split[0]), Double.valueOf(split[1]), Double.valueOf(split[2])); + } } diff --git a/core/src/main/java/org/ef3d0c3e/sheepwars/commands/CmdSheepWars.java b/core/src/main/java/org/ef3d0c3e/sheepwars/commands/CmdSheepWars.java index 5c53755..e82c58e 100644 --- a/core/src/main/java/org/ef3d0c3e/sheepwars/commands/CmdSheepWars.java +++ b/core/src/main/java/org/ef3d0c3e/sheepwars/commands/CmdSheepWars.java @@ -1,10 +1,16 @@ package org.ef3d0c3e.sheepwars.commands; import com.google.common.collect.Lists; +import org.bukkit.Location; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; +import org.ef3d0c3e.sheepwars.SheepWars; +import org.ef3d0c3e.sheepwars.maps.Map; +import org.ef3d0c3e.sheepwars.maps.MapManager; import org.jetbrains.annotations.NotNull; +import org.ef3d0c3e.sheepwars.game.Game; import javax.annotation.Nullable; import java.util.Arrays; @@ -33,6 +39,20 @@ public class CmdSheepWars extends Command { sender.sendMessage(" - §astart §fStarts the game"); sender.sendMessage(" - §adebug §7