-Added disableMouseInput(long time, int... buttonIds) function.
This commit is contained in:
Luis C.M committed 2022-06-13 17:21:02 -05:00
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) {}
}
}
}