mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +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
@@ -288,5 +288,20 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
NBTTagCompound compound = Server.readNBT(buffer);
|
||||
NoppesUtil.updateSkinOverlayData(sendingPlayer, compound);
|
||||
}
|
||||
else if(type == EnumPacketClient.DISABLE_MOUSE_INPUT) {
|
||||
long length = buffer.readLong();
|
||||
try {
|
||||
String parsedButtons = Server.readString(buffer);
|
||||
if (parsedButtons == null || parsedButtons.isEmpty()) {
|
||||
ClientEventHandler.disabledButtonTimes.put(-1, length);
|
||||
return;
|
||||
}
|
||||
|
||||
String[] splitIds = parsedButtons.split(";");
|
||||
for (String s : splitIds) {
|
||||
ClientEventHandler.disabledButtonTimes.put(Integer.parseInt(s), length);
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user