-
Notifications
You must be signed in to change notification settings - Fork 11
New towny marker options for towns #14
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
base: master
Are you sure you want to change the base?
Conversation
src/main/resources/config.yml
Outdated
| lie-about-holes: false | ||
| # If you want to have towns have the option to use their own image markers (By default it's only a locked to 1 default image for every town) | ||
| # 0 for default, 1 as customizable within a preset of images inside a folder created by the plugin, 2 as letting the town/players choose their own town marker via a link (BE WARNED THAT YOU HAVE TO TRUST THE GOODWILL OF YOUR PLAYERS FOR THIS) | ||
| use-links-as-image-source: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would much prefer for this option to be removed and the home-icon-enabled option to be renamed as home-icon-style with string options "disabled", "only-default", "preset" and "link"
Should also probably have a warning that changing between the preset and link types will break existing markers.
Also update the config in the README file.
src/main/java/codes/antti/bluemaptowny/TownyCommands/SetTownMarker.java
Outdated
Show resolved
Hide resolved
src/main/java/codes/antti/bluemaptowny/TownyCommands/SetTownMarker.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| TownyMessaging.sendPrefixedTownMessage(resident.getTownOrNull(), "Town Marker has been set to: " + String.join(" ", args)); | ||
| resident.getTownOrNull().addMetaData(new StringDataField("mapMarker", String.join(" ", args))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command should check that the marker is actually one of the markers in the presets if the preset mode is selected. Currently one can set anything and even do path traversal (../) to set unrelated files.
|
Oh yeah and if we have town markers wouldn't it make sense to also have nation markers? |
|
If i could fix everything rn and get it to work, I'll get on nation markers too |
With Tab Autocomplete, You can now set your own town marker within your town by the command /t set marker!
Having the option to either use a set of images from a folder or freely use a image link from the web as your marker
added a new config value for this: use-links-as-image-source
also adds a new class for the command
Preset images



Option to use a link



Might need more testing by somebody here. if anyone wants to test this before it gets merged feel free to try and ping me in BlueMap discord