Commit Graph

157 Commits

Author SHA1 Message Date
YouHaveTrouble ee3526c55d bump version 2.0.0-pre-5 2024-07-04 21:43:34 +02:00
YouHaveTrouble 2189616a9e fix dangerous block blocker not having list of dangerous blocks 2024-07-04 21:43:19 +02:00
YouHaveTrouble 1484d262c0 tell paper to not remap 2.0.0-pre-4 2024-06-26 18:24:55 +02:00
YouHaveTrouble 4976ff56f0 check base potion type for nulls 2024-06-26 18:22:15 +02:00
YouHaveTrouble 477f042e91 update depends to java 21 and minecraft 1.21 2024-06-26 18:21:54 +02:00
YouHaveTrouble 409d115337 stop specified commands from being able to execute in combat 2024-05-12 14:17:59 +02:00
YouHaveTrouble 6c022dd88e bump version 2024-04-18 17:14:42 +02:00
YouHaveTrouble 01b6cd309c Decrease event handling priority in EnvironmentalListener 2024-04-18 17:12:46 +02:00
YouHaveTrouble 7253eab958 Lower event handler priority in PvpListener 2024-04-18 17:11:33 +02:00
YouHaveTrouble 645068f66c bump version 2.0.0-pre-2 2024-04-18 15:17:59 +02:00
YouHaveTrouble 27a68339ed Add null checks for playerData in PlayerListener
Added null checks for playerData in the methods onPlayerQuit, onPlayerTeleport and onPlayerDeath of the PlayerListener class. This addresses potential issues where plugins are using players as entities, which can sometimes cause playerData to be null.
2024-04-18 15:16:14 +02:00
YouHaveTrouble 42f8f92a6a added -pre suffix to the plugin version to indicate it's not yet production ready 2.0.0-pre-1 2024-04-16 17:41:48 +02:00
YouHaveTrouble d3e8b590cb folia scheduling part MXIV 2024-04-16 17:24:10 +02:00
YouHaveTrouble 88917d65c3 actually save changes to sqlite lol 2024-04-16 17:23:51 +02: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 c369c110e5 possible workaround for folia compatibility 2024-04-16 16:29:26 +02:00
YouHaveTrouble 375ef3de4e Update worldguard-bukkit dependency version
The version of the "worldguard-bukkit" dependency in the pom.xml has been updated from 7.0.4-SNAPSHOT to 7.0.9-SNAPSHOT. This upgrade ensures the project is using the latest and possibly more stable or feature-rich version of the dependency.
2024-04-07 16:29:38 +02:00
YouHaveTrouble 292b7b1b77 Add block stopper to PreventStabby configuration and listeners
A block stopper feature has been added to the PreventStabby plugin. This prevents the placement of dangerous blocks near players with PvP turned off. The functionality has been integrated into the ConfigCache configuration class and EnvironmentalListener. This fine-tunes environmental controls in PvP gameplay scenarios, improving the player's safety and the overall game experience.
2024-03-04 20:56:31 +01:00
YouHaveTrouble 47ade3e0c0 Refactor PreventStabby plugin to enhance PvP and environment controls
Reconfiguration of the PreventStabby plugin involved removal of PlayerDamageListener and the introduction of two new listeners: EnvironmentalListener and PvpListener. This restructuring allows more efficient management of entity damage and environmental interactions. EnvironmentalListener specifically caters for dangerous situations such as bucket spills and block fires. PvpListener effectively manages PvP related activities including damages, splash potion effects, cloud area effects, and fishing events ensuring a more streamlined control and response for better PvP gameplay.
2024-03-04 18:24:22 +01: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 096599081b Improve exception handling and PvP process in DatabaseSQLite and PlayerManager
Refactored exception handling in DatabaseSQLite to use logger instead of printStackTrace() for better error tracking. Streamlined player PvP process in PlayerManager with clear conditions and appropriate responses. Enhancements in other classes were also made to ensure smooth execution and maintain code standards.
2024-03-02 16:57:32 +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 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 0290629d27 relocate into me.youhavetrouble.preventstabby to avoid conflicts 2023-06-22 16:20:39 +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 v1.11.0 2023-06-22 15:36:08 +02:00
YouHaveTrouble fec1dd2ab6 bump version 2023-06-22 15:32:09 +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 e30437694c bump version v1.10.2 2023-05-23 00:09:14 +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 7f1da79444 bump version v1.10.1 2023-05-03 21:49:15 +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 v1.10.0 2023-05-03 19:18:02 +02:00
YouHaveTrouble 9a707b34a3 bump version v1.9.0 2023-03-26 03:17:46 +02:00
YouHaveTrouble d52648b4ff Merge pull request #13 from YouHaveTrouble/api-changes
Api changes + worldguard flag fix for 1.19.4
2023-03-26 03:15:42 +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 v1.9.0-pre1 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