Conversation
LlmDl
left a comment
There was a problem hiding this comment.
Found some things to change.
I've also tested the jar and I cannot get it to list any towns, it just says "No towns found nearby." so you should probably retest it.
Thanks for the pull request.
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
|
Thanks for the review! I've addressed all the feedback:
I've also fixed the issue where no towns were showing - the problem was with the stream filtering. The for loop approach should work correctly now. Please let me know if there's anything else that needs to be changed! |
…ssages, help menu, townyperms, config migration
b4b4801 to
ad21f3f
Compare
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Show resolved
Hide resolved
df4ea28 to
a129cf3
Compare
|
All review comments addressed:
Ready for review! |
LlmDl
left a comment
There was a problem hiding this comment.
Couple more things to clean up.
I am pretty sure this command will be able to do some harm to larger servers. If players spam this command it's going to cause a lot of math over and over again.
I had at first thought that this could go in as a /t list by nearby command so that it would use our Comparator caches. Then I realized that it wouldn't work well because the list would be different for each player.
Although I like the idea here, I don't think we can add it without some sort of cache and having this done on its own thread.
Towny/src/main/java/com/palmergames/bukkit/towny/command/HelpMenu.java
Outdated
Show resolved
Hide resolved
…nc for performance
|
Fixed:
|
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
…ssary scheduler, fix exception handling, move language strings to end of file
|
Addressed all review comments: optimized distance calculation with Map, removed unnecessary scheduler and exception handling, moved language strings to end of file. |
LlmDl
left a comment
There was a problem hiding this comment.
Looks pretty good now, we'll see what Warrior thinks.
|
Thanks! Waiting. |
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
Towny/src/main/java/com/palmergames/bukkit/towny/command/TownCommand.java
Outdated
Show resolved
Hide resolved
|
Optimizations applied. Thanks! |
Warriorrrr
left a comment
There was a problem hiding this comment.
Final thing I noticed, the rest looks good.
|
Updated to use minimessage colors. Thanks! |
LlmDl
left a comment
There was a problem hiding this comment.
I've tested the jar and it is working now, thanks.
|
Thanks for testing! Will this be merged soon? @LlmDl @Warriorrrr |
It'll get merged before the next pre-release |
|
Thanks for the update! Do you have an approximate ETA for the next pre-release? |
- Adds a configurable system based on town age and size limits, to
refund recently-made, "small" towns their full cost.
- Closes #7974.
- New Config Option:
economy.refund_deleted_new_towns.allow_refund_on_deletion
- Default: false
- Will towns that are recently created allow for a refund when the
town is deleted by using the /t delete command?
- This allows a player who has founded their town in the wrong place
to delete their town and move it.
- Towns must be less than the age specified below and have a
configuable number of townblocks.
- New Config Option:
economy.refund_deleted_new_towns.max_town_age_in_hours
- Default: 1
- How many hours old is a town allowed to be in order to get the
refund when being deleted.
- New Config Option: economy.refund_deleted_new_towns.max_townblocks
- Default: 8
- How many townblocks is a town allowed to have in order to qualify
for the refund.
- Fix exception when attempting to query NPC perms through LuckPerms,
courtesy of Warrior with PR #8033.
- Future proof minecraft version parsing, courtesy of Warrior with
PR #8034.
- Fix 2 points where permission node tests bypass the adminbypass
mode.
- Add /town nearby command, courtesy of Nrleryx with PR #8040.
(First-Time Contributor!)
- New Permission Node: towny.command.town.nearby
- Will be automatically added to your nomads in the townyperms.yml.
- New Command: /town nearby
- Shows a player up to 10 towns that are nearest to the player in
the order of closest to furthest.
Description
Adds a new
/town nearbycommand that lists the 10 nearest towns sorted by distance from the player's current location.Changes
TOWNY_COMMAND_TOWN_NEARBYpermission nodeparseTownNearbyCommand()method inTownCommand.javaplugin.ymlen-US.ymlFeatures
Testing
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.