Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worldguard properties update #441

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

davight
Copy link
Contributor

@davight davight commented Feb 8, 2025

Changes:

  • This fixes https://discord.com/channels/315163488085475337/1289968328655503433
  • Updated property format to extensions
  • Cleaned up code a bit
  • Deprecated tags:
    • PlayerTag.worldguard.can_build[<location>] / PlayerTag.wg.can_build[<location>] -> PlayerTag.worldguard_can_build[<location>]
    • PlayerTag.worldguard.test_flag[<name>] / PlayerTag.wg.test_flag[<name>] -> PlayerTag.worldguard_flag[flag=<name>(;location=<at>)]

Note

PlayerTag.worldguard_flag now defaults location to the player's location when there's no input provided and also when there's an invalid location provided. Is this fine? Or should the tag fail when invalid location is provided?

@mcmonkey4eva
Copy link
Member

Most of those renames seem a bit unnecessary. The . to _ is good, the adding prefixes where they weren't prefixed before isn't particularly needed. Those tags for context don't have wg prefixes because in the early days WG was supported by Denizen directly, didn't require Depenizen. Shouldn't rename a 10 year old core tag without an active reason to.

@davight
Copy link
Contributor Author

davight commented Feb 9, 2025

fixed


public class WorldGuardPlayerExtensions {

public static Warning worldguardCanBuild = new SlowWarning("worldguardCanBuild", "The tag 'PlayerTag.worldguard.can_build' from Depenizen/Worldguard is deprecated: use 'PlayerTag.worldguard_can_build'");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use the Deprecations.pointlessSubTagPrefix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh do I need to register it in denizen-core? pointlessSubTagPrefix is private

};

PlayerTag.tagProcessor.registerTag(ObjectTag.class, "worldguard", runnable);
PlayerTag.tagProcessor.registerTag(ObjectTag.class, "wg", runnable);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wg part can be dropped - there were scraps of code about it but it wasn't functionally implemented (not listed in handledTags)

// @returns ObjectTag
// @plugin Depenizen, WorldGuard
// @description
// Returns the boolean state of a flag for that player at the specified location.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta should specify what the default location if unspecified is

@davight
Copy link
Contributor Author

davight commented Feb 9, 2025

fixed

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