Skip to content

Conversation

@Poikilos
Copy link

@Poikilos Poikilos commented May 7, 2025

I added this since as a draft since:

This is a refactor adding an additional "scs_zones" table so that permissions (settings) can be changed for any size zone. A zone is a user-defined bounding box with corners at any X, Y, and Z. This feature is not #37 as it does not allow multiple owners, but it can at least change permissions.

  • A practical example in the case of my server is that we have shop claims (and unclaimed chunks for players to claim) in a shopping district, but they want to be able to protect chests that are not shop chests.
  • This operates similar to "chunk" features of the GUI and some code can be shared, but Zone operations do not affect claims nor does it affect which chunks are in the claim. Zone operations (via commands and GUI clicks) only affect the zone list of a claim or a specific zone (such as permissions in the new scs_zones table).
  • potentinally members, bans, etc can be added in a future release (I plan to hold off on those features since that requires player location checks several places in the code, and may affect performance if there is not already a streamlined block-based way as opposed to chunk-based)

Tasks:

  • select a zone using a Wooden Axe, and highlight it with particles.
    • Store start and end corners in separate hashmaps.
    • getSelectedBB method that returns selection (or null if both corners are not selected for given player)
  • static serialize and deserialize methods for BoundingBox
  • scs_zones table (CREATE TABLE, and CRUD methods)
  • Zone subclass of Claim
  • Add zones to Claim
  • throw UnsupportedOperationException if trying to do Zone CRUD operations or operations involving Claim-level settings on a Zone instance
  • redirect Chunk menu buttons to do Zone operations if in a Zone
  • redirect translation string id access (getString) and SettingsGui access to Zone version (with zone-based ids for the values; this prevents needing twice as many YML files in the guis folder) if in a Zone (make private and add/change methods to require either a Zone instance or null)
  • List zones in the GUI
  • Make sure chest/door/etc access uses location of block (not player) checking for a Zone
  • addzone (mostly done, just need to check permissions)
  • delzone (mostly done, just need to check permissions)
  • setname
  • setdescription
  • Translate the new translation strings (partially done using Google translate manually, but I may add a yml format support and a confirmation GUI to https://github.com/Poikilos/justgetalang)

Please do not modify or make a secondary PR into this PR until I confirm I am ready, as I likely have pending local changes at any point. Please do not merge until I remove DRAFT from the title.

Please answer questions I have on #49 which are critical to making this work. Otherwise, for one thing, I may refactor setname since it seems to have illogical/obfuscated if conditions under it.

@Poikilos Poikilos changed the title Zones (subset of claim, resolves #49) DRAFT Zones: Allow creating arbitrary subsets of a claim with different permission settings, etc. Resolves #49. DRAFT May 7, 2025
@Xyness
Copy link
Owner

Xyness commented May 7, 2025

Hello, sorry but i don't want this feature in my plugin, its a chunk based plugin and it will stay like that, thanks

@Poikilos
Copy link
Author

Poikilos commented May 7, 2025

Ok, since my friends' server and others can use this I will continue at my renamed fork https://github.com/Hierosoft/DetailedClaimSystem

@Xyness
Copy link
Owner

Xyness commented May 7, 2025

Ok cool ! Thank's for your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants