Commit Graph

49 Commits

Author SHA1 Message Date
YouHaveTrouble 1aeb245666 Refactor damage source checking and restructure player management
The source of damage detection for PvP interactions has been updated to improve accuracy and flexibility. A 'Target' sub-class has been implemented in the PlayerManager class, removing the need for a separate DamageCheck class. The PlayerManager class was also moved to the 'data' package. Distribution of feedback messages has been simplified using the new DamageCheckResult class.
2024-02-24 19:23:54 +01:00
YouHaveTrouble b9e2aefc40 Remove several game listeners and utility files
The commit includes the deletion of several listeners and utility files. These were mainly related to handling specific game events such as interactions with lava and fireworks, combat commands, and actions related to player pets and mounts. The removal is due to refactoring damage source check system
2024-02-14 20:22:07 +01:00
YouHaveTrouble 8df1fe54e4 Remove redundant SmartCache and refactor related classes
The SmartCache class has been removed, and logic within it has been moved to relevant classes to reduce redundancy. This involved utilizing the PlayerManager for player data, instead of invalidating a separate cache in the now-removed SmartCache. Other classes that interacted with SmartCache, such as API, listeners and PreventStabby, have been updated to use the newly refactored system.
2024-01-11 00:44:58 +01:00
YouHaveTrouble b414f96257 new shared logic to determine attacker and victim 2023-06-23 00:28:44 +02:00
YouHaveTrouble c11c455c53 use util for harmful effects list 2023-06-22 19:06:15 +02:00
YouHaveTrouble d859fd0aaa refactors, code style fixes, rpeventing events from firing when not needed 2023-06-22 18:41:16 +02:00
YouHaveTrouble 3919b0f44b use logger, use try with resources 2023-06-22 16:45:31 +02:00
YouHaveTrouble 4590b1d532 only fire PlayerEnterCombatEvent if there are registered listeners for it 2023-06-22 16:02:34 +02:00
YouHaveTrouble 8ae6e9212c actually check for empty string and not for null 2023-06-22 15:36:08 +02:00
YouHaveTrouble fba2f03aab don't send messages or action bars if the message content is empty 2023-06-22 15:28:41 +02:00
YouHaveTrouble 8fcf34e310 more fixes for #15 2023-05-20 12:06:16 +02:00
YouHaveTrouble aac1f99374 potential fix for #15 2023-05-20 00:09:02 +02:00
YouHaveTrouble 244ceb4dcc don't send the message if tempting was cancelled 2023-05-03 21:29:07 +02:00
YouHaveTrouble ac1cafe0d9 tempting horses should not cause player to enter combat 2023-05-03 21:26:38 +02:00
YouHaveTrouble b3ce1913fd add placeholder for forced pvp state 2023-05-03 19:18:02 +02:00
YouHaveTrouble 7d2c41646e make worldguard hook register on load 2023-03-26 03:09:07 +02:00
YouHaveTrouble 61908b8fab more api changes and javadocs 2022-12-31 17:09:20 +01:00
YouHaveTrouble 5abf99cd6c semi-major api changes, javadocs 2022-12-31 16:44:50 +01:00
YouHaveTrouble 3c014304ba implement PlayerTogglePvpEvent 2022-12-31 15:58:06 +01:00
YouHaveTrouble 7ada9eab29 permission for help command 2022-12-31 15:03:09 +01:00
YouHaveTrouble 78504ee097 command without arguments now acts as toggle subcommand 2022-12-31 14:43:44 +01:00
YouHaveTrouble 7da6ff0ac9 placeholder for pvp state and offline player fallbacks to not cause sync db calls 2022-12-31 13:46:01 +01:00
YouHaveTrouble 93efa37e77 flip the conditional 2022-08-07 11:59:22 +02:00
YouHaveTrouble 2ee577a08c setting to allow players being pulled with fishing rods while having pvp off 2022-07-19 17:35:04 +02:00
YouHaveTrouble e5b566db67 fix javadoc 2022-06-17 22:56:31 +02:00
YouHaveTrouble 9b18c435f6 implement pvp state override command and api 2022-06-17 21:12:55 +02:00
YouHaveTrouble b99c14b631 going on an adventure 2022-06-16 23:52:30 +02:00
YouHaveTrouble 6fd3e4b671 use enum for permissions 2022-05-14 12:28:50 +02:00
YouHaveTrouble 5a36ba7748 use internal method for message sending, replace some try/catch with null checks 2022-05-14 11:53:31 +02:00
YouHaveTrouble 4088a6dd5b fix npe when new pet target is null 2022-05-02 22:57:20 +02:00
YouHaveTrouble a8e606dab5 fix a few bugs 2022-04-15 17:31:26 +02:00
YouHaveTrouble 35f0e6c9d8 add basic true/false placeholder for combat 2022-04-04 17:41:00 +02:00
YouHaveTrouble 51f0f6c93b add placeholderapi hook 2022-03-22 23:02:58 +01:00
YouHaveTrouble 52fb010270 return earlier if player has bypass permission 2022-03-17 21:00:41 +01:00
YouHaveTrouble cd26d621e5 allow damaging mounts with non-player riders 2022-03-17 20:58:39 +01:00
YouHaveTrouble 4c08041ee6 better names for methods 2022-03-17 20:58:12 +01:00
YouHaveTrouble 643511df31 make sure damager is projectile in projectile event 2022-03-17 20:58:03 +01:00
YouHaveTrouble 9a9a44939a prepare for finishing rebranding 2022-01-26 14:41:12 +01:00
YouHaveTrouble 1e7adf398a fix worldguard hook errors 2021-09-18 01:40:11 +02:00
YouHaveTrouble c0ca85c44d add isHooked() back 2021-09-18 00:23:41 +02:00
YouHaveTrouble a86485a089 fix issues with servers not having worldguard 2021-09-18 00:21:19 +02:00
YouHaveTrouble bea0d9c7df make sure mount has player rider before checking for attack cancel 2021-09-17 15:28:34 +02:00
YouHaveTrouble 0eccf1b1af fix unable to attack mounts with no player on them 2021-09-17 15:26:40 +02:00
YouHaveTrouble 2669c538cd remove debug 2 electric boogaloo 2021-08-03 17:45:30 +02:00
YouHaveTrouble 36861084cc remove debug 2021-08-03 17:31:35 +02:00
YouHaveTrouble f182c2c859 add worldguard flag for force pvp 2021-08-03 17:24:17 +02:00
YouHaveTrouble 6de41b68bd yeat it kinda fixes the whole thing 2021-07-29 13:34:55 +02:00
YouHaveTrouble ee12750cf1 rename api 2021-07-28 20:14:54 +02:00
YouHaveTrouble da454823f4 massive changes 2021-07-28 20:10:15 +02:00