diff --git a/src/main/java/ml/codeboy/thebot/commands/sound/AudioPlayerSendHandler.java b/src/main/java/ml/codeboy/thebot/commands/sound/AudioPlayerSendHandler.java index 4928aaa..b2d69f8 100644 --- a/src/main/java/ml/codeboy/thebot/commands/sound/AudioPlayerSendHandler.java +++ b/src/main/java/ml/codeboy/thebot/commands/sound/AudioPlayerSendHandler.java @@ -25,7 +25,7 @@ public boolean canProvide() { @Override public ByteBuffer provide20MsAudio() { - return this.buffer.flip(); + return (ByteBuffer) this.buffer.flip(); } @Override diff --git a/src/main/java/ml/codeboy/thebot/util/Util.java b/src/main/java/ml/codeboy/thebot/util/Util.java index a1a2f97..7c2791a 100644 --- a/src/main/java/ml/codeboy/thebot/util/Util.java +++ b/src/main/java/ml/codeboy/thebot/util/Util.java @@ -103,8 +103,7 @@ public void run() { } } }, 1000, 5000); - } private static final int secondsPerDay = 3600 * 24, - secondsPerMonth = secondsPerDay * 30, secondsPerYear = secondsPerDay * 365; + } public static int toInt(String string) { return toInt(string, 0); @@ -277,9 +276,9 @@ public static int calculateDistance(String from, String to) { int cost = from.charAt(i - 1) == to.charAt(j - 1) ? 0 : 1; dist[i][j] = Math.min(Math.min(dist[i - 1][j] + 1, dist[i][j - 1] + 1), dist[i - 1][j - 1] + cost); if (i > 1 && - j > 1 && - from.charAt(i - 1) == to.charAt(j - 2) && - from.charAt(i - 2) == to.charAt(j - 1)) { + j > 1 && + from.charAt(i - 1) == to.charAt(j - 2) && + from.charAt(i - 2) == to.charAt(j - 1)) { dist[i][j] = Math.min(dist[i][j], dist[i - 2][j - 2] + cost); } }