Support for multiple players to use a mouse

This commit is contained in:
Norbi Peti 2016-04-07 09:52:34 +02:00
parent 11351dd953
commit e667097552

View file

@ -6,12 +6,12 @@ import org.bukkit.event.player.PlayerMoveEvent;
public class MouseLockerPlayerListener implements Listener
{
public static boolean MouseLocked = false;
public static List<Player> LockedPlayers = new List<Player>();
@EventHandler
public void onPlayerMoveMouse(PlayerMoveEvent e)
{
if (!MouseLocked)
if (!LockedPlayers.contains(e.getPlayer())
return;
float yaw1 = e.getFrom().getYaw();
float pitch1 = e.getFrom().getPitch();