[1.8 - 1.21] FarmingZone icon

[1.8 - 1.21] FarmingZone -----

Farm, Zone




Hello, virtual farmers! The FarmingZone version 1.6 update introduces a highly requested feature: the ability to visit other players' farms! This update also includes bug fixes, fully configurable messages, and improvements for a smoother experience. Here’s the full rundown:

New Features
  • Command /farm visit [player|open|close]:
    • Visit a Farm: Use /farm visit [player] to teleport to another player's farm home point, if visits are enabled.

    • Manage Visits: Farm owners can enable or disable visits with /farm visit open or /farm visit close.

    • Added a GUI item (slot 13, LIME_DYE for open, GRAY_DYE for closed) to toggle visit permissions easily.

    • Visual and sound effects (PORTAL and END_ROD particles, ENTITY_ENDERMAN_TELEPORT sound) for an immersive teleportation experience.

    • Permission farmv1.visit added (default: true for all players).
  • Fully Configurable Messages:
    • All messages sent via player.sendMessage are now configurable in settings.yml, including:
      • Error message for farm deletion (error_deleting_farm).

      • Notification for being removed from a farm (removed_from_farm).

      • Farm creation cancellation (farm_creation_cancelled).

      • Manual harvesting in FarmListener (manual_harvest).
    • New messages for /farm visit added to settings.yml:
      • usage_visit, no_farm_target, no_home_set_target, teleported_to_farm, visit_opened, visit_closed, visits_closed, help_visit.
Bug Fixes
  • Fixed playerId Error:
    • Resolved an issue in FarmGUIListener.java where playerId was used without being defined. Replaced with player.getUniqueId() in the case 13 block for visit toggling in the GUI.
  • Fixed zoneItem Error:
    • Corrected an error in FarmCommand.java where zoneItem.setItemMeta(zoneItem) caused a type mismatch. Fixed by using zoneItem.setItemMeta(zoneMeta) for the /farm zone item.
  • Removed Hardcoded Messages:
    • All previously hardcoded messages in FarmManager.java, ChatListener.java, and FarmListener.java have been moved to settings.yml for full customization.
  • Fixed help_delete Description:
    • Corrected a typo in settings.yml where help_delete contained incorrect text ("Brasilee0 coins back"). Updated to the correct message.
Improvements
  • Database:
    • Added the visit_open column (BOOLEAN, default TRUE) to the farms table to persist visit permissions (open/closed).

    • Updated saveFarm and loadFarms methods to handle visit_open.
  • Enhanced GUI:
    • Added an interactive item in the GUI (slot 13) to toggle visit permissions, dynamically switching between LIME_DYE (open) and GRAY_DYE (closed).
  • Permissions:
    • Added the farmv1.visit permission in plugin.yml to control access to the /farm visit command. Set to default: true for universal access.
  • Configurability:
    • All messages are now loaded from settings.yml, allowing server administrators to customize text and colors easily.
Update Instructions
  1. Backup:
    • Back up your settings.yml and database (farms.db for SQLite or your MySQL/MariaDB database) before updating.
  2. Update Files:
    • Replace the plugin JAR in the plugins folder with the new version.

    • Update settings.yml with the new messages (see provided file or manually add keys like usage_visit, no_farm_target, etc.).

    • Update plugin.yml to include the farmv1.visit permission.
  3. Restart Server:
    • Use /stop to restart the server and load the new configuration.

    • Check latest.log to ensure the database and messages load without errors.
  4. Test New Features:
    • Create a farm with /farm create test.

    • Test /farm visit [player] to visit a farm (ensure visits are enabled).

    • Use /farm visit open or /farm visit close to manage farm access.

    • Open the GUI with /farm gui and verify the visit toggle item (slot 13).

    • Confirm that customized messages in settings.yml display correctly.
Notes
  • Compatibility: This version is compatible with Minecraft 1.21 and requires Vault for economy features.

  • Customization: Edit settings.yml to tailor messages and colors to your server’s style.

  • Known Issues:
    • Ensure farm chunks are loaded before using /farm visit to avoid teleportation errors.

    • For MySQL/MariaDB users, verify connection details in mysql.yml.
Acknowledgments
A huge thank you to the community for your feedback and suggestions! The farm visit feature was inspired by your requests. Please report any bugs or share new ideas on the Spigot forum or in the plugin’s discussion section.

Happy farming!
----------, Aug 5, 2025

New Features:

  • Fully Configurable Messages: All player.sendMessage content is now configurable in the messages section of settings.yml. Customize texts and color codes (e.g., &a for green, &c for red) to your liking.
  • Border Display Option: Added the ability to choose between particles or blocks (configurable via zone_display_block) to outline farms with the /farm zone [particles|blocks] command. Blocks are now placed along edges to form a visible 3D cube.
  • Original Block Restoration: When using /farm zone blocks, original blocks are now restored after the display duration (zone_display_duration), preventing holes left by the wool.
Bug Fixes:

  • Fixed Message Colors for enter_farm and leave_farm: Removed hardcoded ChatColor overrides in FarmListener, allowing full color customization via settings.yml (default: green for enter, red for leave).
  • formatMessage Compilation Error: Resolved the "method formatMessage(@org.jetbrains.annotations.NotNull java.lang.String) is already defined" error in FarmManager by removing the redundant declaration.
  • Block Display for /farm zone blocks: Fixed an issue where wool blocks (e.g., RED_WOOL) did not display a 3D cube by enhancing placement along all edges.
Improvements:

  • Removed Command Cooldown: The command cooldown (configurable via commandCooldown) has been disabled, allowing instant use of all commands like /farm create or /farm zone.
Notes:

  • Back up your settings.yml file before updating, as new message keys have been added.
  • Reload the configuration with /farm admin reload after modifying settings.yml.
----------, Jul 29, 2025

Bug Fixes
  • Fixed ArrayIndexOutOfBoundsException in GUI:
    • Resolved an exception (Index 9 out of bounds for length 9) in FarmCommand.openFarmGUI by increasing the inventory size from 9 to 18 slots, allowing the "Reload Config" item (for admins) to display without crashing the /farm command.
  • Fixed joinItem Reference Error:
    • Resolved a red underline on joinItem in FarmCommand.openFarmGUI by reorganizing the order of item declarations, placing "Quit Farm" at index 7 and "Join Farm" at index 8.
  • Fixed Private Access to connection:
    • Resolved the "connection has private access" error in Main by adding a public closeConnection method in FarmManager, ensuring proper encapsulation and database connection management.
  • Fixed farmManager Access Error in ActionHistory:
    • Corrected an issue where farmManager was inaccessible in the static ActionHistory class of FarmListener by making it non-static, enabling proper access to methods like getMaxXPPerPeriod.
  • Fixed setupEconomy Red Underline:
    • Resolved the red underline on setupEconomy in FarmManager by confirming the Vault dependency and adding logs to report economy initialization issues.
  • Fixed Access to Private Methods in FarmListener:
    • Resolved red underlines on farmNames, getOwnerFromLocation, and formatMessage in FarmListener by adding corresponding public methods (getFarmName, getOwnerFromLocation, formatMessage) in FarmManager.
Improvements
  • Enhanced Stability:
    • Added additional checks in database management methods (setupDatabase, saveFarm, loadFarms) to prevent unhandled exceptions.
----------, Jul 24, 2025

New Features
  • Interactive GUI for /farm:
    • Added a graphical user interface accessible with /farm or /farm gui, featuring clickable items for all commands (buy, status, delete, zone, help) and an admin-only reload option, improving user experience and accessibility.
Improvements
  • XP Messages in Action Bar:
    • Moved XP gain notifications ("Gained X XP! Total: X") to the action bar to avoid flooding the chat, providing a cleaner gameplay experience.
  • Separated Configuration Files:
    • Moved block, crop, and monster XP configurations into separate blocks.yml, crops.yml, and mobs.yml files, improving manageability while retaining database settings in config.yml. All blocks, crops (wheat, carrots, potatoes, beetroots, nether wart), and monsters (blaze, creeper, skeleton, etc.) are now fully configurable with default XP values (5 XP for blocks, 1-5 XP for crops, 5-50 XP for monsters).
Bug Fixes
  • No new bugs reported since the last update. Existing fixes from v1.2 remain effective.
Anti-Abuse Protections
  • No changes to the anti-abuse system in this update. The existing ultimate anti-abuse mechanism (30-minute history, weighted abuse scoring, automation detection, and 200 XP limit) continues to protect against exploits.
Customization
  • Modify values in blocks.yml, crops.yml, and mobs.yml to adjust XP rewards for specific blocks, crops, and monsters.
  • Adjust the inactivity threshold (5 seconds) or XP limits (MAX_XP_PER_PERIOD, MAX_ACTIONS_PER_LOCATION) in the code if needed.
  • Customize GUI item names and lore in FarmCommand.java (e.g., change Material.DIRT to Material.STONE for /farm buy).
----------, Jul 24, 2025

New Features
  • Admin Command /farm admin reload:
    • Added a new admin-only command (requires farmv1.admin.reload permission) to reload the configuration (config.yml) without restarting the server, enabling real-time adjustments.
  • Full French Localization:
    • All in-game messages have been translated into French for a fully immersive and consistent experience.
Improvements
  • Expanded Configuration System:
    • XP is now individually configurable for each block type, crop (wheat, carrots, potatoes, beetroots, nether wart), and monster (zombie, skeleton, creeper, spider), with default values (5 XP for blocks, 1-5 XP for crops, 10 XP for monsters).
  • Support for Native Minecraft Crops:
    • Replaced custom crops (moonflower, magicwheat) with native crops (wheat, carrots, potatoes, beetroots, nether wart), featuring growth and manual harvesting based on vanilla mechanics.
  • Performance Optimization:
    • Reduced CPU load for the /farm zone command with optimized particle sampling (every 5 ticks, 5-second duration).
Bug Fixes
  • Fixed getMaximumAge Error:
    • Resolved a compilation error with getMaximumAge() in the manual harvesting logic, ensuring proper handling of mature crops.
  • Syntax Correction:
    • Fixed a syntax issue in the canInteract method where location.getY <= farm.getMaxY() was incorrectly written, now corrected to location.getY() <= farm.getMaxY().
  • Initialization Fix:
    • Resolved a NullPointerException during configuration loading by adding a check for EntityType.getEntityClass().
Anti-Abuse Protections
  • Initial Anti-Abuse System:
    • Added a 5-second cooldown to prevent infinite XP accumulation by repeatedly placing and breaking the same block.
  • Enhanced Anti-Abuse Logic:
    • Removed the fixed cooldown, replaced with contextual detection of place/break/place cycles, using a 1-minute history to identify abusive patterns.
  • Comprehensive Exploit Protection:
    • Implemented an advanced system analyzing action sequences over 30 minutes, blocking XP during detected cycles, with a 100 XP per 15-minute limit as a safety net.
  • Ultimate Anti-Abuse System:
    • Introduced an extremely powerful mechanism with a 30-minute action history, weighted abuse scoring (detecting place/break/place cycles and high action density), automated activity detection (5 seconds of inactivity), and a 200 XP limit over 30 minutes. This blocks all exploits, including redstone and piston-based farms, while preserving legitimate gameplay.
Removed Features
  • Removed /farm levelup Command:
    • Replaced with an automatic leveling system based on accumulated XP.
----------, Jul 24, 2025

New Features
  • Automated Leveling System:
    • Levels now increase automatically when you reach the required XP, eliminating the need for the /farm levelup command.
    • Earn XP by breaking/placing blocks (5 XP), harvesting crops manually (1 XP), or killing monsters in your farm (10 XP).
    • Each level increases your farm's size by 5 blocks (on X and Z axes).
  • Manual Crop Harvesting:
    • Removed automatic crop harvesting. Players must now manually break mature crops to collect them, earning 1 XP and the crop's value in currency.
    • Crops continue to grow automatically based on light, water, and time conditions (e.g., wheat grows with a 30% chance, poppies at night).
Improvements
  • Zone Visualization Enhanced:
    • Restored particle effects for all farm borders (top, bottom, and sides) with optimized sampling (every 2 blocks horizontally, every 20 blocks vertically).
    • Added continuous particle lines at the four corners from bedrock (Y=0) to the sky limit (Y=319) with a 10-block sampling interval.
  • Performance Optimization:
    • Reduced CPU load for the /farm zone command by limiting particle spawning to every 5 ticks and shortening the display duration to 5 seconds.
Bug Fixes
  • Fixed getMaximumAge Error:
    • Corrected a compilation error with getMaximumAge() in the manual harvesting logic, ensuring proper handling of mature crops.
    • Added proper resetting of crop age after manual harvest to maintain growth cycles.
  • Syntax Correction:
    • Fixed a syntax issue in the canInteract method where location.getY <= farm.getMaxY() was incorrectly written, now corrected to location.getY() <= farm.getMaxY().
Removed Features
  • Removed /farm levelup Command:
    • The manual level-up command has been replaced by automatic leveling based on XP accumulation.
Known Issues
  • None reported at this time. Please report any bugs or suggestions on the Spigot page!
How to Update
  1. Download the latest version (v1.1) from the Spigot page.
  2. Replace the old farmV1.jar in your plugins/ folder with the new one.
  3. Restart your server to apply the changes.
  4. Existing farms and player data will be preserved thanks to the database system.
----------, Jul 20, 2025

Resource Information
Author:
----------
Total Downloads: 234
First Release: Jul 20, 2025
Last Update: Aug 5, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings