Commit Graph

11 Commits

Author SHA1 Message Date
YouHaveTrouble 219a0da639 Add 'folia-supported' flag to plugin.yml
A 'folia-supported' flag is added to the plugin.yml file of the YardWatch project. This flag will provide compatibility with any Folia-powered systems, improving the plugin's functionality and coverage.
2024-03-22 11:17:59 +01:00
YouHaveTrouble 103f36f9a1 Update readme.md with requirements section
Added a new section, "Requirements", to the readme.md file of the YardWatch project, outlining the technical specifications necessary for the source code to work properly. These requirements include Java 17 and a version of Minecraft 1.16 or higher.
2024-03-22 10:53:11 +01:00
YouHaveTrouble d1fe8126be Add readme.md for YardWatch project 2024-03-22 00:40:19 +01:00
YouHaveTrouble a2d5699771 Improve plugin registration logic in YardWatch
Refactored the plugin enablement checks in `YardWatch.java` to use a new method `shouldRegisterService`. This method determines if a plugin is enabled and if it provides an implementation for the Protection service, therefore enhancing plugin setup accuracy.
2024-03-21 23:56:27 +01:00
YouHaveTrouble 00a81efef8 Replace hardcoded UUID in GriefPreventionProtection
Introduced a class variable `dummyId` to replace the previously hardcoded UUID in the `isProtected` method of the GriefPreventionProtection class. This change improves code maintainability and readability.
2024-03-21 23:33:19 +01:00
YouHaveTrouble 4cee3b35b3 Modify permission check in GriefPreventionProtection
Refactored the permission checks in GriefPreventionProtection.java to use the Inventory permission rather than the Access permission. This change is in the methods canInteract and canDamage, and as a result enhances their functionalities under GriefPrevention's claim-based protection system.
2024-03-21 23:32:13 +01:00
YouHaveTrouble 7405f15510 Add support for GriefPrevention Protection
Refactored the YardWatch.java file to check if the GriefPrevention plugin is enabled. If enabled, GriefPrevention Protection is registered. Additionally, a new class GriefPreventionProtection.java was added which checks if a location is protected, if a player can break/place a block, interact with a block or entity, or damage an entity based on GriefPrevention's claims. Moreover, added a new dependency for GriefPrevention in pom.xml.
2024-03-21 23:25:48 +01:00
YouHaveTrouble 137ef21410 Update plugin and dependencies versions
Updated the api-version in plugin.yml from '1.13' to '1.16', and the paper-api version in pom.xml from '1.13-R0.1-SNAPSHOT' to '1.16.5-R0.1-SNAPSHOT'.
2024-03-21 23:25:28 +01:00
YouHaveTrouble ad820a1ab9 Refactor plugin.yml and pom.xml to use Maven variables
The plugin.yml and pom.xml files were refactored to utilize Maven variables for elements including project name, version, description, and URL. This simplifies the process of updating these values, as they now only need to be modified in one location. This change enhances maintainability and code readability.
2024-03-21 22:19:09 +01:00
YouHaveTrouble 9418025b81 Upgrade Java version and refactor WorldGuardProtection class
The Java version in pom.xml has been updated from 1.8 to 17. Also, the WorldGuardProtection.java class has been refactored for cleaner code. Specifically, a condition check and player definition are now combined into a single line to improve readability and efficiency.
2024-03-21 22:06:51 +01:00
YouHaveTrouble e516cf2ec6 Add YardWatch plugin with WorldGuard integration
Introduced a new plugin, YardWatch, implemented with WorldGuard for protection. The plugin checks if WorldGuard is enabled and regulates breaking blocks, placing blocks, and interactions based on WorldGuard's build and interact flags. Also included are updated .gitignore and pom.xml files to manage the project setup.
2024-03-21 21:52:44 +01:00