Commit Graph

38 Commits

Author SHA1 Message Date
7f608a5374 Additionally, checking if player is active and afk protection is enabled before setting player as afk. 2022-05-24 02:19:35 +01:00
c03ef11d22 Fixed client not sending input packets when the key is not allowed. 2022-05-24 02:17:51 +01:00
0e6334e06e Created mixin config. 2022-05-24 02:16:56 +01:00
c194483b50 Created initial mixin for drawing the state text on screen. 2022-05-24 02:16:35 +01:00
95d83882bd Registering new player tick event handler. 2022-05-24 00:30:59 +01:00
a609333f88 Created player tick event for setting player to afk. 2022-05-24 00:30:45 +01:00
fa0794bf13 Setting last input tick of a player when a player becomes active. 2022-05-24 00:29:39 +01:00
64a4c3331f Added a field, getter and setter for the last tick a player inputted anything. 2022-05-24 00:28:53 +01:00
7402973efb Lowered limit for the afk time threshold option as it needs to be converted into ticks later. 2022-05-24 00:26:27 +01:00
0aeb39fe7c Fixed damage event not cancelling when it should. 2022-05-24 00:00:46 +01:00
ef65fb7d9b Fixed net and mod version patterns being incorrect. 2022-05-24 00:00:14 +01:00
5d81f93a13 Sending player state to the client when added to protected players. 2022-05-23 23:59:40 +01:00
93dd59d693 Updated to use new ProtectedPlayerManager and new config options. 2022-05-22 03:18:34 +01:00
4195b7fbf4 Removed event handler for player tick since grace period is done with timers now. 2022-05-22 03:17:35 +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. 2022-05-22 03:16:58 +01:00
d32f19c931 Registered new player state packet. 2022-05-22 03:16:01 +01:00
d0f6f432de Created new packet for sending the player state to the client. 2022-05-22 03:15:47 +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. 2022-05-22 03:15:09 +01:00
e88bdabd06 Added player state field with getter and setter to the Client Proxy. Registering events. 2022-05-22 03:13:38 +01:00
0472b8ecc5 Removed old network channel. 2022-05-21 21:17:19 +01:00
83f5423b92 Registered the ClientInputPacket. Added method to get the channel. 2022-05-21 21:16:57 +01:00
bdd67eae02 Renamed and reworked C2SKeyPress packet class. 2022-05-21 21:16:11 +01:00
a74a3b1290 Removed Registration class. 2022-05-21 21:15:20 +01:00
779f5a132d Removed old initialization of the protected player manager. Added methods for creating a resource location and getting the mod version. 2022-05-21 20:59:44 +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. 2022-05-21 20:58:58 +01:00
babc73a8dc Renamed and rewrote the manager for protected players. Most protected player logic should now be handled by the manager. 2022-05-21 20:57:32 +01:00
c756ad9fa8 Rewrote the ProtectedPlayer class. 2022-05-21 20:56:28 +01:00
137b9cd670 Created a network manager for better implementation of network related content. 2022-05-21 20:55:46 +01:00
79a298a4ef Created a new exception for mismatched mod versions. 2022-05-21 20:55:38 +01:00
e0e75994ac Reduced the max value for the water, lava and fire duration options. Moved the KEYS enum. 2022-05-21 20:52:19 +01:00
bbbee367c6 Implemented a generic proxy for dealing with different logical sides. 2022-05-21 20:04:09 +01:00
f14040399e Renamed POST_DROWN_ENABLED to POST_REFILL_AIR_ENABLED. 2022-05-21 19:11:10 +01:00
e1b5f638bb Changed some definitions of config options and increased limit of some duration options. 2022-05-21 19:10:13 +01:00
429459b96a Renamed 'main' protection options to 'login'. 2022-05-21 17:08:18 +01:00
020eac52b4 Added new config options for afk protection. Renamed 'main' protection options to 'login'. 2022-05-21 17:07:43 +01:00
10c9e8cbc0 Updated mods.toml to reflect version change.
- Changed mod description.
2022-05-21 16:45:51 +01:00
253696a3d9 Ported 1.17.1-2.1.1 to 1.18.1. 2022-01-19 16:47:55 +00:00
d6c7a9bc4b Initial commit. 2022-01-19 16:36:39 +00:00