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