mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2025-08-06 20:42:57 +00:00
yet another command void fix
This commit is contained in:
parent
97caed9313
commit
d0b64c6438
4 changed files with 24 additions and 20 deletions
|
@ -27,6 +27,7 @@ import org.bukkit.ChatColor;
|
|||
import org.bukkit.Location;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.Material;
|
||||
|
@ -473,4 +474,18 @@ public class FUtil
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void fixCommandVoid(Player player)
|
||||
{
|
||||
for (Player p : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
for (Entity passengerEntity : p.getPassengers())
|
||||
{
|
||||
if (passengerEntity == player)
|
||||
{
|
||||
p.removePassenger(passengerEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue