Commit Graph

  • e33ab62b63 Changed setLastInputTick method in Client Proxy to a simpler updateLastInputTick method which doesn't need a parameter since it was only ever passed one value. Micle 2022-06-06 13:12:29 +01:00
  • f90ecc160a Changed setLastInputTick method in Client Proxy to a simpler updateLastInputTick method which doesn't need a parameter since it was only ever passed one value. Micle 2022-06-06 13:12:29 +01:00
  • 0744bd064a Updated RequestLastInputTickPacket. - Removed unnecessary default constructor. - When handling the packet the client will first check if input is allowed which should update the last input tick if needs be before sending it to the server. Micle 2022-06-06 13:06:27 +01:00
  • 1e44d02789 Updated RequestLastInputTickPacket. - Removed unnecessary default constructor. - When handling the packet the client will first check if input is allowed which should update the last input tick if needs be before sending it to the server. Micle 2022-06-06 13:06:27 +01:00
  • e030d67be7 Rewrote OnClientInputEventHandler. It now keeps track of whether any of configurable keys is pressed in or not. It also will now check whether any of the pressed keys are allowed or not before updating last input tick and sending an input packet. This was done to fix the issue of GLFW_REPEAT stopping after another key is typed. This will prevent a player from going afk while still moving after jumping etc. Micle 2022-06-06 13:04:52 +01:00
  • b38dc29f76 Rewrote OnClientInputEventHandler. It now keeps track of whether any of configurable keys is pressed in or not. It also will now check whether any of the pressed keys are allowed or not before updating last input tick and sending an input packet. This was done to fix the issue of GLFW_REPEAT stopping after another key is typed. This will prevent a player from going afk while still moving after jumping etc. Micle 2022-06-06 13:04:52 +01:00
  • 27acfd0806 Removed unnecessary constructor. Micle 2022-06-05 16:18:01 +01:00
  • d9a541ab5e Removed unnecessary constructor. Micle 2022-06-05 16:18:01 +01:00
  • 7a6c8f4cef Created a new packet for sending the last input tick to the server and deciding whether the player is afk or not. Micle 2022-06-05 13:50:43 +01:00
  • e7a8452898 Created a new packet for sending the last input tick to the server and deciding whether the player is afk or not. Micle 2022-06-05 13:50:43 +01:00
  • cd98b0c811 Created new packet for requesting the last input tick from a client. Micle 2022-06-05 13:50:05 +01:00
  • 09d38a6d1e Created new packet for requesting the last input tick from a client. Micle 2022-06-05 13:50:05 +01:00
  • a440fcc1ab Removed OnPlayerTickEventHandler and added client-sided last input tick field with getter and setter to proxy. Micle 2022-06-05 13:49:17 +01:00
  • 9134b4cbb6 Removed OnPlayerTickEventHandler and added client-sided last input tick field with getter and setter to proxy. Micle 2022-06-05 13:49:17 +01:00
  • 1931f491a0 ProtectedPlayerManager adjustments and AFK timer. - No longer adding a player that might not exist to then instantly remove them if they don't. - Updated method calls to match new ones in ProtectedPlayer. - Updated packet names to new ones. - Grace period timer no longer cancels the timer but itself instead. - Created new method for starting the afk timer for a player, starting a new afk timer whenever a player becomes active. Micle 2022-06-05 13:47:36 +01:00
  • 572e40f158 ProtectedPlayerManager adjustments and AFK timer. - No longer adding a player that might not exist to then instantly remove them if they don't. - Updated method calls to match new ones in ProtectedPlayer. - Updated packet names to new ones. - Grace period timer no longer cancels the timer but itself instead. - Created new method for starting the afk timer for a player, starting a new afk timer whenever a player becomes active. Micle 2022-06-05 13:47:36 +01:00
  • f46109e1cb Changed ProtectedPlayer's timers. -Removed lastInputTick field along with the getter and setter. -Changed timer name and added two TimerTask fields for the grace period and afk. -Changed the getter for the timer. -Added new setters for both of the timer tasks. Micle 2022-06-05 13:41:10 +01:00
  • 697522ca7d Changed ProtectedPlayer's timers. -Removed lastInputTick field along with the getter and setter. -Changed timer name and added two TimerTask fields for the grace period and afk. -Changed the getter for the timer. -Added new setters for both of the timer tasks. Micle 2022-06-05 13:41:10 +01:00
  • 9f30820391 Changed packet names of existing packets. Registering two new packets to be made. Micle 2022-06-05 13:38:12 +01:00
  • 26bb8bfb3b Changed packet names of existing packets. Registering two new packets to be made. Micle 2022-06-05 13:38:12 +01:00
  • 42a0e6f240 Moved to new package for server to client packets. Renamed ServerPlayerStatePacket to PlayerStatePacket. Micle 2022-06-05 13:35:17 +01:00
  • e13e0c378e Moved to new package for server to client packets. Renamed ServerPlayerStatePacket to PlayerStatePacket. Micle 2022-06-05 13:35:17 +01:00
  • 452b772127 Moved to new package for client to server packets. Renamed ClientInputPacket to InputPacket. Micle 2022-06-05 13:34:51 +01:00
  • c3f62f182e Moved to new package for client to server packets. Renamed ClientInputPacket to InputPacket. Micle 2022-06-05 13:34:51 +01:00
  • ceff99c81c Additionally, checking if player is active and afk protection is enabled before setting player as afk. Micle 2022-05-24 02:19:35 +01:00
  • 7f608a5374 Additionally, checking if player is active and afk protection is enabled before setting player as afk. Micle 2022-05-24 02:19:35 +01:00
  • 1a10094c9f Fixed client not sending input packets when the key is not allowed. Micle 2022-05-24 02:17:51 +01:00
  • c03ef11d22 Fixed client not sending input packets when the key is not allowed. Micle 2022-05-24 02:17:51 +01:00
  • 3ad8b7b212 Created mixin config. Micle 2022-05-24 02:16:56 +01:00
  • 0e6334e06e Created mixin config. Micle 2022-05-24 02:16:56 +01:00
  • a204f7ac56 Created initial mixin for drawing the state text on screen. Micle 2022-05-24 02:16:35 +01:00
  • c194483b50 Created initial mixin for drawing the state text on screen. Micle 2022-05-24 02:16:35 +01:00
  • 962749cfae Added mixin support. Micle 2022-05-24 02:16:07 +01:00
  • 59b73e2cd6 Added mixin support. Micle 2022-05-24 02:16:07 +01:00
  • 4c74718880 Registering new player tick event handler. Micle 2022-05-24 00:30:59 +01:00
  • 95d83882bd Registering new player tick event handler. Micle 2022-05-24 00:30:59 +01:00
  • 52287f3f49 Created player tick event for setting player to afk. Micle 2022-05-24 00:30:45 +01:00
  • a609333f88 Created player tick event for setting player to afk. Micle 2022-05-24 00:30:45 +01:00
  • 1dc206fe91 Setting last input tick of a player when a player becomes active. Micle 2022-05-24 00:29:39 +01:00
  • fa0794bf13 Setting last input tick of a player when a player becomes active. Micle 2022-05-24 00:29:39 +01:00
  • 49ca0fe465 Added a field, getter and setter for the last tick a player inputted anything. Micle 2022-05-24 00:28:53 +01:00
  • 64a4c3331f Added a field, getter and setter for the last tick a player inputted anything. Micle 2022-05-24 00:28:53 +01:00
  • fa9cba99bb Lowered limit for the afk time threshold option as it needs to be converted into ticks later. Micle 2022-05-24 00:26:27 +01:00
  • 7402973efb Lowered limit for the afk time threshold option as it needs to be converted into ticks later. Micle 2022-05-24 00:26:27 +01:00
  • 0f1950b5cd Fixed damage event not cancelling when it should. Micle 2022-05-24 00:00:46 +01:00
  • 0aeb39fe7c Fixed damage event not cancelling when it should. Micle 2022-05-24 00:00:46 +01:00
  • acc48922b1 Fixed net and mod version patterns being incorrect. Micle 2022-05-24 00:00:14 +01:00
  • ef65fb7d9b Fixed net and mod version patterns being incorrect. Micle 2022-05-24 00:00:14 +01:00
  • 7de5416692 Sending player state to the client when added to protected players. Micle 2022-05-23 23:59:40 +01:00
  • 5d81f93a13 Sending player state to the client when added to protected players. Micle 2022-05-23 23:59:40 +01:00
  • 1976e54424 Updated to use new ProtectedPlayerManager and new config options. Micle 2022-05-22 03:18:34 +01:00
  • 93dd59d693 Updated to use new ProtectedPlayerManager and new config options. Micle 2022-05-22 03:18:34 +01:00
  • 084d2caa25 Removed event handler for player tick since grace period is done with timers now. Micle 2022-05-22 03:17:35 +01:00
  • 4195b7fbf4 Removed event handler for player tick since grace period is done with timers now. Micle 2022-05-22 03:17:35 +01:00
  • d6d8034311 Renamed and reworked the OnClientInputEventHandler to prevent pointless packets from being sent and for it to work with the afk allowed keys too. Micle 2022-05-22 03:16:58 +01:00
  • 213cc1604e Renamed and reworked the OnClientInputEventHandler to prevent pointless packets from being sent and for it to work with the afk allowed keys too. Micle 2022-05-22 03:16:58 +01:00
  • 8918f523d1 Registered new player state packet. Micle 2022-05-22 03:16:01 +01:00
  • d32f19c931 Registered new player state packet. Micle 2022-05-22 03:16:01 +01:00
  • 9093966c07 Created new packet for sending the player state to the client. Micle 2022-05-22 03:15:47 +01:00
  • d0f6f432de Created new packet for sending the player state to the client. Micle 2022-05-22 03:15:47 +01:00
  • b69fd80c5d Removing player from protected players if afk protection is disabled after applying effects and when the grace period runs out. Sending player state packet to player when it gets updated. Micle 2022-05-22 03:15:09 +01:00
  • cc987312ab Removing player from protected players if afk protection is disabled after applying effects and when the grace period runs out. Sending player state packet to player when it gets updated. Micle 2022-05-22 03:15:09 +01:00
  • fe1434478b Added player state field with getter and setter to the Client Proxy. Registering events. Micle 2022-05-22 03:13:38 +01:00
  • e88bdabd06 Added player state field with getter and setter to the Client Proxy. Registering events. Micle 2022-05-22 03:13:38 +01:00
  • 9c2a11d312 Removed old network channel. Micle 2022-05-21 21:17:19 +01:00
  • 0472b8ecc5 Removed old network channel. Micle 2022-05-21 21:17:19 +01:00
  • fd89f13a99 Registered the ClientInputPacket. Added method to get the channel. Micle 2022-05-21 21:16:57 +01:00
  • 83f5423b92 Registered the ClientInputPacket. Added method to get the channel. Micle 2022-05-21 21:16:57 +01:00
  • a9086486fa Renamed and reworked C2SKeyPress packet class. Micle 2022-05-21 21:16:11 +01:00
  • bdd67eae02 Renamed and reworked C2SKeyPress packet class. Micle 2022-05-21 21:16:11 +01:00
  • 1c260166f2 Removed Registration class. Micle 2022-05-21 21:15:20 +01:00
  • a74a3b1290 Removed Registration class. Micle 2022-05-21 21:15:20 +01:00
  • 0ba8806cd6 Removed old initialization of the protected player manager. Added methods for creating a resource location and getting the mod version. Micle 2022-05-21 20:59:44 +01:00
  • 779f5a132d Removed old initialization of the protected player manager. Added methods for creating a resource location and getting the mod version. Micle 2022-05-21 20:59:44 +01:00
  • 894a108c78 Initializing the protected player manager whenever a server is started. This should help prevent any unwanted remnants from another server to be present on other servers. Micle 2022-05-21 20:58:58 +01:00
  • e2bb99f280 Initializing the protected player manager whenever a server is started. This should help prevent any unwanted remnants from another server to be present on other servers. Micle 2022-05-21 20:58:58 +01:00
  • af189737dc Renamed and rewrote the manager for protected players. Most protected player logic should now be handled by the manager. Micle 2022-05-21 20:57:32 +01:00
  • babc73a8dc Renamed and rewrote the manager for protected players. Most protected player logic should now be handled by the manager. Micle 2022-05-21 20:57:32 +01:00
  • a20da22703 Rewrote the ProtectedPlayer class. Micle 2022-05-21 20:56:28 +01:00
  • c756ad9fa8 Rewrote the ProtectedPlayer class. Micle 2022-05-21 20:56:28 +01:00
  • 9bf6bd6dce Created a network manager for better implementation of network related content. Micle 2022-05-21 20:55:46 +01:00
  • 137b9cd670 Created a network manager for better implementation of network related content. Micle 2022-05-21 20:55:46 +01:00
  • d74dedc053 Created a new exception for mismatched mod versions. Micle 2022-05-21 20:55:38 +01:00
  • 79a298a4ef Created a new exception for mismatched mod versions. Micle 2022-05-21 20:55:38 +01:00
  • 038f1f631d Reduced the max value for the water, lava and fire duration options. Moved the KEYS enum. Micle 2022-05-21 20:52:19 +01:00
  • e0e75994ac Reduced the max value for the water, lava and fire duration options. Moved the KEYS enum. Micle 2022-05-21 20:52:19 +01:00
  • c93bd99099 Implemented a generic proxy for dealing with different logical sides. Micle 2022-05-21 20:04:09 +01:00
  • bbbee367c6 Implemented a generic proxy for dealing with different logical sides. Micle 2022-05-21 20:04:09 +01:00
  • 82b7fd9c68 Renamed POST_DROWN_ENABLED to POST_REFILL_AIR_ENABLED. Micle 2022-05-21 19:11:10 +01:00
  • f14040399e Renamed POST_DROWN_ENABLED to POST_REFILL_AIR_ENABLED. Micle 2022-05-21 19:11:10 +01:00
  • 4f5818ee2f Changed some definitions of config options and increased limit of some duration options. Micle 2022-05-21 19:10:13 +01:00
  • e1b5f638bb Changed some definitions of config options and increased limit of some duration options. Micle 2022-05-21 19:10:13 +01:00
  • 0c1e5f74f8 Renamed 'main' protection options to 'login'. Micle 2022-05-21 17:08:18 +01:00
  • 429459b96a Renamed 'main' protection options to 'login'. Micle 2022-05-21 17:08:18 +01:00
  • 4ed3487362 Added new config options for afk protection. Renamed 'main' protection options to 'login'. Micle 2022-05-21 17:07:43 +01:00
  • 020eac52b4 Added new config options for afk protection. Renamed 'main' protection options to 'login'. Micle 2022-05-21 17:07:43 +01:00
  • 5a0820dd14 Updated mods.toml to reflect version change. - Changed mod description. Micle 2022-05-21 16:45:51 +01:00
  • 10c9e8cbc0 Updated mods.toml to reflect version change. - Changed mod description. Micle 2022-05-21 16:45:51 +01:00
  • 6c2e9eb1b9 Started updating to v1.18.2-3.0.0. - Changed forge to v40.1.20. Micle 2022-05-21 13:05:14 +01:00
  • 889a0894d7 Started updating to v1.18.2-3.0.0. - Changed forge to v40.1.20. Micle 2022-05-21 13:05:14 +01:00