mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-08 05:23:12 +00:00
Updated EssentialsSpawn to use the new config code
/spawn and /home now call the PlayerRespawnEvent to make it more compatible with other plugins.
This commit is contained in:
parent
f3b278eac2
commit
019b49ef11
21 changed files with 406 additions and 79 deletions
|
@ -43,7 +43,8 @@ public class Commandhome extends EssentialsCommand
|
|||
}
|
||||
try
|
||||
{
|
||||
if ("bed".equalsIgnoreCase(homeName)) {
|
||||
if ("bed".equalsIgnoreCase(homeName))
|
||||
{
|
||||
final Location bed = player.getBedSpawnLocation();
|
||||
if (bed != null)
|
||||
{
|
||||
|
@ -58,18 +59,7 @@ public class Commandhome extends EssentialsCommand
|
|||
final List<String> homes = player.getHomes();
|
||||
if (homes.isEmpty() && player.equals(user))
|
||||
{
|
||||
final Location loc = player.getBedSpawnLocation();
|
||||
if (loc == null)
|
||||
{
|
||||
if (ess.getSettings().spawnIfNoHome())
|
||||
{
|
||||
user.getTeleport().respawn(ess.getSpawn(), charge);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
user.getTeleport().teleport(loc, charge);
|
||||
}
|
||||
user.getTeleport().respawn(charge);
|
||||
}
|
||||
else if (homes.isEmpty())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue