mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 04:35:03 +00:00
IPlayer:
-Added disableMouseInput(long time, int... buttonIds) function.
This commit is contained in:
1 parent
dfec85484b
commit
dd207757ea
6 files changed
+64
-5
No files matched your search
@@ -129,6 +129,18 @@ public class NoppesUtilPlayer {
|
||||
player.worldObj.updateEntityWithOptionalForce(player, false);
|
||||
}
|
||||
|
||||
public static void disableMouseInput(EntityPlayerMP player, long time, int... buttonIds) {
|
||||
StringBuilder stringedIds = new StringBuilder();
|
||||
for (int i = 0; i < buttonIds.length; i++) {
|
||||
stringedIds.append(i);
|
||||
if (i < buttonIds.length - 1) {
|
||||
stringedIds.append(";");
|
||||
}
|
||||
}
|
||||
|
||||
Server.sendData(player, EnumPacketClient.DISABLE_MOUSE_INPUT, time, stringedIds.toString());
|
||||
}
|
||||
|
||||
public static void swingPlayerArm(EntityPlayerMP player){
|
||||
Server.sendData(player, EnumPacketClient.SWING_PLAYER_ARM);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user