mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-10-03 09:07:33 +02:00
Fixed some code smells
This commit is contained in:
parent
7893c03a64
commit
c2a7ca86ff
@ -1,7 +1,6 @@
|
||||
package world.bentobox.bentobox.api.addons;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -46,10 +46,9 @@ public class GitHubConnector {
|
||||
|
||||
// Parse the data
|
||||
/* It must be done in a specific order:
|
||||
|
||||
1. repository;
|
||||
2. contributors;
|
||||
3. releases.
|
||||
1. repository
|
||||
2. contributors
|
||||
3. releases
|
||||
*/
|
||||
parseRepositoryData(repositoryData);
|
||||
parseContributorsData(contributorData);
|
||||
|
@ -15,7 +15,7 @@ import java.net.URL;
|
||||
*/
|
||||
public class GitHubURL {
|
||||
|
||||
private @NonNull final URL url;
|
||||
private final @NonNull URL url;
|
||||
|
||||
public GitHubURL(@NonNull String repository, @Nullable String suffix) throws MalformedURLException {
|
||||
suffix = (suffix != null && !suffix.isEmpty()) ? "/" + suffix : "";
|
||||
|
@ -27,9 +27,7 @@ public class LiquidsFlowingOutListener extends FlagListener {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Make a less restrictive check - try to see where the border is, so that
|
||||
// water can still flows sideways.
|
||||
// see: https://github.com/BentoBoxWorld/BentoBox/issues/511#issuecomment-460040287
|
||||
// https://github.com/BentoBoxWorld/BentoBox/issues/511#issuecomment-460040287
|
||||
// Time to do some maths! We've got the vector FromTo, let's check if its y coordinate is different from zero.
|
||||
if (to.getLocation().toVector().subtract(from.getLocation().toVector()).getY() != 0) {
|
||||
// We do not run any checks if this is a vertical flow - would be too much resource consuming.
|
||||
|
Loading…
Reference in New Issue
Block a user