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
Add support for NoteblockAPI's PositionSongPlayer
#422
Conversation
pom.xml
Outdated
@@ -236,7 +236,7 @@ | |||
<dependency> | |||
<groupId>com.github.koca2000</groupId> | |||
<artifactId>NoteBlockAPI</artifactId> | |||
<version>1.2.2.1</version> | |||
<version>1.6.2</version> |
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.
please remove this change from the PR so it can be applied separately
return; | ||
} | ||
String directory = URLDecoder.decode(System.getProperty("user.dir")); | ||
Song s = NBSDecoder.parse(new File(directory + "/plugins/Denizen/" + file + ".nbs")); |
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.
This is an issue with the original code not this PR, but this file handling is wrong - it should look more like
File file = new File(Denizen.getInstance().getDataFolder(), fName + ".nbs");
if (!Utilities.canReadFile(file)) {
Debug.echoError("Cannot read from that file path due to security settings in Denizen/config.yml.");
return;
}
Done |
Removed |
} | ||
else { | ||
throw new InvalidArgumentsException("Must specify players to add, remove or spectate!"); | ||
throw new InvalidArgumentsRuntimeException("Must specify players to add or remove!"); |
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.
This message still isn't really clear, probably players to play/stop a song for
or something?
Done 👍 |
} | ||
|
||
// <--[command] | ||
// @Name nbs | ||
// @Syntax nbs [play/stop] (file:<file path>) (targets:<entity>|...) | ||
// @Syntax nbs [play/stop] (file:<file_path>) (targets:<entity>|...) (at:<location>) (distance:<#>{16}) |
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.
<#>/{16}
Done |
Play NBS songs from a certain location
Changes
at:<location>
argument to specify the location the song should play fromdistance:<#>
argument to control the hearing range (and volume if number < 16)autoExecute
<file path>
is<file_path>
because it was causing a weird tab-completion issue:Notes
5
or something like thatrequested by Josh65