Commit Graph

24 Commits

Author SHA1 Message Date
YouHaveTrouble c6f0df5d50 account for more edge cases and improve checknig for protected entities 2024-11-01 12:37:06 +01:00
YouHaveTrouble 6a5e5f8d44 fix worldguard hook failing to initialize 2024-10-28 19:52:35 +01:00
YouHaveTrouble 4096cfe152 more folia support shenanigans 2024-04-16 16:46:52 +02:00
YouHaveTrouble 7f74826e2c Add return statement after plugin disablement
Added a return statement after the plugin disablement step in the PreventStabby main class. This ensures that the execution of the function is explicitly stopped if there are any issues with command registration.
2024-04-16 16:29:43 +02:00
YouHaveTrouble 7d8d27b1ef Replace PlayerDamageListener with EnvironmentalListener and PvpListener
Removed PlayerDamageListener and introduced two new listeners, EnvironmentalListener and PvpListener to manage entity damage. EnvironmentalListener prevents dangerous bucket dumps and block ignitions. PvpListener handles entity damages, potion splash events, area effect cloud applications and fishing events, all with distinct conditions and responses for better PvP management.
2024-03-03 14:52:49 +01:00
YouHaveTrouble 7b155d0b3e Add UtilListener to track player interactions with entities
The UtilListener class has been added to the project. It provides various event handlers which tag entities (such as ExplosiveMinecart, TNTPrimed, EnderCrystal) with the UUID of the player who either placed, nudged, primed or hit the entity. Changes have also been made to the Target class, adding methods for getting and assigning a player source ID for entities.
2024-03-02 00:40:35 +01:00
YouHaveTrouble 58a4a9f25d combat tracking is working again! 2024-02-28 20:09:56 +01:00
YouHaveTrouble 3c7904786e Implement SQL database and refactor onEnable method
In this commit, an SQLite database is set up in the onEnable method of the PreventStabby class, which will be used to store plugin data. To facilitate this, java.io.File is being imported. By doing this, we ensure that the database file exists and is connected to as soon as the plugin is enabled.
2024-02-24 19:36:55 +01:00
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 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 7d2c41646e make worldguard hook register on load 2023-03-26 03:09:07 +02:00
YouHaveTrouble b99c14b631 going on an adventure 2022-06-16 23:52:30 +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 51f0f6c93b add placeholderapi hook 2022-03-22 23:02:58 +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 0eccf1b1af fix unable to attack mounts with no player on them 2021-09-17 15:26:40 +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 da454823f4 massive changes 2021-07-28 20:10:15 +02:00