-
-
Notifications
You must be signed in to change notification settings - Fork 355
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 Console not Showing Errors #3961
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ghost
requested a review
from LlmDl
April 29, 2020 02:09
ghost
self-assigned this
Apr 29, 2020
ghost
changed the title
fix console not getting NotRegisteredException on commands
Fix Console not Showing Errors
Apr 29, 2020
LlmDl
approved these changes
Apr 29, 2020
Goosius1
pushed a commit
to Goosius1/Towny
that referenced
this pull request
Jun 29, 2020
Release contains: - Towny 0.96.2.0 - TownyChat 0.71 - TownyNameUpdater 5.0 |Welcome to Towny 0.96.2.0.| | ---- | | This marks the second Minor Release post-0.96.0.0. Continuing with our plan is to put out smaller releases more frequently so that it is easier for server admins to update.| | 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. | | If you're upgrading from 0.96.1.0 there are 2 REQUIRED changes. | ---- <details open> <summary>⚠️ REQUIRED Changes</summary> - REQUIRED CHANGE: at protection.item_use_ids - add ,DIAMOND_AXE,GOLDEN_AXE,IRON_AXE,WOODEN_AXE,STONE_AXE - will prevent players from stripping logs in unwanted locations. - REQUIRED CONFIG CHANGE: add ,LEAD,SWEET_BERRY_BUSH to the end of the protection.switch_ids list. </details> ---- <details open> <summary> ➕ Added</summary> - TownBlocks database refactor: - TownBlocks are no longer saved to a TownyWorld. - They are now saved to the Town. - This allows for much easier saving operations. - For flatfile databases: towny\data\townblocks.txt no longer used (you may delete this after updating.) - When townblocks are unclaimed they are now moved to a towny\data\townsblocks\WORLDNAME\deleted\TOWNNAME\ folder. - This allows for easy restoration of townblocks which do get removed, whatever the cause. - This will hopefully end the occurance of disappearing townblocks and fix the following tickets: TownyAdvanced#3783 TownyAdvanced#3796 TownyAdvanced#3813 TownyAdvanced#3821 TownyAdvanced#3844. - This refactor has been tested fairly thoroughly, but it is always advised to back up your server before updating Towny. - New Feature: movement-cancels-spawn-warmup. - Will not affect players with the towny.admin node. - Removes essentials from the SpawnUtil. - Closes TownyAdvanced#3619. - Allow for other plugins to modify the TownPreClaim cancellation message. - Closes TownyAdvanced#3814. - Add /ta unclaim & /plot unclaim tab completes. - Closes TownyAdvanced#3883. - Add ignoreCancelled=true to onPlayerTakeLecternBookEvent to prevent Towny overriding plugins who've already stopped taking a book. - Closes TownyAdvanced#3894. - Add Placeholders: - %townyadvanced_town_ranks% - Displays either Mayor, or the various town ranks a player has or nothing if they have none. - %townyadvanced_nation_ranks% - Displays either King, or the various nation ranks a player has or nothing if they have none. - Closes TownyAdvanced#3695. - Added Placeholder: %townyadvanced_player_status% - Displays Nomad, Resident, Mayor or King, depending on what position the player is in. - Closes TownyAdvanced#3907. - Added: For the nation-requires-proximity feature: - Moving homeblocks will now tell the mayor if their town will leave their nation for moving too far from the homeblock. - Moving homeblocks will now tell the king if any of their towns will leave their nation for moving their homeblock too far away. - Merging nations will now be made aware if any of the towns will leave the prevailing nation when the two nations merge. - Add confirmations to town and nation renames if their costs are higher than 0. - Add confirmations to /plot set type when costs are higher than 0. - Add confirmation to /town buy bonus command. - Add confirmation of cost for /plot claim command when plots are priced higher than 0. - Add cost confirmations to /t new and /n new commands. - Added advice message to mayor when they create their town, advising them about upkeep, depositing money and when the next upkeep will be taken. - Closes TownyAdvanced#3843. - Unify code called when explosions are being reverted and ProtectionRegenTasks are created. - Explosion code clean up. - Add Essentials to soft-depends. - Changed: Whether someone light a Nether Portal, they will now have to be able to build NETHER_PORTAL blocks rather than OBSIDIAN blocks. - This means that servers who want players to be able to make nether portals to a world where they do not grant towny.wild permissions will be able to build a portal. - The node required to build a portal that would connect into the wilderness would be towny.wild.build.NETHER_PORTAL. - This means servers that do not grant wild permissions do not have to give towny.wild.build.OBSIDIAN, which would mean players could place obsidian anywhere in the wild. - Changed: towns in the same nation now bypass the min_distance_from_town_homeblock & min_plot_distance_from_town_plot config values. - Allows for nations to connect seamlessly while still keeping towns not in the same nation from claiming close to each other. - Closes TownyAdvanced#3913. - Add UUIDs to resident objects, for the day we need to convert databases to UUIDs. - Add bstats metric to help track UUID gathering. - Make /ta reload more specific, courtesy of Siris with PR TownyAdvanced#3851. - Command now breaks into 5 subcommands: /ta reload <database|perms|config|lang|all> - Add separate tax limits for towns, nations and townblocks, courtesy of Siris with PR TownyAdvanced#3860. - The old max_tax_amount is removed. - Use Paperlib for Async Chunk Loading, courtesy of Siris with PR - Servers using Paper will benefit from faster chunk loading when players are teleported via Towny. - Revamped Confirmation system, courtesy of Siris with PR TownyAdvanced#3892. - Add confirmation of cost for spawn commands when costs are higher than 0, courtesy of Siris with PR TownyAdvanced#3861. - Closes TownyAdvanced#3828. - Cost confirmation added to /plot set outpost, courtesy of Siris with PR TownyAdvanced#3900. - Clickable navigation arrows on /n list and /t list pages, courtesy of Siris with PR TownyAdvanced#3937. - Requires using Spigot or Paper or equivalent. - Closes TownyAdvanced#3853. - Allow only language unicode, courtesy of Siris with PR TownyAdvanced#3943. - Stop players using emojis in their town and nation names. - New Configs will have the following regex, which you can add manually or have Towny add it by itself by removing the regex section of your config.yml. - New Default: ``` regex: name_filter_regex: '[\\\/]' name_check_regex: ^[\p{L}a-zA-Z0-9._\[\]-]*$ string_check_regex: ^[a-zA-Z0-9 \s._\[\]\#\?\!\@\$\%\^\&\*\-\,\*\(\)\{\}]*$ name_remove_regex: '[^\P{M}a-zA-Z0-9\&._\[\]-]' ``` - Add javadocs to maven, courtesy of Siris with PR TownyAdvanced#4049. - Use mvn clean install to build javadocs. - Taxpercent capping, courtesy of Siris with PR TownyAdvanced#3969. - Closes TownyAdvanced#3967. - Switch to JitPack and Remove GH packages dependencies, courtesy of Siris with PR TownyAdvanced#4038. - Cleanup/Micro-optimization pull request, courtesy of Silverwolfg11 with PR TownyAdvanced#3866. - Cleanup and microperformance pull request, courtesy of Articdive with PR TownyAdvanced#3802. - Added: Dynamic Nation Colours, courtesy of Goosius with PR TownyAdvanced#3869. - using /n set mapcolor, nations can set their own colour on dynmap-towny webpages. - list of available colours to be used is set in the config.yml at global_nation_settings.allowed_map_colors - Confirmation and invitations are now translatable, courtesy of v3Monsta with PR TownyAdvanced#3938. - Allow TownyMessaging to use more than 54 characters per line, courtesy of v3Monsta with PR TownyAdvanced#3946. </details> ---- <details> <summary>✨ New Commands</summary> - /t set taxpercentcap {amount} - Mayor command to set the maximum amount that can be taken when taxpercent is enabled. - /n set mapcolor {color} - Used by a king to set their colour seen on dynmap-towny webpages. - /ta town [town] outlaw [add|remove] [name] - Allows admins to add/remove outlaws from a town. - Closes TownyAdvanced#3778. - /ta depositall [amount] - Adds amount to all towns' and all nations' banks. - Requires towny.command.townyadmin.depositall, which is a child node of towny.command.townyadmin.*. - /ta nation [nationname] kick [towns...] - Allows admins to remove towns from a nation. - Closes TownyAdvanced#4050. - /ta town [townname] leavenation - Allows admins to make a town leave their nation. </details> ---- <details> <summary>✨ Changed Commands</summary> - /ta reload - /ta reload {database|db} - reloads the database. - /ta reload {perms|townyperms|permissions} - reloads townyperms.yml - /ta reload config - reloads the config & language file. - /ta reload lang - reloads the language file. - /ta reload all - reloads everything like /ta reload used to do. </details> ---- <details> <summary> 📕 New Config Options</summary> - max tax amounts - economy.daily_taxes.max_plot_tax_amount - default: 1000.0 - Maximum tax amount allowed for townblocks sold to players. - economy.daily_taxes.max_town_tax_amount - default: 1000.0 - Maximum tax amount allowed for towns when using flat taxes. - economy.daily_taxes.max_nation_tax_amount - default: 1000.0 - Maximum tax amount allowed for nations when using flat taxes. - economy.daily_taxes.max_town_tax_percent - default: 25 - Maximum tax percentage allowed when taxing by percentages for towns. - global_town_settings.maximum_number_residents_without_nation - default: 0 - When set above zero this is the largest number of residents a town can support before they join/create a nation. - Do not set this value to an amount less than the global_town_settings.required_number_residents_join_nation. - Do not set this value to an amount less than the global_town_settings.required_number_residents_create_nation. - This will not remove residents from nation-less towns that are already above the limit, they will not be able to invite more. - Closes TownyAdvanced#3720. - plugin.day_timer.delete_0_plot_towns - Default: false - Whether towns with no claimed townblocks should be deleted when the new day is run. - Closes TownyAdvanced#3746. - global_town_settings.damage_cancels_spawn_warmup - Default: false - When set to true, if players are damaged in any way while in a spawn warmup, their spawning will be cancelled. - Closes TownyAdvanced#3916. - global_town_settings.movement_cancels_spawn_warmup - Default: false - When set to true, if players are currently in a spawn warmup, moving will cancel their spawn. - town.min_distances_ignored_for_towns_in_same_nation - default: true - If true, the below settings: min_plot_distance_from_town_plot and min_distance_from_town_homeblock will be ignored for towns that are in the same nation. Setting to false will keep all towns separated the same. - Closes TownyAdvanced#3983. - economy.daily_taxes.max_town_tax_percent_amount - Default: 10000 - Controls the highest amount of money that can be taken from a tax percentage on a resident. - global_nation_settings.allowed_map_colors - default: aqua:00ffff, azure:f0ffff, beige:f5f5dc, black:000000, blue:0000ff, brown:a52a2a, cyan:00ffff, darkblue:00008b, darkcyan:008b8b, darkgrey:a9a9a9, darkgreen:006400, darkkhaki:bdb76b, darkmagenta:8b008b, darkolivegreen:556b2f, darkorange:ff8c00, darkorchid:9932cc, darkred:8b0000, darksalmon:e9967a, darkviolet:9400d3, fuchsia:ff00ff, gold:ffd700, green:008000, indigo:4b0082, khaki:f0e68c, lightblue:add8e6, lightcyan:e0ffff, lightgreen:90ee90, lightgrey:d3d3d3, lightpink:ffb6c1, lightyellow:ffffe0, lime:00ff00, magenta:ff00ff, maroon:800000, navy:000080, olive:808000, orange:ffa500, pink:ffc0cb, purple:800080, violet:800080, red:ff0000, silver:c0c0c0, white:ffffff, yellow:ffff00 - This setting determines the list of allowed nation map colors. - The color codes are in hex format. </details> ---- <details> <summary> 📕 Changed Config Options</summary> - town.default_taxes.taxpercentage - Default value changed from false to true. - Will no affect existing configs. - New config files will have taxpercentage on by default, which means new towns will start with taxpercent enabled. - Removed Config Option: economy.daily_taxes.max_tax_amount - Replaced by the above new config options. </details> ---- <details> <summary>🔑 Changed Permission Nodes</summary> - None. </details> ---- <details> <summary>🔑 New Permission Nodes</summary> - towny.command.nation.set.mapcolor - Child Node of towny.command.nation.set.* - Existing installs do not have to grant this node to Kings, they will already inherit it as long as they have the above node. - towny.command.plot.group.* - Child Nodes: - towny.command.plot.group.add: true - towny.command.plot.group.remove: true - towny.command.plot.group.rename: true - towny.command.plot.group.set: true - towny.command.plot.group.toggle: true - towny.command.plot.group.forsale: true - towny.command.plot.group.notforsale: true - towny.admin.spawn - Grants admin spawn priviledges, without cooldowns/warmups/spawncosts. - Child Node: towny.command.townyadmin.town.spawn.freecharge - Is itself a childnode of towny.admin. - Closes: TownyAdvanced#3936. - towny.command.town.set.taxpercentcap - Child node of towny.command.town.set.* - Required to use /town set taxpercentcap [amount] </details> ---- <details> <summary>🔑 Removed Permission Nodes</summary> - towny.command.townyadmin.town.spawn - towny.command.townyadmin.nation.spawn - Replaced by the towny.admin.spawn node. </details> ---- <details> <summary>💻 API Changes</summary> - API: Added to TownyAPI, hasNationZone(Location) and hasNationZone(WorldCoord) which will return either TownBlockStatus.UNCLAIMED_ZONE or TownBlockStatus.NATION_ZONE. - API: Added to TownyAPI, isNationZone(Location), returns true if it is in a nation zone. - API: Added NationBonusCalculationEvent, courtesy of Silverworldg11 with PR TownyAdvanced#3873. - Allows plugins to modify the nation bonus returned by a nation. - This is a particularly useful if plugins want to add nation bonus blocks based on their own specific criteria rather than what is determined by Towny config. - API: new PlotPreChangeTypeEvent, courtesy of rebstew with PR TownyAdvanced#3995. - Cancellable event that plugins can use to stop players from changing a plot type. </details> ---- <details> <summary>🔧 Fixed</summary> - Fix EventWar bug when winner_takes_ownership_of_townblocks is true. - Closes TownyAdvanced#3862. - Fix message output when a single town or nation is fallen because of upkeep costs. - Closes TownyAdvanced#3856. - Fix SQL saveAllTownBlocks() returning false all of the time, preventing a server from switching from flatfile to mysql storage. - Closes TownyAdvanced#3864. - Fix regression in PVP world settings. - It is now again possible to have PVP false in a world, but let the town/townblock override that. - Closes TownyAdvanced#3863. - Fix /plot set TYPE, always trying to pay into the closed_economy SERVER_ACCOUNT, even when closed_economy is false. - Closes TownyAdvanced#3870. - Fix onStructureGrow NPE seen in logs. - Fix negative upkeep feature not working any longer. - Closes TownyAdvanced#3874. - Fix some untranslatable strings in the PlayerCacheUtil. - Fix /plot set perm on|off not giving feedback and saving. - Fix /plot group commands missing their permission nodes. - Remove /town unclaim outpost from /town unclaim ? - Fix: nation-requires-proximity feature should be working much better now. - Fix /t buy bonus command not working after cost confirmation added. - Fix some costs in confirmations not being formatted by the TownyEconomyHandler. - Properly delete townblocks which belong to towns that no longer exist. - This will clear up ghost-townblocks which appear as NPEs in ChunkNotifications, as well as make some townblocks un-claimable. - Closes TownyAdvanced#3911, TownyAdvanced#3771. - Fix mysql DB's towns losing residents on load. - Fixed loading townblocks that do not use the config's current town_block_size. - These townblocks will not be loaded into memory, but will remain in the database in case someone switches their town_block_size without realizing what it would do. - Closes TownyAdvanced#3924. - Fixed ChunkNotifications in the action_bar set to last for 3 or less seconds causing NPEs. - Closes TownyAdvanced#3923. - Fix mysql DB's nation's losing many of their settings. - Fix german lang file. - Make sure clickable texts are using the full command and not shortened versions. - Fix nations being able to kick towns from their nation during war. - To prevent nations not having to defend all of their towns in war. - Fix non-warring Towns from still being able to be considered as attackers in Event war. - Fix flying players being able to count as townblock attackers/defenders in Event war. - Fix resident's Town and Nation ranks being able to double up, which caused rare issues with TownyNameUpdater. - Also catching the ConcurrentModificationException if it does somehow occur again. - Closes TownyAdvanced#3912. - Fix movement-cancels-spawning showing cancel message when because you waited patiently and spawned. - Fix out-dated comments in config re: spawning costs. - Fix missing command-feedback when using some towny commands in the console, courtesy of Siris with PR TownyAdvanced#3961. - Closes TownyAdvanced#3957. - Fix newly-joined players not having their lastOnline value not set. - Fix residents.txt causing safemode for having a resident listed more than once. - Also removes doubled up residents from the residents.txt when saving. - Fix min_distance_between_homeblocks likely not working very well. - Fix DrawSmokeFactory offset to move smoke puffs up from inside the blocks. - Fix ghost townblocks that are missing a town not being deleted at startup. - Fix MobRemovalTask not appreciating when a world's worldmobs setting is off. - Fix Slimes trampling on crops not abiding a world's creaturetrampling setting. - Also cleans up croptrampling code from out of the TownyPlayerListener & lets us drop the TownyWorld from the onPlayerSwitchEvent. - Fix Ravagers breaking leaves/crops and what not when world's creaturetrampling setting is off. - Closes TownyAdvanced#3975. - Fix underscores showing in title messages when entering and leaving towns, as well as in PAPI placeholders. - Close TownyAdvanced#3985. - Fix /ta town NAME toggle not being friendly towards many /t toggle subcommands. - Additionally commands should display proper feedback. - Fix regression in DisablePlayerTrampling which prevented crop trampling being prevented. - Fix case in TownyPlayerListener that could result in an NPE. - Closes TownyAdvanced#4002. - Fix cost confirmation showing when new town or new nation prices are set to 0. - Fix plot groups not showing the correct pvp setting when /plot group set perm command is used. - Closes TownyAdvanced#4000. - Fix getTownBlockStatus that affect Citizens2 NPCs from displaying "Failed to fetch resident: name" in the log. - Fix bad PlotBlockData preventing a town from being deleted. - Fix Leash_Hitches entities being unprotected from right-click-removals. - Allowed outsiders to steal animals. - Closes TownyAdvanced#4028. - Fix Towny loading bad townyperms.yml files. - Towny will now enter safe mode if the townyperms.yml file will not load correctly. - This step is being taken because under certain circumstances it would cause Towny to harm it's own database when loading. - Fix Towny not refreshing the permissions of online players when /ta reload perms is used. - Fix /res set perm command not applying the new /res perm line to all unchanged resident-owned townblocks. - Fix board messages being able to set to strings longer than TownyFormatter can display. - Closes TownyAdvanced#4039. - Fix /towny top land resident throwing an internal error. - Closes TownyAdvanced#4045. - Fix PlayerCacheUtil looking for a non-existant language string. - Fix Townblocks having their mob setting overridden by the Towns' mob setting in scenarios where the town has mobs on, but the townblock has mobs off. - Closes TownyAdvanced#4067. - Fix mayors and kings not paying the bail costs specified in the config. - Fix friendly fire not being respected during wars. - Fix players being pulled around by fishing hooks in non-PVP plots. - Closes TownyAdvanced#4092. - Fix sentinalpvp bots causing NotRegisteredExceptions. - Fix friend and outlaw lists being able to be fed invalid resident names. - Closes TownyAdvanced#4097. - Fix unhelpful getHomeBlock exception message. - Fix for Nation&TownSpawnEvents causing titles/chunknotifications early, courtesy of Siris with PR TownyAdvanced#3872. - Fix for non-empty saving queues not finishing on shutdown, courtesy of Siris with PR TownyAdvanced#3877. - Credit to Silverwolfg11 for finding above issue. - Fix overlapping confirmations properly cancelling previous ones, courtesy of Siris with PR TownyAdvanced#3902. - Fix mysql DB's nation's not loading their registered date or metadata, spotted by Silverwolfg11. - Fix for /plot set reset, courtesy of Silverwolfg11 with PR TownyAdvanced#4026. - Fix issue where a badly configured townyperms.yml causes DB failure, courtesy of Goosius1 with PR TownyAdvanced#4003. - Fix "Modes set: " appearing when there are no modes to set, courtesy of v3Monsta with PR TownyAdvanced#3941. - Closes TownyAdvanced#3857. </details> ---- <details> <summary>🌏 Language Updates</summary> - Language files bumped to 0.83. - polish.yml added courtesy of Martinez. - pt-br.yml updated to 0.77 courtesy of bane with PR TownyAdvanced#3865. - pt-br.yml updated to 0.83, courtesy of vsdepontes with PR TownyAdvanced#4029. - French.yml updated to 0.82, courtesy of Yldales with PR TownyAdvanced#3958. - russian.yml updated to 0.83 courtesy of Egor33345. - zh-tw.yml updated by shou692199 with PR TownyAdvanced#3999. </details> ---- <details font-size:20> <summary>💬 TownyChat Changes</summary> - Fix missing spaces from {title} & {surname} & {townypostfix}. - Allow for $ and \ to be used in the chat line. - Closes: TownyAdvanced#3960 - People spying on chat will now see the chat formatted differently from normal. - De-clutters the chat. - Closes: TownyAdvanced#2665 - Bugfixes on the AsyncChatHookEvents, courtesy of Rebstew with PR TownyAdvanced/TownyChat#26 - Fix ConcurrentModificationException caused by spies. - Closes TownyAdvanced#4077 </details> sponsor](https://github.com/sponsors/LlmDl) | Important Links | |:----:| |<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 an 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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This fixes the error where no feedback was given on the console when towny couldn't find a specified object with the given name.
Relevant Towny Issue ticket:
Closes #3957
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.