Goated Factions icon

Goated Factions -----

GoatedFactions: Pure Factions Gameplay




# GFactions Plugin Changelog

**Version:** (e.g., v1.2.1 / Internal Update)
**Date:** May 18, 2025

This update introduces new controls for claiming land in different dimensions and includes several enhancements for stability and functionality.

---

## ✨ New Features

### 1. Dimension-Specific Claiming Control
- **Nether Claiming:** Added a configuration option (`claiming.allow_nether_claiming`) to enable or disable faction land claiming in The Nether.
- Default: `false` (Disabled)
- **End Claiming:** Added a configuration option (`claiming.allow_end_claiming`) to enable or disable faction land claiming in The End.
- Default: `false` (Disabled)
- **Implementation:**
- Checks are now performed in `GFactionsPlugin.createFactionAndReturn()` when a faction is first created (for the initial home claim).
- Checks are also performed in `GFactionsPlugin.claimChunk()` for all subsequent land claims, including those for outpost creation.
- Players will receive an informative message if they attempt to claim land in a dimension where claiming is disabled.

---

## ️ Improvements & Bug Fixes

### Core Plugin (`GFactionsPlugin.java`)
- **Configuration Handling:**
- Successfully loads the new `allow_nether_claiming` and `allow_end_claiming` settings from `config.yml`.
- **Claiming & Faction Creation Logic:**
- Centralized dimension claiming rule enforcement within core plugin methods.
- Improved the system for identifying the relevant player to receive feedback messages during claim operations.
- Added a clear success message to the `claimChunk` operation.
- Enhanced `unclaimChunkPlayer` to provide feedback on both success and failure.
- Integrated a spawn protection check directly into `createFactionAndReturn` for the faction's initial claim.
- **Ally System:**
- Players attempting to send an ally request via `sendAllyRequest` will now receive feedback if a request is already pending to or from the target faction.
- **Data Loading (`loadFactionsData()`):**
- Made `ownerUUID` parsing more robust with improved error logging for invalid UUIDs.
- Enhanced handling of faction home locations (`homeLocation`): if a home location's world is not loaded on startup, a warning is logged, and the home may need to be reset.
- Ensured that all claims specifically associated with an `Outpost` are correctly registered in the faction's global claim list and the plugin-wide `claimedChunks` map during the data loading process.
- Standardized `enemyDeclareTimestamps` keys to be loaded in lowercase to prevent case-sensitivity issues.
- Added checks for `null` item stacks within faction vaults during loading and will log a warning for any invalid items found.
- **Data Saving (`saveFactionsData()`):**
- Improved the saving mechanism for `homeLocation` to be more cautious if the world associated with the location is null (a warning will be logged).
- Standardized `enemyDeclareTimestamps` keys to be saved in lowercase.
- The `pendingMemberInvites` and `pendingAllyRequests` sections in `factions.yml` will now only be written if they actually contain pending invites/requests, leading to a cleaner data file.
- **Utility Methods & Stability:**
- Added necessary null checks to `getFactionOwningChunk(Chunk chunk)` to prevent errors if the chunk or its world is unexpectedly null.
- Introduced a new helper method: `getFactionOwningChunkAsFaction(Chunk chunk)`.
- Implemented various minor logging improvements and additional null checks throughout the plugin to enhance overall stability and aid in troubleshooting.
- Removed several unused import statements from the class.

---

## ⚙️ Configuration Changes (`config.yml`)

The following settings were added to the `claiming:` section of the `config.yml` file:

```yaml
claiming:
# ... other claiming settings ...
allow_nether_claiming: false # Set to true to allow claiming in The Nether
allow_end_claiming: false # Set to true to allow claiming in The End
File Modifications Summary
  • Config.txt (representing config.yml):
    • Updated to include the new allow_nether_claiming and allow_end_claiming options.
  • GFactionsPlugin.java:
    • Implemented the core logic for dimension-specific claiming.
----------, May 18, 2025

## GFactions Plugin Changelog

**Version 1.2.0**

**Date:** May 17, 2025

This changelog outlines the significant features, improvements, and bug fixes implemented for the GFactions plugin, reflecting the evolution from earlier designs to a more robust system.

### ✨ New Core Systems

* **Faction Home & Territory System (Formerly Spawnblock):**
* Factions now establish a central "Home Point" which is automatically set and its chunk claimed upon faction creation (`/f create`). This initial claim is free of power cost.
* Claiming new land (`/f claim`) requires adjacency to the faction's main home territory or one of its outpost territories. Connectivity to a spawn point (home or outpost) is crucial for maintaining territory integrity.
* If the chunk containing the faction's main home is lost (e.g., overclaimed), the home automatically attempts to relocate to another valid, claimed chunk within the faction's main territory. If no suitable main territory chunk exists, it may convert an outpost or, as a last resort, leave the faction without a set home.
* Disconnected claim groups (that are not designated outposts) generally cannot be expanded from, emphasizing strategic claiming around home or outposts.

* **Outpost System:**
* Introduced `/f outpost` subcommands for establishing and managing secondary claim areas, distinct from the main faction home territory.
* `/f outpost create`: Allows creation of an outpost in a wilderness chunk, establishing a new, independent claim anchor. This has a configurable power cost and a server-wide limit per faction.
* `/f outpost sethome [id]`: Designates or relocates the specific teleportation point (home) within an existing outpost's claimed territory. The target location must be within a chunk already claimed by that specific outpost.
* `/f outpost home [id]`: Allows faction members to teleport to the designated home point of a specified outpost.
* `/f outpost delete [id]`: Removes a specified outpost and unclaims all land specifically associated with it.
* **Territory Merging:** If an outpost's claimed territory becomes contiguous (adjacent) with the main faction home territory through new claims, the outpost is automatically disbanded, and its claims are seamlessly merged into the main faction territory.

* **Faction Chat:**
* Implemented `/f chat` (alias `/f c`) to toggle a private chat channel exclusively for faction members.
* Messages sent in faction chat are visible only to online members of that faction.
* Server operators with the `goatedfactions.admin.spy` permission can silently view all faction chat messages.
* The format of faction chat messages (e.g., prefix, colors) is configurable in `config.yml`.

* **Server Spawn Claim Protection:**
* Implemented a configurable system to prevent factions from claiming land or creating new factions (setting their initial home) within a defined radius of the server's main spawn point.
* This protection can be bypassed by players with the `goatedfactions.admin.bypassspawnprotection` permission.
* The protection radius is configurable in `config.yml`.

### Enhancements & Modifications

* **Claiming & Overclaiming:**
* Overclaiming a chunk from another faction now has a distinct, configurable power cost (`power.cost.overclaim_chunk`).
* Overclaiming is only possible if the target faction has zero power.
* Refined logic for claim adjacency: new claims must touch existing faction land (either main territory or an outpost's territory).
* The first claim during `/f create` is free. Subsequent claims via `/f claim` have a configurable power cost.

* **Territory Entry Notifications:**
* On-screen titles displayed when entering a new territory (Wilderness, own/allied/enemy/neutral faction land) now overwrite previous titles more effectively, providing clearer immediate feedback.
* Players also receive a private chat message upon entering Wilderness or a faction's territory. The format and content of these messages are configurable in `config.yml` (e.g., `messages.entering_wilderness`, `messages.entering_faction_territory`), allowing for dynamic color-coding based on relation.

* **Dynmap Integration:**
* Significantly reworked claim visualization on Dynmap. Contiguous claimed areas for a single faction are now rendered with merged borders, creating a cleaner and more unified visual representation rather than individual chunk outlines for connected territories.
* Added configurable `stroke_color` for the merged polygon borders and `neutral_claim_color` for factions that are not self, allied, or enemy.
* Dynmap updates are triggered more comprehensively and reliably after various faction actions, including claims, unclaims, disbands, relation changes, and outpost modifications.
* The popup info for faction areas on Dynmap includes more details like owner, power, member count, allies, enemies, total claims, and outpost count.

* **Faction Home Management:**
* `/f sethome` is now exclusively used to set or relocate the main faction home point within the faction's primary claimed territory (not outpost land).
* `/f unclaim` is prevented on the chunk containing the main faction home if it's the last piece of main territory land; the home must be relocated first using `/f sethome` in another valid chunk, or the faction disbanded. Similar protection exists for the last claim of an outpost's spawn chunk.

* **Configuration (`config.yml`):**
* Added new configuration options:
* `power.cost.create_outpost`: Power cost to create a new outpost.
* `faction_details.max_outposts`: Maximum number of outposts a faction can own.
* `faction_details.faction_chat_format`: Customizable format for faction chat messages.
* `claiming.prevent_claim_near_spawn` and `claiming.spawn_protection_radius`: For server spawn protection.
* `messages.entering_wilderness` and `messages.entering_faction_territory`: For customizable territory entry chat messages.
* Various Dynmap style options including `stroke_color` and `neutral_claim_color`.
* Reviewed and standardized default values for many existing settings.

* **Commands & User Experience:**
* `/f who [faction_name]` now displays information about a faction's outposts, including their IDs and locations.
* Improved tab-completion for `/f outpost` subcommands, suggesting outpost IDs where applicable.
* Standardized user-facing text to use "faction home" or "home point" consistently, moving away from "spawnblock."
* Help messages (`/f help`, `/f outpost help`) now include power costs for relevant commands.

### Bug Fixes & Code Refinements

* Addressed numerous "Cannot resolve method/symbol" errors across `FactionCommand.java`, `AdminFactionCommand.java`, and listener classes by ensuring correct method implementations, parameter matching, proper imports, and correct variable scoping (e.g., `Player player` casting in `FactionCommand`).
* Fixed issues where Dynmap updates were not consistently triggered after all types of claim operations (e.g., initial claim via `/f create`, outpost creation, unclaims), relation changes, or disbands. Ensured `updateFactionClaimsVisual` and `updateFactionRelations` are called appropriately.
* Resolved potential `NullPointerExceptions` in `PlayerClaimBoundaryListener` by ensuring default message strings are always loaded from config or hardcoded safely, and by adding null checks for world objects.
* Corrected logic in `FactionCommand.java` for handling the return values and side-effects of core plugin methods (e.g., ensuring power is deducted only on successful operations for faction creation, claiming, declaring relations).
* Improved `OfflinePlayer` name handling in commands like `/f who` and `/f list` to gracefully manage cases where a player's name might not be resolvable, using UUID fallbacks or "Unknown" placeholders.
* Refined data serialization and deserialization logic in `GFactionsPlugin.java` and `Outpost.java` to correctly save and load outpost data, including their specific claim sets and spawn locations.
* Addressed issues where `/f outpost delete` might not have fully cleaned up all associated claims from both the faction's internal list and the global claim map, or could error if an outpost was in an inconsistent state.
* Fixed string concatenation issues involving `ChatColor` objects and integers by ensuring explicit string conversion (e.g., `String.valueOf()`) in user-facing messages within `FactionCommand.java`.
* Ensured that `Faction.java`'s `broadcastMessage` method was correctly implemented and utilized by `FactionCommand.java`.
* Corrected logic for home relocation (`Faction#relocateHomeToRandomClaim`) to better handle scenarios with no remaining main territory and the conversion of outposts.
* Fixed logic in `Faction#removeClaim` to correctly handle consequences for home and outpost spawn chunks.
* Ensured `Faction#lateInitPluginReference` is consistently called after loading factions to correctly initialize transient plugin-dependent fields and re-validate data like outpost IDs and world references.

### Developer & Server Admin Notes

* The initial claim made during `/f create` (the faction's home chunk) is now explicitly free of any power cost. Subsequent claims incur costs as defined.
* The plugin's `onEnable` sequence in `GFactionsPlugin.java` now includes more detailed logging for each initialization step (config loading, spawn location, data loading, command/listener registration, tasks, Dynmap) to aid in diagnosing any startup issues.
* **Configuration Migration:** When upgrading from a significantly older version (pre-outposts/spawnblock changes), it is **highly recommended** to back up and then delete the old `config.yml` and `factions.yml` (or your faction data file). This allows the plugin to generate new files with all the current options and default values, preventing potential conflicts or missing settings, especially for new message formats, outpost configurations, and spawn protection.
* The Dynmap seamless border feature represents a significant visual improvement. However, for extremely complex or highly fragmented claim patterns across multiple non-contiguous areas (that aren't outposts), the polygon merging algorithm's output should be monitored. Fallback to individual chunk markers occurs if a valid polygon cannot be formed.
* The `PlayerClaimBoundaryListener` now uses a configurable cooldown (`titles.display_cooldown_seconds`) for sending on-screen titles to prevent spam, but chat messages for territory changes are still sent.
----------, May 18, 2025

GFactions Plugin Changelog
Version 1.1.0 (Major Overhaul & Feature Release)

Date: May 17, 2025

This is a significant update to GFactions, introducing core systems like Spawnblocks and Outposts, refining existing mechanics, expanding configuration options, and addressing various bugs.

New Features & Systems
  1. Core Spawnblock System:
    • Factions are now centered around a "Spawnblock" (their primary home location). This is mandatory.
    • /f create: Now automatically claims the chunk the player is in and sets their current location as the faction's initial Spawnblock.
    • Spawnblock Relocation: If the chunk containing a faction's Spawnblock is overclaimed, the Spawnblock automatically relocates to a random, valid surface location within another of the faction's claimed chunks.
    • Claim Adjacency & Connectivity:
      • Newly claimed chunks (not outposts) must be adjacent to existing faction claims.
      • Furthermore, these new claims must be part of a contiguous landmass connected to either the main Spawnblock or an Outpost Spawnblock. Disconnected claim "islands" (not outposts) cannot be expanded from.
  2. Outpost System:
    • Allows factions to establish secondary bases and claim areas not directly connected to their main territory.
    • /f outpost create: Creates a new outpost in the player's current (wilderness) chunk, establishing it as an Outpost Spawnblock. Costs power.
    • /f outpost sethome [id]: Sets the specific teleport location for a designated outpost.
    • /f outpost home [id]: Teleports the player to the specified outpost's home location (with warmup).
    • /f outpost delete [id]: Deletes a specified outpost and unclaims its chunk.
    • Configuration:
      • faction_details.max_outposts: Configurable limit on how many outposts a faction can have (Default: 1).
      • power.cost.create_outpost: Configurable power cost to create an outpost (Default: 50).
  3. Faction Chat:
    • /f chat (or /f c): Toggles a faction-specific chat channel for members.
    • Messages are prefixed with the faction name and are only visible to faction members and online server operators with the goatedfactions.admin.spy permission.
    • faction_details.faction_chat_format: Configurable chat message format.
  4. Server Spawn Claim Protection:
    • claiming.prevent_claim_near_spawn: (Default: true) Prevents factions from claiming land or establishing their initial Spawnblock too close to the server's global spawn point.
    • claiming.spawn_protection_radius: (Default: 50 blocks) Defines this protected radius.
    • goatedfactions.admin.bypassspawnprotection: New permission allows admins to bypass this restriction.
Enhancements & Changes to Existing Features
  1. Claiming & Overclaiming:
    • Overclaiming Cost: power.cost.overclaim_chunk is now a distinct configuration (Default: 20), separate from the regular claim cost.
    • Overclaiming a faction's last claim or their Spawnblock chunk now has more defined consequences (e.g., Spawnblock relocation).
  2. Territory Entry Notifications (Titles & Chat):
    • Title Overwrite: When moving between different territories (Wilderness, Faction X, Faction Y), the on-screen title message will now immediately update/overwrite the previous one.
    • Private Chat Message: Players will also receive a private chat message (e.g., "Now entering Wilderness", "Now entering [FactionRelationColor][FactionName]") when crossing into new territories. Configurable via messages.entering_wilderness and messages.entering_faction_territory.
    • Title display cooldown (titles.display_cooldown_seconds) potentially reduced to facilitate quicker updates.
  3. Dynmap Integration:
    • Seamless Borders: Reworked claim rendering to group contiguous chunks of a faction into single, seamless polygons on the Dynmap, similar to Towny-style maps, rather than showing individual chunk borders within a faction's territory.
    • Configurable Colors: Added dynmap.style.neutral_claim_color for neutral factions and dynmap.style.stroke_color for the outline of the merged polygons.
    • Dynmap updates are now more targeted or full refreshes (updateAllFactionClaimsVisuals) are triggered appropriately after claim changes, disbands, etc.
  4. Faction Home (/f home, /f sethome):
    • These commands now exclusively manage the main faction Spawnblock.
    • /f sethome requires the location to be within an already claimed chunk of the faction. If set in an existing outpost chunk, that chunk loses its outpost status and becomes the main Spawnblock.
    • Directly unclaiming the main Spawnblock chunk via /f unclaim is blocked; it must be relocated first via /f sethome or the faction disbanded.
  5. Commands & User Experience:
    • /f who [faction]: Now displays information about a faction's outposts.
    • Tab-completion for commands, especially those involving outpost IDs, has been improved.
    • Help messages (/f help, /f outpost help) updated to reflect new commands and changes.
  6. Configuration File (config.yml):
    • Numerous new configuration options added (as detailed above for outposts, spawn protection, chat, costs, messages, Dynmap styles).
    • Default value for power.cost.overclaim_chunk changed.
  7. Permissions:
    • Added goatedfactions.admin.spy (to see faction chat).
    • Added goatedfactions.admin.bypassspawnprotection (to claim near server spawn).
Bug Fixes & Code Refinements
  • Resolved numerous "Cannot resolve method" and "Cannot resolve symbol" errors in command classes (FactionCommand.java, AdminFactionCommand.java) by ensuring all handler methods were fully implemented with correct signatures and variable names.
  • Added toStringShort() method to ChunkWrapper.java for concise display of chunk coordinates.
  • Corrected method calls in AdminFactionCommand.java for Dynmap refresh actions (e.g., using updateAllFactionClaimsVisuals).
  • Improved handling of OfflinePlayer objects to reduce potential for NullPointerExceptions, especially when retrieving names.
  • Addressed various IDE warnings related to empty if statements, redundant initializers, and @NotNull annotations by refining logic and structure.
  • Ensured necessary imports (e.g., java.util.Collections) were present.
----------, May 17, 2025

Resource Information
Author:
----------
Total Downloads: 30
First Release: May 16, 2025
Last Update: May 17, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings