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

Ally Events #4356

Merged
merged 7 commits into from
Oct 12, 2020
Merged

Ally Events #4356

merged 7 commits into from
Oct 12, 2020

Conversation

ceeedric
Copy link
Contributor

@ceeedric ceeedric commented Oct 7, 2020

Added ally events

Description:

Adds the following events:

  • NationAcceptAllyRequestEvent
  • NationDenyAllyRequestEvent
  • NationPreAcceptAllyRequestEvent (cancellable)
  • NationPreDenyAllyRequestEvent (cancellable)
  • NationRemoveAllyEvent
  • NationPreRemoveAllyEvent (cancellable)

New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

Added ally events
Copy link
Member

@LlmDl LlmDl left a comment

Choose a reason for hiding this comment

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

Aside from the minor requested changes I'd like to know if the cancel-able events are actually removing the invitations that are denied. If they are not being removed (I suspect they aren't) then the king would end up just trying accept it over and over.

There also needs to be a cancelled message shown to the person who's had their accept/deny action denied. You only need to add the new language string to the english.yml and I will copy it to the others.

@ceeedric ceeedric requested a review from LlmDl October 7, 2020 15:44
Copy link
Contributor

@silverwolfg11 silverwolfg11 left a comment

Choose a reason for hiding this comment

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

I don't really see the need for dividing each of these events up into a pre event and the actual event. The reason being is that this division is usually made when there is a case where we do not want the event to be cancelled and do not want to present an option of the event being cancelled.

In the cases of the events here, all of them are fine if they are cancelled and there is no case where we want to prevent cancellation of them.

Thus, I think it's best just to remove all the pre events and make the actual events cancellable. Developers who want to listen to the final state of these events can just listen to the event on MONITOR priority.

@LlmDl LlmDl merged commit 86662d1 into TownyAdvanced:master Oct 12, 2020
@LlmDl LlmDl added this to the 0.96.3.0 milestone Oct 12, 2020
LlmDl added a commit that referenced this pull request Oct 12, 2020
    - Decides which blocks' explosions will be reverted on a per-world
basis.
    - Closes #4300.
  - New Config Option:
new_world_settings.plot_management.wild_revert_on_block_explosion.enabled
    - default: true
    - Enabling this will slowly regenerate holes created in the
wilderness by exploding blocks like beds.
    - Is a default setting for new worlds only.
  - New Config Option:
new_world_settings.plot_management.wild_revert_on_block_explosion.blocks
    - default:
WHITE_BED,ORANGE_BED,MAGENTA_BED,LIGHT_BLUE_BED,YELLOW_BED,LIME_BED,PINK_BED,GRAY_BED,LIGHT_GRAY_BED,CYAN_BED,PURPLE_BED,BLUE_BED,BROWN_BED,GREEN_BED,RED_BED,BLACK_BED
    - The list of blocks whose explosions should be reverted.
    - Is a default settings applied to new worlds only.
  - Removed Command: /tw toggle revertexpl
  - New Command: /tw toggle revertentityexpl
    - Toggles explosions caused by entities reverting on and off.
  - New Command: /tw toggle revertblockexpl
    - Toggles explosions caused by blocks reverting on and off..
  - API: Ally Events, courtesy of ceeedric with PR #4356. (First-Time
Contributor!)
    - Adds the following cancellable events:
      - NationAcceptAllyRequestEvent
      - NationDenyAllyRequestEvent
      - NationRemoveAllyEvent
  - pt-br.yml updated to 0.86 by Plugner with PR #4348. (First-Time
Contributor!)
  - New farmable nether blocks added to config by Momshroom with PR
#4353. (First-Time Contributor!)
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.

3 participants