Tested plugin

This commit is contained in:
Jimmy Allen 2018-07-27 03:06:11 +12:00
parent ba8b380b4d
commit 189eb7492a
1 changed files with 3 additions and 2 deletions

View File

@ -26,7 +26,7 @@ public class EasySpawn extends JavaPlugin{
float yaw = getConfig().getInt("spawn."+w+".yaw"); float yaw = getConfig().getInt("spawn."+w+".yaw");
player.teleport(new Location(world, x, y, z, yaw, pitch)); player.teleport(new Location(world, x, y, z, yaw, pitch));
player.sendMessage("You have been teleported to spawn."); player.sendMessage("You have been teleported to spawn.");
} }else{ player.sendMessage("This world has no spawn");}
return true; return true;
} }
@ -39,6 +39,7 @@ public class EasySpawn extends JavaPlugin{
getConfig().set("spawn."+world+".z", location.getBlockZ()); getConfig().set("spawn."+world+".z", location.getBlockZ());
getConfig().set("spawn."+world+".pitch", location.getPitch()); getConfig().set("spawn."+world+".pitch", location.getPitch());
getConfig().set("spawn."+world+".yaw", location.getYaw()); getConfig().set("spawn."+world+".yaw", location.getYaw());
saveConfig();
player.sendMessage("Spawn set."); player.sendMessage("Spawn set.");
return true; return true;
} }