-
Notifications
You must be signed in to change notification settings - Fork 298
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
Ben/mv5/anchor #3029
base: MV5
Are you sure you want to change the base?
Ben/mv5/anchor #3029
Conversation
String locationString = anchorsSection.getString(key, ""); | ||
Location anchorLocation = this.locationManipulation.stringToLocation(locationString); | ||
if (anchorLocation == null) { | ||
Logging.warning("The location for anchor '%s' is INVALID.", key); |
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 docs indicate that the Try will be successful if all anchors or loaded. However, this looks like a case where an anchor isn't loaded. Is it worth handling this differently?
* | ||
* @param anchorName The name of the anchor. | ||
* @param locationString The location of the anchor as string. | ||
* @return Empty {@link Try} if all anchors were successfully loaded, or the exception if an error occurred. |
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.
Successfully saved?
@@ -144,46 +144,61 @@ | |||
|
|||
/** | |||
* Gets all anchors that the specified {@link Player} can access. | |||
* @param p The {@link Player}. | |||
* | |||
* @param player The {@link Player}. | |||
* @return An unmodifiable {@link Set} containing all anchors the specified {@link Player} can access. |
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.
Your changes do not return an unmodifiable set.
Refactor to fix variable naming, use vavr, fix checkstyle etc... Also added relevant commands to set, list and delete anchors.