Added yaw/pitch for setwarp locations.
This commit is contained in:
Binary file not shown.
@@ -916,8 +916,8 @@ public class MACommands implements CommandExecutor
|
||||
MAUtils.tellPlayer(sender, "Usage: /ma setwarp [arena|lobby|spectator]");
|
||||
return true;
|
||||
}
|
||||
|
||||
MAUtils.setArenaCoord(plugin.getConfig(), am.selectedArena, arg1, p.getLocation().getBlock().getRelative(0,1,0).getLocation());
|
||||
|
||||
MAUtils.setArenaCoord(plugin.getConfig(), am.selectedArena, arg1, p.getLocation());
|
||||
MAUtils.tellPlayer(sender, "Set warp point " + arg1 + " for arena '" + am.selectedArena.configName() + "'");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -710,6 +710,9 @@ public class MAUtils
|
||||
*/
|
||||
public static void setArenaCoord(Configuration config, Arena arena, String coord, Location loc)
|
||||
{
|
||||
if (coord.equals("arena") || coord.equals("lobby") || coord.equals("spectator"))
|
||||
loc.setY(loc.getY() + 1);
|
||||
|
||||
config.setProperty("arenas." + arena.configName() + ".coords." + coord, makeCoord(loc));
|
||||
config.save();
|
||||
arena.load(config);
|
||||
@@ -800,7 +803,7 @@ public class MAUtils
|
||||
double y = Double.parseDouble(parts[1].trim());
|
||||
double z = Double.parseDouble(parts[2].trim());
|
||||
|
||||
if (extras && parts.length == 5)
|
||||
if (extras && parts.length > 3)
|
||||
{
|
||||
float yaw = Float.parseFloat(parts[3].trim());
|
||||
float pitch = Float.parseFloat(parts[4].trim());
|
||||
@@ -964,7 +967,6 @@ public class MAUtils
|
||||
*/
|
||||
public static <E> String listToString(List<E> list)
|
||||
{
|
||||
System.out.println(list.getClass());
|
||||
return listToString(list, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user