command void issue is no more

This commit is contained in:
Super_ 2019-12-10 16:23:30 -05:00
parent 5206ab5b27
commit d78d28cc7a

View File

@ -8,6 +8,7 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -161,6 +162,17 @@ public class WorldManager extends FreedomService
return;
}
for (Player p : Bukkit.getOnlinePlayers())
{
for (Entity passengerEntity : p.getPassengers())
{
if (passengerEntity == player)
{
p.removePassenger(passengerEntity);
}
}
}
if (player.getWorld().getName().equalsIgnoreCase(targetWorld))
{
playerMsg(player, "Going to main world.", ChatColor.GRAY);