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

Hotfix: Fix any *possible* NPE's in NameUtil. #3724

Merged
merged 3 commits into from Feb 28, 2020
Merged

Hotfix: Fix any *possible* NPE's in NameUtil. #3724

merged 3 commits into from Feb 28, 2020

Conversation

ghost
Copy link

@ghost ghost commented Feb 28, 2020

Description:

While the issue of the NPE may not be concrete this prevents NPE's from disruption the tab complete.


Relevant Towny Issue ticket:

Closes #3723


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

@ghost ghost requested a review from LlmDl February 28, 2020 20:34
@ghost ghost self-assigned this Feb 28, 2020
@ghost ghost changed the title Fix any *possible* NPE's in NameUtil. Hotfix: Fix any *possible* NPE's in NameUtil. Feb 28, 2020
@LlmDl LlmDl merged commit f40d2ac into master Feb 28, 2020
LlmDl added a commit that referenced this pull request Feb 29, 2020
  - Fix for root cause of issue solved with #3724, courtesy of stzups
with PR #3725.
TheFlagCourier pushed a commit that referenced this pull request Mar 2, 2020
* Fix any *possible* NPE's in NameUtil.

* add other catches.

* Removed unused import
TheFlagCourier added a commit that referenced this pull request Mar 2, 2020
  - Fix for root cause of issue solved with #3724, courtesy of stzups
with PR #3725.
LlmDl added a commit that referenced this pull request Mar 18, 2020
* - Improve debug messaging on flatfile database load.

* Merge pull request #3632 from TownyAdvanced/hotfix/pom-deb_notequals_pom

Update Pom_Deb to match Pom, necessary changes to deploy-on-release

* - Pom and pom_deb updates by TheFlagCourier with PR #3632.

    - Javadocs should only build on the install phase.
    - Github actions should again function properly.
  - Change to saving for plotgroups on flatfile, removing now-redundant
world.
    - Already-made plot groups should load properly and save without a
world.

* - Improve debug messaging on flatfile database load.

* Fix artifact versioning in pom_deb

* - Fix plot groups whose town doesn't exist anymore causing safe mode.

* - Fix edge-case scenario where revoking invites couldn't be done
because we were matching the wrong player.
    - Closes #3635.

* - Fix plot groups whose town doesn't exist anymore causing safe mode.

* - Fix edge-case scenario where revoking invites couldn't be done

because we were matching the wrong player.
    - Closes #3635.

* Fix french.yml file not parsing.

* Add clickable text to confirmations messages. (#3631)

* Fix npe thrown from /plot group add when group name is not specified.

* Fix verion number on lang files

* Changed lang file version numbers

* Added clickable text to confirmations.

* Added lang file stuffs.

* Update message to indicate different methods of interaction.

* Fixed casting issues, and improved logic and formatting.

* Fixed invalid char error.

* Added white text to trailing part of the confirmation.

* Removed unused big

* Removed some unused imports

* Fixed hypen still being green (#3639)

* - Confirmations can now be accepted/declined/confirmed/cancelled by
clicking on the text if you use Spigot.
    - Courtesy of Siris with PRs #3631 + #3639
    - Closes #3534.
    - Commands can still be used, clicking only for spigot servers, not
craftbukkit servers.

* Fix up last commit.

* Remove another TownyMessaging line.

* - New Config Option: notification.notifications_appear_in_action_bar
    - default: true
    - This setting only applies to servers running spigot, paper or
bungeecord.
    - On servers using craftbukkit.jar the notifications will always
appear in the chat.
    - When set to false the notifications will appear in the chat rather
than the action bar.
    - Closes #3636.

* - Translated cannot-kick-that-resident strings.

* - Create ResidentUtil for resident-related methods.

* - TownyPermission data rewritten to a 2d boolean array, courtesy of
Silverwolfg11 with PR #3600.

* 0.95.2.9:
  - Fix message shown when a player tries to set their nation spawn in
the wilderness.
    - Closes #3640.

* Better fix for attempting to set nation spawn in the wilderness.

* Fix 0.95.2.8 Breaking on craftbukkit servers. (#3642)

* Moved spigot related messaging into new file.

* Fixed outdated stuffs

* Fix lines not showing up on CB

Co-authored-by: Suneet Tipirneni (Siris) <suneettipirneni@users.noreply.github.com>

* - Fix for 0.95.2.8 not running on Craftbukkit servers.
    - Courtesy of Siris with PR #3642.

* - Fix for trees and mushrooms growing into plots they shouldn't.
    - Closes #3641.
  - Removed unused imports from TownyMessaging.

* Make sure we aren't removing an empty list on last commit.

* Fix french.yml file not parsing.

* Add clickable text to confirmations messages. (#3631)

* Fix npe thrown from /plot group add when group name is not specified.

* Fix verion number on lang files

* Changed lang file version numbers

* Added clickable text to confirmations.

* Added lang file stuffs.

* Update message to indicate different methods of interaction.

* Fixed casting issues, and improved logic and formatting.

* Fixed invalid char error.

* Added white text to trailing part of the confirmation.

* Removed unused big

* Removed some unused imports

* Fixed hypen still being green (#3639)

* - Confirmations can now be accepted/declined/confirmed/cancelled by

clicking on the text if you use Spigot.
    - Courtesy of Siris with PRs #3631 + #3639
    - Closes #3534.
    - Commands can still be used, clicking only for spigot servers, not
craftbukkit servers.

* Fix up last commit.

* Remove another TownyMessaging line.

* - New Config Option: notification.notifications_appear_in_action_bar

    - default: true
    - This setting only applies to servers running spigot, paper or
bungeecord.
    - On servers using craftbukkit.jar the notifications will always
appear in the chat.
    - When set to false the notifications will appear in the chat rather
than the action bar.
    - Closes #3636.

* - Translated cannot-kick-that-resident strings.

* - Create ResidentUtil for resident-related methods.

* Merge pull request #3600 from silverwolfg11/permissions

Rewrite TownyPermission data structure to a 2d boolean array

* - TownyPermission data rewritten to a 2d boolean array, courtesy of

Silverwolfg11 with PR #3600.

* 0.95.2.9:

  - Fix message shown when a player tries to set their nation spawn in
the wilderness.
    - Closes #3640.

* Better fix for attempting to set nation spawn in the wilderness.

* Fix 0.95.2.8 Breaking on craftbukkit servers. (#3642)

* Moved spigot related messaging into new file.

* Fixed outdated stuffs

* Fix lines not showing up on CB

Co-authored-by: Suneet Tipirneni (Siris) <suneettipirneni@users.noreply.github.com>

* - Fix for trees and mushrooms growing into plots they shouldn't.

    - Closes #3641.
  - Removed unused imports from TownyMessaging.

* Make sure we aren't removing an empty list on last commit.

* 0.95.2.10:
  - API: Added TownPreUnclaimEvent
    - Useful for getting the TownBlock object that will be unclaimed.
    - Cancellable but probably not a good idea.

* Added missing aprostrof in Error string (typo)

The aprostrof was missing. Present in all other error messages in this file.

* - Missing apostrophe in error message fixed by Deuphic with PR #3645.

* - Fix Null message when plots were claimed/unclaimed.
  - Bump language files to 0.71
  - Fix error message for the /plot fs when used on a plot group.
  - Fix being false-positive shown when using /plot nfs on a plot group.
  - Fix error shown in console when entering a plot that is for sale but
is not part of a plot group.

* 0.95.2.10:

  - API: Added TownPreUnclaimEvent
    - Useful for getting the TownBlock object that will be unclaimed.
    - Cancellable but probably not a good idea.

* Merge pull request #3645 from Deuphic/patch-1

Added missing aprostrof in Error string (typo)

* - Missing apostrophe in error message fixed by Deuphic with PR #3645.

* - Fix Null message when plots were claimed/unclaimed.

  - Bump language files to 0.71
  - Fix error message for the /plot fs when used on a plot group.
  - Fix being false-positive shown when using /plot nfs on a plot group.
  - Fix error shown in console when entering a plot that is for sale but
is not part of a plot group.

* Update deploy-on-release.yml

remove mkdir ~/.m2

* Update pt-br.yml

* 0.95.2.11:
  - PT-BR.yml updated by BannerGames with PR #3647.

* Update deploy-on-release.yml

Another attempt at getting workflow to deploy automatically without failing.

* Update korean.yml

IDK what is the new feature (like plot group).
So.. I can not translate new things

* - Fix successful message when
economy.new_expand.price_claim_townblock_refund is set to a negative
value.

* - Korean.yml updated by wolfwork with PR #3651.

* Fixed invalid character error when players hit the accept button on a nation invite. (#3653)

* - Fix for town invites from nation, courtesy of Siris with PR #3653.

* - Fix no message being shown when an invalid subcommand of "/plot
group" is used.

* Update deploy-on-release.yml

remove mkdir ~/.m2

* Merge pull request #3647 from BannerGames/patch-2

PT-BR file update

* 0.95.2.11:

  - PT-BR.yml updated by BannerGames with PR #3647.

* - Fix successful message when

economy.new_expand.price_claim_townblock_refund is set to a negative
value.

* Merge branch 'master' of https://github.com/TownyAdvanced/Towny.git

* Merge branch 'master' of https://github.com/TownyAdvanced/Towny.git

* - Korean.yml updated by wolfwork with PR #3651.

* Fixed invalid character error when players hit the accept button on a nation invite. (#3653)

* - Fix no message being shown when an invalid subcommand of "/plot

group" is used.

* Alpha-Build #5

Just marks the fifth alpha-build (version string in pom)

* Restore TNE authentication / Remove Automated Javadoc Phase ENTIRELY

A different CI can handle javadocs if it must - I do not believe GH Packages is capable of handling them in its current form. As for the authentication - this pretty much writes the maven config *without* creating the maven directory first. Recommend a "Testing" point release before 0.96.0.0 would go live.

* Adds Parameters to Javadoc comment

`mvn javadoc:javadoc` was failing to run prior to this commit. It was either this, or to remove an asterisk.

* 0.95.2.12:
  - Javadocs fixed courtesy of TheFlagCourier with PR #3655.
  - Github Actions workflow adjustment courtesy of TheFlagCourier with
PR #3654.

* Lang: Use Pre-Existing Translatable String 'msg_modes_set'

Noticed this one guy on reddit: https://www.reddit.com/r/townyplugin/comments/d1c6oc/how_can_i_change_the_color_of_modes_set_channel/

Did a quick search and found that this instance of "Modes set: " was hard-coded. Just rectifying that.

* - Fix /ta rename not passing on NPC status to residents.

* Merge pull request #3655 from TownyAdvanced/hotfix/javadoc_SpgtMsg

Adds Parameters to Javadoc comment

* Merge pull request #3654 from TownyAdvanced/hotfix/GH_Actions

Restore TNE authentication / Remove Automated Javadoc Phase ENTIRELY

* 0.95.2.12:

  - Javadocs fixed courtesy of TheFlagCourier with PR #3655.
  - Github Actions workflow adjustment courtesy of TheFlagCourier with
PR #3654.

* - Fix /ta rename not passing on NPC status to residents.

* - Fix /plot set perm showing the opposite PVP setting in its final
output.

* Revamp/Simplify logging, add Database logging.

Signed-off-by: Articdive <13535885+Articdive@users.noreply.github.com>

* Remove some new-DB specific stuff

* - Update logger, courtesy of ArticDive/Siris with PR #3664.

* - Fix /plot set perm showing the opposite PVP setting in its final

output.

* Merge pull request #3664 from TownyAdvanced/feature/new-logger

Feature/new logger

* - Update logger, courtesy of ArticDive/Siris with PR #3664.

* - Fix /ta town {townname} {command} not showing anything helpful when
the {command} used is not a valid command.
    - Closes #3667.

* - Fix ranks not being capitalized on /res, /town and /nation screens.
    - Closes #3669.
  - Added StringMgmt.capitalize();

* - Fix /ta town {townname} {command} not showing anything helpful when

the {command} used is not a valid command.
    - Closes #3667.

* - Fix ranks not being capitalized on /res, /town and /nation screens.

    - Closes #3669.
  - Added StringMgmt.capitalize();

* - Fix 'msg_modes_set' in ResidentCommand not being used for
translation, courtesy of TheFlagCourier with PR #3658.

* 0.95.2.13:
  - Fix towny.admin players being limited by pvp cooldown timer.
  - Fix town/nation permissions missing on the /plot perm hud
scoreboard.
  - Fix NPE shown when player is using /plot perm hud, but has another
plugin's scoreboard show up.

* - Fix missing town/nation key values on /plot perm hud.
  - Fix missing townblock type on /plot perm hud.

* - Fix /n new name with out underscores not parsing spaces into
underscores.
  - New Command: /townyadmin nation new {name} {capital}
    - Creates a nation for the specified town.
    - Does not charge the town money.
  - New Permission Node: towny.command.townyadmin.nation.new
    - Allows the use of the /ta nation new {name} {capital} command.

* Merge pull request #3658 from TownyAdvanced/language/translatables/missing_modes_set

Langs: Use Pre-Existing Translatable String 'msg_modes_set' in ResidentCommand

* 0.95.2.13:

  - Fix towny.admin players being limited by pvp cooldown timer.
  - Fix town/nation permissions missing on the /plot perm hud
scoreboard.
  - Fix NPE shown when player is using /plot perm hud, but has another
plugin's scoreboard show up.

* Pom changes for javadocs

* Ensure that recent JDKs do not error when `mvn javadoc:javadoc` is run

* JDK 11 and 13 will currently fail to properly build javadocs when the source level isn't declared.

* Dynamically get source version for javadoc based pom properties

* Refactor/economy (#3663)

* Mostly broken code

* Just messing with some ideas, have static EconomyManager and an interface. The latter is used for class specific items such as econ name, and the other is used for function that are class agnostic.

* This is a scrapped idea

* Refactored a bunch of code

* Made it so the account field is now implemented in most areas in towny.

* Code sucessfully compiles

* Added two new interfaces
  - Permissible
  - TownBlockOwner (A port from the original class)

*Since both of these interfaces are implemented, Resident and Town now both directly inherit from TownyObject.

* Fixed initialization bugs

* Nation now conforms to the Economy interface.

* Added javadoc

* Fixed compiler errors from nation transition.

* Changed Economy to EconomyHandler

* Restore legacy methods via deprecation

* Changed EconomyAccount.getEconomyName() to EconomyAccount.getName()

this limits verbosity and repetition in the method calls.

* Added deprecation documentation.

* Re-add support for economy logging.

* Cleaned up logging changes

* EconomyAccount now conforms to EconomyHandler

* Revert "Cleaned up logging changes"

* This reverts commit 3bf863a.

* Auto stash before revert of "Cleaned up logging changes"

* Fix econ logging (again)

* Fix econ logging (again)

* Fix NPE from null log values.

* remove debug code

* Remove unused imports and unused method.

* Create an alias for `TownyInviteSender` and `TownyInviteReceiver`

* Co-authored-by: LlmDl <LlmDlio@gmail.com>

* - Pom updates for javadocs courtesy of FlagCourier with PR #3672.
  - Eco backend refactor courtesy of Siris with PR #3663.

* - Fix missing town/nation key values on /plot perm hud.

  - Fix missing townblock type on /plot perm hud.

* - Fix /n new name with out underscores not parsing spaces into

underscores.
  - New Command: /townyadmin nation new {name} {capital}
    - Creates a nation for the specified town.
    - Does not charge the town money.
  - New Permission Node: towny.command.townyadmin.nation.new
    - Allows the use of the /ta nation new {name} {capital} command.

* Pom changes for javadocs

* Ensure that recent JDKs do not error when `mvn javadoc:javadoc` is run

* JDK 11 and 13 will currently fail to properly build javadocs when the source level isn't declared.

* Dynamically get source version for javadoc based pom properties

* Merge branch 'master' of https://github.com/TownyAdvanced/Towny.git

* Commit Auto-Stash

* Bump Version to Alpha Build 6

* 0.95.2.14:
  - Fix for revoking town invites on a player not actually revoking the
invite.

* Revert "Merge branch 'master' into backport/0.96.0.0"

This reverts commit 24002eb.

* Didn't realize commits were cherry picked

Reverting and updating now.

* - Fix for single-town nations when the winner_takes_ownership_of_town

is true.
    - Closes #3678.
  - Fix for eventwar war participants message using two lines when it
ought to only use one.
  - Added TownyMessaging.sendPlainGlobalMessage() which doesn't use the
[Towny] prefix.
  - Fix eventwar wars that don't start properly leaving remainders in
the warringsTowns and warringNations.

* - Fix english.yml not having the correct version number.

* Update french.yml (#3680)

* Update french.yml

* Update french.yml

* - French.yml updated by Mitsu13Ion with PR #3680.

* - Fix null response when sending an invite to an offline player.

* - Add permission nodes to /t list by x and /n list by x commands.

    - You can negate the new child nodes to limit which ways players are
allowed to sort towns.
  - New Permission Nodes: Child nodes of towny.command.nation.list, no
townyperms.yml update required.
    - towny.command.nation.list.residents
    - towny.command.nation.list.towns
    - towny.command.nation.list.open
    - towny.command.nation.list.balance
    - towny.command.nation.list.name
    - towny.command.nation.list.townblocks
    - towny.command.nation.list.online
  - New Permission Nodes: Child nodes of towny.command.town.list, no
townyperms.yml update required.
    - towny.command.town.list.residents
    - towny.command.town.list.open
    - towny.command.town.list.balance
    - towny.command.town.list.name
    - towny.command.town.list.townblocks
    - towny.command.town.list.online

* - Fix lag caused by /t list and /n list.

* 1.13-Alpha 7

* Removed Unused Regen-Related Class

This is not used by 1.13's regeneration. Removed as "Not Needed"

* Merge pull request #3690 from creatorfromhell/patch-1

continue != break.

* - Continue != break, courtesy of creatorfromhell with PR #3690.

  - Changed message shown at the end of the new day to print in the log
regardless of debug mode being true.
  - REQUIRED CONFIG CHANGE:
    - Remove LECTERN from the protections.switch_ids list in the config.
    - This will make it possible for players to read books on lecterns
without having switch perms.
    - Players will still be unable to take the book (unless they have
destroy permissions in the plot.)

* QOL interface changes/redundancy removal  (#3677)

* QOL changes/redundancy removal

- Removed TownyAllySender, and ResidentModes.java because they were only being used in singular classes defeating the purpose of the interface, so they were combined into their respective classes.
- Made PlotGroup conform to TownBlockOwner to introduce more standard implementation.
- New interface Nameable introduced in order for objects that don't extend `TownyObject` to be operated on i.e PlotGroups.

* New Bank interface

* Added Bank interface to generify objects that contain banks.

* Remove and clean up Town/Nation code

* Simplified a lot of Town/Nation code and removed some that didn't do anything.

* Clean up Town, Resident, and TownyObject

* Add push compile github action.

* Fix workflow not fetching repo data.

* Update workflow name

* Last workflow update 😅

* Last workflow update 😅

* - QOL interface changes/redundancy removal, courtesy of Siris with PR

* - Readd economy lookups for town and nation banks, deprecated.

* Add deprecation messages.

* Fix typos in javadocs, add back in TownyEconomyObject, deprecated.

* Merge pull request #3697 from TownyAdvanced/hotfix/eco-legacy-support

Add collect() and pay() back as deprecated methods.

* - Readd pay() and collect() to Towns and Nations, deprecated, courtesy

of Siris with PR #3697.

* Remove unused imports.

* Bump version number to 0.95.2.16.

* Taiwanese/zh-TW language pack support 0.71 (#3689)

* Update support 0.71

* Rename Taiwanese.yml to zh-TW.yml

* - Fix for potentially causing too many file open exceptions on servers

with large databases and small Open File Limits.

* Better version of previous commit.

* Remove unneeded exception that IntelliJ users will bring up.

* Add Tab Completes to Towny Commands (#3700)

* Add initial town tab complete commands

* Include town names with auto completes if needed.

* add the rest of the nested town commands

* Add the completes to nation commands, and add toggle completes.

* Add nation spawn commands and make town/nation matching ignore case.

* Fix nation "join" autocomplete

* Fix nation ally add/remove completions

* Added plot autocompletes.

* add plot group autocomplete support

* Add resident auto completes

* Add ta completes

* added towny autocompletes

* added townyworld tab completes

* Fix for ta set commands

* Make syntax completions ignore case

* Make syntax completions ignore case

* Add perm completions

* Add perm completions

* Limit returns so tab completer doesn't get flooded

* Lower limit return to 50

* - New Feature: smart tab-completion of most Towny commands, courtesy

of Siris with PR #3700.
    - Closes #3314.
  - Removed unneeded permission check for /n spawn.
    - towny.command.nation.spawn node is no longer tested for.
    - towny.nation.spawn.* nodes still remain in use.

* Merge pull request #3703 from qsefthuopq/patch-4

Update chinese.yml

* Implement tab completion for /invite (#3705)

* Implemented tab completion for /invite

* Using less verbose stream(), fixed typo

* 0.95.2.17:

  - Updated chinese.yml, courtesy of qsefthuopq with PR #3703.
  - Added tab completion for /invite commands, courtesy of stzups with
PR #3705.

* Delete .DS_Store

* - Fix bug where renamed towns and nations would lose their bank

balances, introduced in 0.95.2.13.

* Merge pull request #3708 from shou692199/patch-2

Update zh-TW.yml

* Flesh out .gitignore with OS specific (usually hidden) files.

* Add .ds_store

* Revert "Add .ds_store"

This reverts commit 858d115

* Add .ds_store

* remove name stuff

* Add other extraneous ignores.

* Change macOS to OS specific

* - zh-TW.yml updated by shou692199 with PR #3708.

  - Flesh out .gitignore with OS specific (usually hidden) files,
courtesy of Siris with PR #3706.

* Added proper tab completion for /nation (#3710)

* Added proper tab completion for /nation

* Made nationEnemyTabCompletes and nationAllyTabCompletes static

* Removed tab completion for /new, added neutral /n toggle tab completes but not the help page

* Made NationCommand tab complete more readable, made tab completions better

* /n enemy remove only returns nation's current enemies

* Added comments

* - Updated & smarter /nation command tab-completion, courtesy of stzups

with PR #3710.

* - Fix CombatUtil not disabling PVP in townblocks where PVP is off,

when PVP is still on in the town.
    - Towns will no longer override PVP settings for townblocks.
    - The below 3 fixes were required after adjusting this.
  - Fix using /plot perm in the wilderness just returning '[Towny] Not
registered' message. Towny will now display the World status page.
  - Fix ChunkNotification not displaying change of PVP status when
moving between two townblocks with differing PVP settings.
  - Fix /plot perm hud not displaying PVP setting for plots correctly.

* Implementation of a trie data structure for residents, towns, and nations (#3712)

* Functional trie structure implemented with /nation tab completes

* Trie.java

* Made applicable commands use trie structure

* Implemented getStringsFromKey to replace getTrieNodesFromKey

* Unused imports, made addKey void

* Comments, cleanup, and rearranging

* Typo, remove MAX_RETURNS because nothing will get that high (see usages)

* Removed test code, unused import

* Unused import

* Removed TrieUtil.java and moved to BaseCommand

* Grammar/style javadoc change

* Only check if arg isn't empty except for world

* Grammar/style change

* Building trie structures logs with TownyMessaging.sendDebugMsg

* Added removeKey to Trie, includes test code

* Added limit to Trie, removed test code, removed limit from BaseCommand

* Removed timing code

* Update trie on renames and removes

* Added missing support for town/nation deletion

* Removed/cleaned up some stuff,

- Removed uneccesary else clauses
- Trim line lengths of some long lines

* More cleanup

* Spacing

* Removal of unnecessary debug lines, whitespace

* Made the Trie generation thread scheduled in Bukkit

* Only loop through keys, spacing

* add /r resident completion

* Fixed /r completions.

* Resident tab complete uses methods from BaseCommand, and doesn't always return all residents

Co-authored-by: Suneet Tipirneni (Siris) <suneettipirneni@users.noreply.github.com>

* - Implementation of a trie data structure for residents, towns, and

nations; courtesy of stzups & Siris with PR #3712.

* Removed unused imports.

* - Fix death_payments feature not working on mob-kills of players.

* Fix for last commit charging twice on dispenser kills.

* - Fix PlayerCommandPreprocessEvent error seen in log when players chat

while Towny is in safe mode.

* - Fix edge-case scenario where a townblock could be null when listing

outposts.

* Better tab completes (#3714)

* Removed braces for readability on one line if statements

* Implemented better tab completion for plot command
      - No results returns nothing instead of online players
      - Made tab complete results static
      - Restructured for readability
      - Implemented perm and toggle tab completes for /plot group
      - Made /plot perm return more relevant results
      - Moved onTabComplete to below onCommand

* Added comment

* Moved set and toggle completions to BaseCommand

* Added better tab completion for residents
- Removal of broken commands for tab completions
- Expansion of residentToggleTabCompletes
- Addition of residentModeTabCompletes
- Made all completes static
- Move onTabComplete to below onCommand
- Refactored onTabComplete to be more specific and implement more args

* Formatting for consistency

* Rename setTabComplete to permTabComplete

* Added better tab completion to /town
- Added more static tab completes
- Rank returns residents and ranks
- /t outlaw remove returns current outlaws
- /t kick returns residents
- added /t invite

* Added better tab completion to /towny
- Made tab completions static
- Reformat for readability/consistency
- Fixed /towny top resident/land tab completes

* Tree doesn't show as a tag completion for players

* Remove unnecessary if (args.length > 0), always true

* Fixed townyworld

* Made methods static

* Moved some tab completions to their own function

* Added better tab completion to /townyadmin
- Added missing subcommands to completions
- Made subcommands static
- Added consistent functionality for all subcommands

* Tab completions now return uppercase letters where applicable
- Performance is mostly unaffected by the 100 get(string)

* Fix casing issues

* Removekey is case sensitive, comments

* added /t join

* Fixed typo getting the wrong trie

* Now using proper casing

* No need to build the trie, it is already built when newResident, newNation, and newTown are called during load

* Remove map from console tab completes

* Accept/deny is configurable

* - Updated & smarter tab-completion for remaining commands, courtesy of

stzups with PR #3714.

* Merge branch 'master' of https://github.com/TownyAdvanced/Towny.git

* Reorganize TownyFormatter methods to prevent code verbosity (#3715)

* Redid formatted naming:

- Classes now override getFormattedName() from TownyObject, rather than using an auxiliary function to determine formatted name.

* Completed Refactor:

- Removed TownyFormatter.getNamePostfix and TownyFormatter.getNamePrefix as they were never used.
- Added Resident.getFormattedTitleName to replace TownyFormatter.getFormattedResidentTitleName()
- Added deprecation messages for unused/legacy methods.

* Trim down deprecated code

* change version

* Cleanup:

- Remove extra code TownyFormatter.getExtraFields(TownBlock tb) as it is literally the exact same thing as TownyFormatter.getExtraFields(TownyObject obj);
- Fixup refactors.
- Remove paramter that wasn't used in the initialize() function.

* - Reorganization of TownyFormatter, courtesy of Siris with PR #3715.

    - Deprecates a couple things that other plugins are unlikely to be
using, notes were made for new replacements.

* Merge pull request #3719 from shou692199/patch-3

fix zh-TW.yml

* Fix toggling plot pvp (#3718)

* Fix plot pvp not prioritizing over town pvp.

* Prevent plot pvp from being toggled for admin pvp conditions.

* 0.95.2.19:

  - Fix tw-ZH.yml courtesy of shou692199 with PR #3719.
  - Fix to the preventPVP function, allowing for towns with PVP off to
set PVP true on individual plots, courtesy of silverwolfg11 with PR
  - Language files bumped to 0.72.

* - Fix DailyTimerTask not resetting cosmetic list of removedTowns,

removedNations, totalUpkeeps.
  - Fix towns being kicked from a nation for non-payment of taxes being
included in the removedTowns.

* - Temporarily make TownBlocks that are deleted for not containing a

proper town entry ErrorMessages in the log rather than just debug
messages.

* 0.95.2.20:

  - Re-add removed TownyFormatter functions as deprecated.
    - Closes #3722.
  - Create resident.getNamePostfix() & resident.getNamePrefix() for
gather pre/postfixes of kings and mayor residents.

* - Fix possible NPE when Nation taxes were collected from towns.

* Hotfix: Fix any *possible* NPE's in NameUtil. (#3724)

* Fix any *possible* NPE's in NameUtil.

* add other catches.

* Removed unused import

* - Fix any *possible* NPE's in NameUtil, courtesy of Siris with PR

* Fixed NPE when using certain sub commands of /ta (#3725)

* Fixed NPE when using certain sub commands of /ta
- Moved command specific methods out of NameUtil
- TownyAdmin finds tab completions by arguments, not null player value
- Fixed scopes and functions of TownCommand and NationCommand

* add missing break;

* 0.95.2.21:

  - Fix for root cause of issue solved with #3724, courtesy of stzups
with PR #3725.

* - Fix lack of message when an unjailed player uses /res jail foo.

    - Closes #3726.
  - Language files bumped to 0.73.

* - Fix BED_BLOCK in the default config's

new_world_settings.plot_management.block_delete.unclaim_delete list.
  - REQUIRED: amending towny\data\worlds\WORLDNAME.txt files
    - All existing Towny\data\worlds\WORLDNAME.txt files should have
their plotManagementDeleteIds lines also changed to
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,TORCH,REDSTONE_WIRE,ACACIA_SIGN,BIRCH_SIGN,DARK_OAK_SIGN,JUNGLE_SIGN,OAK_SIGN,SPRUCE_SIGN,WOODEN_DOOR,ACACIA_WALL_SIGN,BIRCH_WALL_SIGN,DARK_OAK_WALL_SIGN,JUNGLE_WALL_SIGN,OAK_WALL_SIGN,SPRUCE_WALL_SIGN,STONE_PLATE,IRON_DOOR_BLOCK,WOOD_PLATE,REDSTONE_TORCH_OFF,REDSTONE_TORCH_ON,DIODE_BLOCK_OFF,DIODE_BLOCK_ON

* - REQUIRED: amending towny\data\worlds\WORLDNAME.txt files:

    - All existing Towny\data\worlds\WORLDNAME.txt files should have
their plotManagementIgnoreIds lines changed to
GOLD_ORE,LAPIS_ORE,LAPIS_BLOCK,GOLD_BLOCK,IRON_ORE,IRON_BLOCK,MOSSY_COBBLESTONE,TORCH,SPAWNER,DIAMOND_ORE,DIAMOND_BLOCK,ACACIA_SIGN,BIRCH_SIGN,DARK_OAK_SIGN,JUNGLE_SIGN,OAK_SIGN,SPRUCE_SIGN,ACACIA_WALL_SIGN,BIRCH_WALL_SIGN,DARK_OAK_WALL_SIGN,JUNGLE_WALL_SIGN,OAK_WALL_SIGN,SPRUCE_WALL_SIGN,GLOWSTONE,EMERALD_ORE,EMERALD_BLOCK,WITHER_SKELETON_SKULL,WITHER_SKELETON_WALL_SKULL

* Add shulker boxes to ignore list by default.

* Add BEACON to same list.

* *HOTFIX* Fixed missing tab completions (#3728)

* Maybe fixed random tab completes not working
- addKey and removeKey return whether they were successful or not
- getStringsFromKey checks for matching case first before both cases

* javadoc for addKey and removeKey

* Fixed Trie not returning results for lower and upper case
- example: "finding "bAnA" will now return "banana" and "bANanAZ"
- it works

* - Fix for Tab Completion leaving out some towns/nations/players, as

well as caring about upper/lower-case letters, courtesy of stzups with
PR #3728.

* - Fix allowing /t buy bonus to be used when the config has

using_economy: false.

* - Fix a couple missing options not showing under /plot set perm tab

completion.

* - Add missing buy to town command tab completes.

* - Remove old new town command for admins from the /t ? help screen.

* Fixed several tab completions
- Added /ta town/nation new foo mayor
- Added /ta toggle townwithdraw/nationwithdraw
- Added /t mayor
- Added /plot perm hud

* Merge pull request #3734 from stzups/bugfix/missing-tab-completes

Fixed several tab completions

* - Fix for more tab completions, courtesy of stzups with PR #3734.

    - Closes #3733.

* Small typo fix

* Merge pull request #3736 from introvertism/patch-1

Small typo fix

* - Fix a small typo, courtesy of introvertism with PR #3736.

* 1.13.2 Alpha 8

Commit Roll-up and Testing Release for 0.96.0.0, for Spigot 1.13.2

* - Fix for Towny not clearing a residents' modes when they quit.

* Trie optimization (#3739)

* Optimized Trie by removing optionals and streams

* Remove test code, fix removeKey

* whitespace, unused commits

* Removed unnecessary newNodes.get()

* Removed labels for readability, performance is unaffected

* - Further optimize Trie used in tab completion, courtesy of stzups

with PR #3739.

* 0.95.2.22:

  - Fix /ta set capital {townname} {nationname} not working.

* possible fix for nether portals. (#3745)

* Merge pull request #3744 from TownyAdvanced/hotfix/flagwar

Hotfix: Fix Flagwar townblock town transfer.

* Marks PR's and issues as "Stale" and add PR auto labeler (#3738)

* Marks PR's and issues as "Stale"

* set "stale" time period to 90 days.

* Add labeler.yml

* Add labeler workflow.

* test workflow.

* undo last commit

* Update stale.yml to apply to objects 180 days and older.

* - Fix nether portals being created in areas the portal-creator cannot

build, courtesy of Siris with PR #3745.
    - Stops 'portal griefing'.
    - Closes #3412.
  - Fix flagwar not transferring TownBlocks correctly, courtesy of Siris
with PR #3744.
  - Add automatic labelling of PRs, automatic labelling of 'stale' to
older PRs and Issues, courtesy of Siris with PR #3738.
  - Language files bumped to 0.74.

* Merge pull request #3751 from shou692199/master

Update zh-TW.yml to 0.74

* - zh-TW.yml updated by shou692199 with PR #3751.

* Merge pull request #3750 from TownyAdvanced/hotfix/toggle_tab_complete

Fix plot toggle tab-completion and remove unused code.

* - Fix plot toggle tab-completion and remove unused code, courtesy of

silverwolfg11 with PR #3750.

* - Add database load time to startup.

* Slight change to time-to-load message formatting.

* - Fix possibility of residents getting duplicate town and nation

ranks.
  - Fix unhelpful debug messages when saving residents in sql.

* - Potential fix for /t and /n online commands not parsing their

outputs nicely.

* Merge pull request #3757 from TownyAdvanced/hotfix/townyworld_set_console

Fix townyworld set messages for console not being used.

* Merge pull request #3756 from TownyAdvanced/refactor/redundant_arraylist

Remove redundant arraylist creation for tab-completion.

* - Fix townyworld set messages for console not being used, courtesy of

silverwolfg11 with PR #3757.
  - Remove redundant arraylist creation for tab-completion, courtesy of
silverwolfg11 with #3756.

* - Fix revert-on-unclaim not respecting the PlotManagementSpeed set in

the config.
    - Closes #3759.

* - Fix Towny safe-mode induced via /ta reload still allowing Towny

commands to be used.

* - Fix Towny moving Citizens NPCs to server spawn when Towny loads in

safe mode.
    - Closes #3760.

* HotFix: Fix Ally invite sending to already allied nations. (#3755)

* Fixed problem where nation ally invite would send invite to other nation even if they were already allied.

* Remove labeler

* removed unused imports

* remove other returns in loop

* - Fix Ally invite sending to already allied nations, courtesy of Siris

with PR #3755.
    - Closes #3749.

* Merge pull request #3762 from TownyAdvanced/cleanup/raw-access-errors

remove metadata raw access warnings

* - Remove metadata raw access warnings, courtesy of Siris with PR

* Remove Nether Portal Destination Check (Revert PR 3745)

Due to an incompatibility between versions, the method used is not compatible. We are removing it from this special release.

* Alpha-Release 9 / Begin Feature Freeze

Final 'Alpha Release', barring any bug reports. No new features should be added at this time.

* Update german.yml WIP (#3758)

* Update german.yml

Part 1

* Part 2

Still not finished. My goal is to finish until end of the week

* Final Update

Ready to Merge

* - German.yml updated to 0.75 by enterih.

* Merge pull request #3770 from TownyAdvanced/feature/prenewdayevent

Add PreNewDay Event

* - API: preNewDayEvent, courtesy of silverwolfg11 with PR #3770.

    - Closes #3765.

* Delete stale.yml

Bot decided to start closing tickets.

* - Fix titles and surname losing their trailing and leading spaces.

* - Actually fix Towny preventing Citizens NPCs from loading into their

proper locations when safe mode happens.
    - Closes #3773.

* Merge branch 'master' of https://github.com/TownyAdvanced/Towny.git

* Merge pull request #3775 from shou692199/patch-1

Update zh-TW.yml

* 0.95.2.24:

  - zh-TW.yml updated by shou692199 with PR #3775.

* - Fix missing translation.

    - Closes #3777.

* - Language files bumped to 0.76

* - Language files bumped to 0.76.

* - Fix msg_changed_public in korean.yml not working.

* Merge pull request #3782 from shou692199/patch-2

Update zh-TW.yml

* - zh-TW.yml updated by shou692199 with PR #3782.

* Add town spawn events.

* add nation spawn events.

* - Fix a couple missing child nodes for permissions in the plugin.yml.

* 0.96.0.0:

  - Bump version number for release.
  - Update bukkit api to 1.15.2.

* Hotfix/javadocs (#3793)

* Add town spawn events.

* add nation spawn events.

* fixed javadocs

* revert event changes

* - Fix plot groups being sold for too much money.

* Remove debug code.

* Remove modern signs from default config. Remove unused import.

Co-authored-by: Llm Dl <LlmDlio@gmail.com>
Co-authored-by: Suneet Tipirneni (Siris) <suneettipirneni@users.noreply.github.com>
Co-authored-by: Deuphic <deuphic@gmail.com>
Co-authored-by: BannerGames <davidandrade339@gmail.com>
Co-authored-by: wolfwork <wolfwork@users.noreply.github.com>
Co-authored-by: Articdive <13535885+articdive@users.noreply.github.com>
Co-authored-by: Suneet Tipirneni (Siris) <suneettipirneni@icloud.com>
Co-authored-by: Mitsu <50143759+Mitsu13Ion@users.noreply.github.com>
Co-authored-by: 蕭澧邦 <45505768+shou692199@users.noreply.github.com>
Co-authored-by: stzups <55036602+stzups@users.noreply.github.com>
Co-authored-by: silverwolfg11 <silverwolfg11@gmail.com>
Co-authored-by: BuildTools <lemonpickles1558@gmail.com>
Co-authored-by: introvertism <xqnz@live.com>
Co-authored-by: enterih <enterih@hotmail.com>
Goosius1 pushed a commit to Goosius1/Towny that referenced this pull request Mar 19, 2020
Release contains:
- Towny 0.96.0.0
- TownyChat 0.68
- TownyNameUpdater 4.0

> Welcome to Towny 0.96.0.0. This release has some nice features added
and a mountain of fixes. Please remember that when you're updating your
config files, the only changes you *must* make are directly below in the
REQUIRED CHANGES section. All of the rest of the config additions will
be added auto-magically by Towny with their default settings. Important
links can be found at the bottom of this page, along with the actual
downloads in the Assests list.
>
> This Release marks the addition of two developers to the TownyAdvanced
organization, Siris & Silverwolfg11. You will find many great
contributions in the changelog below. If you haven't said hello to them
on the [Discord](https://discord.gg/U6FA8CG) yet, consider joining us
there.

  - REQUIRED CONFIG.YML CHANGE:
    - Villager should be added to the protection.mob_types list.
  - REQUIRED CONFIG.YML CHANGE:
    - Remove LECTERN from the protections.switch_ids list in the config.
    - This will make it possible for players to read books on lecterns
without having switch perms.
    - Players will still be unable to take the book (unless they have
destroy permissions in the plot.)
  - REQUIRED TOWNYPERMS.YML CHANGE:
    - towny.town.spawn.ally should be added to the default nation rank.
      - adding this will mean that when the config's
global_town_settings.allow_town_spawn_travel_ally will work properly
when set to true.
  - REQUIRED: amending towny\data\worlds\WORLDNAME.txt files
    - All existing Towny\data\worlds\WORLDNAME.txt files should have
their plotManagementDeleteIds lines changed to
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,TORCH,REDSTONE_WIRE,ACACIA_SIGN,BIRCH_SIGN,DARK_OAK_SIGN,JUNGLE_SIGN,OAK_SIGN,SPRUCE_SIGN,WOODEN_DOOR,ACACIA_WALL_SIGN,BIRCH_WALL_SIGN,DARK_OAK_WALL_SIGN,JUNGLE_WALL_SIGN,OAK_WALL_SIGN,SPRUCE_WALL_SIGN,STONE_PLATE,IRON_DOOR_BLOCK,WOOD_PLATE,REDSTONE_TORCH_OFF,REDSTONE_TORCH_ON,DIODE_BLOCK_OFF,DIODE_BLOCK_ON
    - All existing Towny\data\worlds\WORLDNAME.txt files should have
their plotManagementIgnoreIds lines changed to
GOLD_ORE,LAPIS_ORE,LAPIS_BLOCK,GOLD_BLOCK,IRON_ORE,IRON_BLOCK,MOSSY_COBBLESTONE,TORCH,SPAWNER,DIAMOND_ORE,DIAMOND_BLOCK,ACACIA_SIGN,BIRCH_SIGN,DARK_OAK_SIGN,JUNGLE_SIGN,OAK_SIGN,SPRUCE_SIGN,ACACIA_WALL_SIGN,BIRCH_WALL_SIGN,DARK_OAK_WALL_SIGN,JUNGLE_WALL_SIGN,OAK_WALL_SIGN,SPRUCE_WALL_SIGN,GLOWSTONE,EMERALD_ORE,EMERALD_BLOCK,WITHER_SKELETON_SKULL,WITHER_SKELETON_WALL_SKULL,SHULKER_BOX,WHITE_SHULKER_BOX,ORANGE_SHULKER_BOX,MAGENTA_SHULKER_BOX,LIGHT_BLUE_SHULKER_BOX,LIGHT_GRAY_SHULKER_BOX,YELLOW_SHULKER_BOX,LIME_SHULKER_BOX,PINK_SHULKER_BOX,GRAY_SHULKER_BOX,CYAN_SHULKER_BOX,PURPLE_SHULKER_BOX,BLUE_SHULKER_BOX,BROWN_SHULKER_BOX,GREEN_SHULKER_BOX,RED_SHULKER_BOX,BLACK_SHULKER_BOX,BEACON

  - Event War addition: town conquering:
    - If war.event.winner_takes_ownership_of_town is set to true when a
town knocks another town out of the war, the losing town will join the
winning town's nation.
    - The losing town will enter a conquered state and be unable to
leave the nation until the conquered time has passed.
    - Add conquered & conqueredDays to Towns.
    - A town's conqueredDays will decrease each Towny new day.
    - Closes ticket TownyAdvanced#3477.
  - Placeholder added: %townyadvanced_nation_tag_town_formatted%
    - Shows the nation tag and the full town name.
    - If nation tag is not set, only the town name is shown.
  - Plot PVP now takes priority over the Town setting.
    - This means that PVP can be toggled on in plots while the rest of
the Town remains PVP free.
    - The PVP toggle cooldown means this cannot be abused.
  - Add permission nodes to /t list by x and /n list by x commands.
    - You can negate the new child nodes to limit which ways players are
allowed to sort towns.
  - Made most of the unprefixed messages Towny emits use prefixes,
either [Towny], [Townname] or [Nationname].
  - Add town_block_size to bstats charts.
  - Made the town & nation levels' town, nation, capital prefixes and
postfixes support the & colour codes.
  - Add database load time to startup.

  - New Feature: Plot Groups, courtesy of Siris with PR TownyAdvanced#3578.
    - Group plots together, which can be named, sold, set with a uniform
plot type, a uniform perm line.
    - Plot Groups which are claimed or unclaimed will have confirmation
messages showing number of plots in a group, as well as cost.
    - Groups appear in the Chunk Notifications in white.
    - Already priced plots which are added to a group will increase the
group price by the plot.
    - Closes ticket TownyAdvanced#472.
  - Confirmations can now be accepted/declined/confirmed/cancelled by
clicking on the text if you use Spigot.
    - Courtesy of Siris with PRs TownyAdvanced#3631 + TownyAdvanced#3639
    - Closes TownyAdvanced#3534.
    - Commands can still be used, clicking only for spigot servers, not
craftbukkit servers.
  - New Feature: smart tab-completion of most Towny commands, courtesy
of Siris with PR TownyAdvanced#3700.
    - Closes TownyAdvanced#3314.
  - QOL interface changes/redundancy removal, courtesy of Siris with PR
  - Flesh out .gitignore with OS specific (usually hidden) files,
courtesy of Siris with PR TownyAdvanced#3706.

  - Expansion of Metadata: courtesy of Emperor-Koala with PR TownyAdvanced#3548.
    - Added the ability to expand status screens for through the use of
metadata. By giving the metadata field, a label, it will then be
displayed on the status screen for any object it is added to.
    - Added metadata to worlds, nations and residents.
    - Closes ticket TownyAdvanced#3543.
  - Added remaining ExtraFields for metadata, courtesy of Emperor-Koala
with PR TownyAdvanced#3575.

  - Implementation of a trie data structure for residents, towns, and
nations; courtesy of stzups & Siris with PR TownyAdvanced#3712.
  - Added tab completion for /invite commands, courtesy of stzups with
PR TownyAdvanced#3705.
  - Updated & smarter /nation command tab-completion, courtesy of stzups
with PR TownyAdvanced#3710.
  - Updated & smarter tab-completion for remaining commands, courtesy of
stzups with PR TownyAdvanced#3714.

  - Object Allocation on player move reduced by Silverwolfg11 in PR
  - TownyPermission data rewritten to a 2d boolean array, courtesy of
Silverwolfg11 with PR TownyAdvanced#3600.

  - Update Reserve API, courtesy of thecreatorfromhell, with PR TownyAdvanced#3612.

  - /plot group [add|new|create] [groupname]
    - Creates a plot group where a player is standing.
    - Also adds plots to existing an existing group.
  - /plot group remove
    - Removes the plot you're standing in from its group.
  - /plot group rename [newname]
    - Renames a plot group.
  - /plot group set perm ....
    - Used to set the perm line of a group you are standing in.
  - /plot group set [townblocktype]
    - Used to set a group of plots to a shop, farm, embassy, etc.
  - /plot group toggle [fire|mobs|pvp|explosions]
    - Set the toggleable settings for townblocks across the entire
group.
  - /plot group [forsale|fs] [price]
    - Sets the group for sale at the set price.
  - /plot group [notforsale|nfs]
    - Sets the group not for sale.
  - /townyadmin nation new {name} {capital}
    - Creates a nation for the specified town.
    - Does not charge the town money.

  - war.event.winner_takes_ownership_of_town
    - default: false
    - If set to true when a town knocks another town out of the war, the
losing town will join the winning town's nation.
    - The losing town will enter a conquered state and be unable to
leave the nation until the conquered time has passed.
  - war.event.conquer_time
    - default: 7
    - Number of Towny new days until a conquered town loses its
conquered status.
  - notification.town_names_are_verbose
    - Default: true
    - When set to true, town's names are the long form
(townprefix)(name)(townpostfix) configured in the town_level section.
    - When false, it is only the town name.
  - notification.notifications_appear_in_action_bar
    - default: true
    - This setting only applies to servers running spigot, paper or
bungeecord.
    - On servers using craftbukkit.jar the notifications will always
appear in the chat.
    - When set to false the notifications will appear in the chat rather
than the action bar.
    - Closes TownyAdvanced#3636.

  - Changed required permission node for using /ta from towny.admin to
towny.command.townyadmin
    - Fixes scenario where an admin has other /townyadmin permission
nodes but not towny.admin.

  - towny.command.townyadmin
    - Used to view the /townyadmin screen.
    - Gateway permission node to all other townyadmin sub-commands
    - Child node of towny.command.townyadmin.*
  - towny.command.townyadmin.nation.new
    - Allows the use of the /ta nation new {name} {capital} command.
  - Child nodes of towny.command.nation.list, no townyperms.yml update
required.
    - towny.command.nation.list.residents
    - towny.command.nation.list.towns
    - towny.command.nation.list.open
    - towny.command.nation.list.balance
    - towny.command.nation.list.name
    - towny.command.nation.list.townblocks
    - towny.command.nation.list.online
  - Child nodes of towny.command.town.list, no townyperms.yml update
required.
    - towny.command.town.list.residents
    - towny.command.town.list.open
    - towny.command.town.list.balance
    - towny.command.town.list.name
    - towny.command.town.list.townblocks
    - towny.command.town.list.online

  - Added TownPreUnclaimEvent
    - Useful for getting the TownBlock object that will be unclaimed.
    - Cancellable but probably not a good idea.
  - Create ResidentUtil for resident-related methods.
  - Added TownyMessaging.sendPlainGlobalMessage() which doesn't use the
[Towny] prefix.
  - Create resident.getNamePostfix() & resident.getNamePrefix() for
gather pre/postfixes of kings and mayor residents

  - Reorganization of TownyFormatter, courtesy of Siris with PR TownyAdvanced#3715.
    - Deprecates a couple things that other plugins are unlikely to be
using, notes were made for new replacements.
  - API: PreNewTownEvent, courtesy of Siris with PR TownyAdvanced#3606.
    - Cancellable event.
  - Eco backend refactor courtesy of Siris with PR TownyAdvanced#3663.

  - Courtesy of Emperor-Koala with PR TownyAdvanced#3566:
    - API:
      - NationPreAddEnemyEvent - Cancellable
      - NationAddEnemeyEvent
      - NationPreRemoveEnemyEvent - Cancellable
      - NationRemoveEnemyEvent
      - New methods to get the cells under attack in Flag War.

  - Pom updates for javadocs courtesy of FlagCourier with PR TownyAdvanced#3672.

  - API: preNewDayEvent, courtesy of silverwolfg11 with PR TownyAdvanced#3770.
    - Closes TownyAdvanced#3765.

  - Fixed: Villagers protected from damage by other Entities when not
configured to be protected.
    - Pillagers were unable to harm villagers, even when villagers were
not in the protected list.
    - Closes TownyAdvanced#3580.
  - Fix keep inventory and keep experience features.
    - Closes ticket TownyAdvanced#3551.
  - Fix edge-case scenario where revoking invites couldn't be done
because we were matching the wrong player.
    - Closes TownyAdvanced#3635.
  - Fix message shown when a player tries to set their nation spawn in
the wilderness.
    - Closes TownyAdvanced#3640.
  - Fix for trees and mushrooms growing into plots they shouldn't.
    - Closes TownyAdvanced#3641.
  - Fix /ta set throwing error.
    - Closes ticket TownyAdvanced#3565.
  - Fixed explosion regen deleting the contents of BlockInventoryHolders
(chests, furnaces, hopper and more.)
    - Closes tickets TownyAdvanced#3569, TownyAdvanced#3570.
  - Fix Mysql databases not creating plotblocksnapshot files.
    - Closes TownyAdvanced#3589.
  - Fix WARZONE status overriding the allow_block_griefing: false
setting.
    - Closes TownyAdvanced#3577.
  - Fix Mysql databases not purging fallen towns.
    - Closes TownyAdvanced#3610.
  - Fix town_plotbased_upkeep_minimum_amount not working when
town_plotbased_upkeep_affected_by_town_level_modifier is set to false.
    - Closes TownyAdvanced#3616.
  - Fix renaming towns which have 0 plot groups.
    - Closes TownyAdvanced#3626.
  - Fix /ta town {townname} {command} not showing anything helpful when
the {command} used is not a valid command.
    - Closes TownyAdvanced#3667.
  - Fix ranks not being capitalized on /res, /town and /nation screens.
    - Closes TownyAdvanced#3669.
  - Fix for single-town nations when the winner_takes_ownership_of_town
is true.
    - Closes TownyAdvanced#3678.
  - Removed unneeded permission check for /n spawn.
    - towny.command.nation.spawn node is no longer tested for.
    - towny.nation.spawn.* nodes still remain in use.
  - Fix CombatUtil not disabling PVP in townblocks where PVP is off,
when PVP is still on in the town.
    - Towns will no longer override PVP settings for townblocks.
    - The below 3 fixes were required after adjusting this.
  - Fix lack of message when an unjailed player uses /res jail foo.
    - Closes TownyAdvanced#3726.
  - Fix revert-on-unclaim not respecting the PlotManagementSpeed set in
the config.
    - Closes TownyAdvanced#3759.
  - Fix Towny moving Citizens NPCs to server spawn when Towny loads in
safe mode.
    - Closes TownyAdvanced#3760, TownyAdvanced#3773.
  - Fix missing translation.
    - Closes TownyAdvanced#3777.
  - Fix using /plot perm in the wilderness just returning '[Towny] Not
registered' message. Towny will now display the World status page.
  - Fix ChunkNotification not displaying change of PVP status when
moving between two townblocks with differing PVP settings.
  - Fix /plot perm hud not displaying PVP setting for plots correctly.
  - Fix for eventwar war participants message using two lines when it
ought to only use one.
  - Fix eventwar wars that don't start properly leaving remainders in
the warringsTowns and warringNations.
  - Fix WARZONE status being given to townblocks when war is not active.
  - Improve debug messaging on flatfile database load.
  - Fix plot groups whose town doesn't exist anymore causing safe mode.
  - Translated cannot-kick-that-resident strings.
  - Fix bug with /plot group set {plottype}
  - Disallowed the use of /plot group set jail, jails can only be set
before grouping.
  - Fix plot groups not loading after server stop and start.
  - Clear out warringNations & warringTowns on war end.
  - Make sure world is properly handled when a town renames itself.
  - Fix /ta plot ? help screen.
  - Fix Null message when plots were claimed/unclaimed.
  - Fix error message for the /plot fs when used on a plot group.
  - Fix false-positive being shown when using /plot nfs on a plot group.
  - Fix error shown in console when entering a plot that is for sale but
is not part of a plot group.
  - Fix successful message when
economy.new_expand.price_claim_townblock_refund is set to a negative
value.
  - Fix no message being shown when an invalid subcommand of "/plot
group" is used.
  - Fix /ta rename not passing on NPC status to residents.
  - Fix /plot set perm showing the opposite PVP setting in its final
output.
  - Fix towny.admin players being limited by pvp cooldown timer.
  - Fix town/nation permissions missing on the /plot perm hud
scoreboard.
  - Fix NPE shown when player is using /plot perm hud, but has another
plugin's scoreboard show up.
  - Fix missing town/nation key values on /plot perm hud.
  - Fix missing townblock type on /plot perm hud.
  - Fix /n new name with out underscores not parsing spaces into
underscores.
  - Fix for revoking town invites on a player not actually revoking the
invite.
  - Fix null response when sending an invite to an offline player.
  - Fix lag caused by /t list and /n list.
  - Changed message shown at the end of the new day to print in the log
regardless of debug mode being true.
  - Readd economy lookups for town and nation banks, deprecated.
  - Fix for potentially causing too many file open exceptions on servers
with large databases and small Open File Limits.
  - Fix bug where renamed towns and nations would lose their bank
balances, introduced in 0.95.2.13.
  - Fix death_payments feature not working on mob-kills of players.
  - Fix PlayerCommandPreprocessEvent error seen in log when players chat
while Towny is in safe mode.
  - Fix edge-case scenario where a townblock could be null when listing
outposts.
  - Fix DailyTimerTask not resetting cosmetic list of removedTowns,
removedNations, totalUpkeeps.
  - Fix towns being kicked from a nation for non-payment of taxes being
included in the removedTowns.
  - Fix possible NPE when Nation taxes were collected from towns.
  - Fix BED_BLOCK in the default config's
new_world_settings.plot_management.block_delete.unclaim_delete list.
  - Fix Wither Skulls & Shulker Boxes not being in the
new_world_settings.plot_management.revert_on_unclaim.block_ignore list.
  - Fix allowing /t buy bonus to be used when the config has
using_economy: false.
  - Fix a couple missing options not showing under /plot set perm tab
completion.
  - Fix for Towny not clearing a residents' modes when they quit.
  - Fix /ta set capital {townname} {nationname} not working.
  - Fix possibility of residents getting duplicate town and nation
ranks.
  - Fix unhelpful debug messages when saving residents in sql.
  - Potential fix for /t and /n online commands not parsing their
outputs nicely.
  - Fix Towny safe-mode induced via /ta reload still allowing Towny
commands to be used.
  - Fix titles and surname losing their trailing and leading spaces.
  - Fix msg_changed_public in korean.yml not working.
  - Fix a couple missing child nodes for permissions in the plugin.yml.

  - Fix nether portals being created in areas the portal-creator cannot
build, courtesy of Siris with PR TownyAdvanced#3745.
    - Stops 'portal griefing'.
    - Closes TownyAdvanced#3412.
  - Fix for spawners not reverting properly courtesy of Siris with PR
    - Closes TownyAdvanced#3627.
  - Fix for plot groups sometimes throwing a CommandException, courtesy
of Siris with PR TownyAdvanced#3597.
    - Closes TownyAdvanced#3601.
  - Fix Ally invite sending to already allied nations, courtesy of Siris
with PR TownyAdvanced#3755.
    - Closes TownyAdvanced#3749.
  - Fix for 0.95.2.8 not running on Craftbukkit servers, courtesy of
Siris with PR TownyAdvanced#3642.
  - Fix NPE when '/plot group add' was used without any name, courtesy
of Siris with PR TownyAdvanced#3630.
  - Fix for /ta town meta not working on towns the admin doesnt own,
courtesy of Siris with PR TownyAdvanced#3549.
  - Fix for town invites from nation, courtesy of Siris with PR TownyAdvanced#3653.
  - Fix logger, courtesy of ArticDive/Siris with PR TownyAdvanced#3664.
  - Readd pay() and collect() to Towns and Nations, deprecated, courtesy
of Siris with PR TownyAdvanced#3697.
  - Fix any *possible* NPE's in NameUtil, courtesy of Siris with PR
  - Fix flagwar not transferring TownBlocks correctly, courtesy of Siris
with PR TownyAdvanced#3744.
  - Remove metadata raw access warnings, courtesy of Siris with PR

  - Pom and pom_deb updates by TheFlagCourier with PR TownyAdvanced#3632.
    - Javadocs should only build on the install phase.
    - Github actions should again function properly.
  - Fix for javadocs courtesy of TheFlagCourier with PR TownyAdvanced#3655.
  - Github Actions workflow adjustment courtesy of TheFlagCourier with
PR TownyAdvanced#3654.
  - Fix 'msg_modes_set' in ResidentCommand not being used for
translation, courtesy of TheFlagCourier with PR TownyAdvanced#3658.

  - Fix for more tab completions, courtesy of stzups with PR TownyAdvanced#3734.
    - Closes TownyAdvanced#3733.
  - Fix for root cause of issue solved with TownyAdvanced#3724, courtesy of stzups
with PR TownyAdvanced#3725.
  - Fix for Tab Completion leaving out some towns/nations/players, as
well as caring about upper/lower-case letters, courtesy of stzups with
PR TownyAdvanced#3728.
  - Further optimize Trie used in tab completion, courtesy of stzups
with PR TownyAdvanced#3739.

  - Fixes for Nation_Zones not working/not giving capitals their proper
bonus, courtesy of Goosius with PR TownyAdvanced#3567.

  - Missing apostrophe in error message fixed by Deuphic with PR TownyAdvanced#3645.

  - Continue != break, courtesy of creatorfromhell with PR TownyAdvanced#3690.

  - Fix to the preventPVP function, allowing for towns with PVP off to
set PVP true on individual plots, courtesy of silverwolfg11 with PR
  - Fix plot toggle tab-completion and remove unused code, courtesy of
silverwolfg11 with PR TownyAdvanced#3750.
  - Fix townyworld set messages for console not being used, courtesy of
silverwolfg11 with PR TownyAdvanced#3757.
  - Remove redundant arraylist creation for tab-completion, courtesy of
silverwolfg11 with TownyAdvanced#3756.

  - Fix a small typo, courtesy of introvertism with PR TownyAdvanced#3736.

  - Bump language files to 0.76
  - New Language: Portuguese (Brazilian) Translation, courtesy of
BannerGames with PR TownyAdvanced#3603.
    - use pt-br.yml as your language in the config to enable.
  - New Language: Taiwanese courtesy of shou692199 with PR TownyAdvanced#3689.
    - set language: zh-TW.yml in config to use.
  - PT-BR.yml updated by BannerGames with PR TownyAdvanced#3647.
  - Korean.yml updated by wolfwork with PR TownyAdvanced#3651.
  - Fix french.yml not parsing.
  - French translation updated by Mitsu13Ion with PR TownyAdvanced#3614 & TownyAdvanced#3680.
  - Chinese translation updated by qsefthuopq with PR TownyAdvanced#3703.
  - German.yml updated to 0.75 by enterih.

v0.64:
  - Removed "[Towny] Modes set: " line seen when a player changes
channels.

v0.65:
  - Altered behaviour:
    - Previously using the channel command for the channel you're
already speaking in would move you to the next default channel,
      or if non was found, the next global channel.
    - Ex: While being in townchat you use "/tc" you could find yourself
in globalchat.
    - Now you will be told you're already in the channel you just used
the command to enter into.
  - Fixed: GLOBAL channelTypes (default: general and local channels) are
no longer formatted by TownyChat if modify_chat.enabled is false.
    - DEFAULT, TOWN, NATION & ALLIANCE types are still formatted by
Towny when modify_chat.enable is false.
    - Closes: TownyAdvanced#3568

v0.66:
  - Fix for removed TownyFormatter methods, required for Towny 0.95.2.18
and newer.

v0.67:
  - Fix for TownyChat overwriting towny_default_modes player modes on
login.

v0.68:
  - Updated comments to reflect change with toggling chats, courtesy of
GenSecrets with PR TownyAdvanced#25.

sponsor](https://github.com/sponsors/LlmDl)

<blockquote>

<a title="Towny Changelog"
href="https://raw.githubusercontent.com/TownyAdvanced/Towny/master/resources/ChangeLog.txt"
target="_blank" rel="noopener">Click Here for a full changelog</a>

<a title="Install Guide"
href="https://github.com/TownyAdvanced/Towny/wiki/Installation">Towny
Install Guide</a>
<a title="Updating Towny"
href="https://github.com/TownyAdvanced/Towny/wiki/Updating-Towny">How to
Update and Existing Towny</a>
<a title="Permission Nodes"
href="https://github.com/TownyAdvanced/Towny/wiki/Towny-Permission-Nodes">Towny
Permission Nodes</a>
<a title="How Towny Works"
href="https://github.com/TownyAdvanced/Towny/wiki/How-Towny-Works">How
Towny Works</a>
@LlmDl LlmDl deleted the hotfix/NPE-tab branch March 19, 2020 11:56
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.

Exception when player attempted to tab complete
2 participants