From e667097552f4cd693f5a42f7f8538f1f1fcc1769 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 7 Apr 2016 09:52:34 +0200 Subject: [PATCH] Support for multiple players to use a mouse --- .../src/sznp/virtualcomputer/MouseLockerPlayerListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VirtualComputer/src/sznp/virtualcomputer/MouseLockerPlayerListener.java b/VirtualComputer/src/sznp/virtualcomputer/MouseLockerPlayerListener.java index 090f867..b63acdf 100644 --- a/VirtualComputer/src/sznp/virtualcomputer/MouseLockerPlayerListener.java +++ b/VirtualComputer/src/sznp/virtualcomputer/MouseLockerPlayerListener.java @@ -6,12 +6,12 @@ import org.bukkit.event.player.PlayerMoveEvent; public class MouseLockerPlayerListener implements Listener { - public static boolean MouseLocked = false; + public static List LockedPlayers = new List(); @EventHandler public void onPlayerMoveMouse(PlayerMoveEvent e) { - if (!MouseLocked) + if (!LockedPlayers.contains(e.getPlayer()) return; float yaw1 = e.getFrom().getYaw(); float pitch1 = e.getFrom().getPitch();