Support for multiple players to use a mouse
This commit is contained in:
parent
11351dd953
commit
e667097552
1 changed files with 2 additions and 2 deletions
|
@ -6,12 +6,12 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
|
|
||||||
public class MouseLockerPlayerListener implements Listener
|
public class MouseLockerPlayerListener implements Listener
|
||||||
{
|
{
|
||||||
public static boolean MouseLocked = false;
|
public static List<Player> LockedPlayers = new List<Player>();
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerMoveMouse(PlayerMoveEvent e)
|
public void onPlayerMoveMouse(PlayerMoveEvent e)
|
||||||
{
|
{
|
||||||
if (!MouseLocked)
|
if (!LockedPlayers.contains(e.getPlayer())
|
||||||
return;
|
return;
|
||||||
float yaw1 = e.getFrom().getYaw();
|
float yaw1 = e.getFrom().getYaw();
|
||||||
float pitch1 = e.getFrom().getPitch();
|
float pitch1 = e.getFrom().getPitch();
|
||||||
|
|
Loading…
Reference in a new issue