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

Fix NPE preventing null mayors from being replaced. #5235

Merged
merged 1 commit into from
Aug 27, 2021
Merged

Conversation

Warriorrrr
Copy link
Member

Description:

Fixes an NPE that can rarely occur when running /ta set mayor.


New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:

Closes #5234


  • 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.

@Warriorrrr Warriorrrr added the bug label Aug 26, 2021
@Warriorrrr Warriorrrr added this to the 0.97.2.0 milestone Aug 26, 2021
@LlmDl LlmDl merged commit 5763b8d into master Aug 27, 2021
@LlmDl LlmDl deleted the fix/oldmayor-npe branch August 27, 2021 12:41
LlmDl added a commit that referenced this pull request Sep 1, 2021
mayor is used, courtesy of Warriorrrr with PR #5235.
  - Make context calculation faster, courtesy of Warriorrrr with PR
#5244.
  - Check if resident is friended before sending removal message,
courtesy of Warriorrrr with PR #5253.
  - Fix AlreadyRegisteredException when accepting two invites or more,
courtesy of 0xBit-MC #5254.
  - Add prompts for Add Player to PermissionGUI, courtesy of Warriorrrr
with PR #5248.
  - Prevent chickens being spawned without permission, courtesy of
Warriorrrr with PR #5237.
    - An egg that lands in a plot will test if the egg-thrower can
item_use in that location, when eggs are in the item_use list.
    - Eggs will automatically be added to the config.yml's item_use list
with this update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot invoke "com.palmergames.bukkit.towny.object.Resident.isMayor()" because "resident" is null
2 participants