Small fixes suggested by Intellij IDEA
This commit is contained in:
parent
aa585e9b11
commit
28d03a6a3a
|
@ -736,7 +736,7 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print an error to the console.
|
* Print an error to the console.
|
||||||
* @param message The messagfe to print
|
* @param message The message to print
|
||||||
*/
|
*/
|
||||||
public static void error(Object... message) {
|
public static void error(Object... message) {
|
||||||
AreaShop.getInstance().getLogger().severe(StringUtils.join(message, " "));
|
AreaShop.getInstance().getLogger().severe(StringUtils.join(message, " "));
|
||||||
|
|
|
@ -154,11 +154,11 @@ public class TeleportFeature extends RegionFeature {
|
||||||
int maxTries = plugin.getConfig().getInt("maximumTries");
|
int maxTries = plugin.getConfig().getInt("maximumTries");
|
||||||
|
|
||||||
// Tracking of which sides to continue the search
|
// Tracking of which sides to continue the search
|
||||||
boolean done = isSafe(safeLocation) && ((blocksInRegion && insideRegion) || (!insideRegion));
|
boolean done = isSafe(safeLocation) && (blocksInRegion || !insideRegion);
|
||||||
boolean northDone = false, eastDone = false, southDone = false, westDone = false, topDone = false, bottomDone = false;
|
boolean northDone = false, eastDone = false, southDone = false, westDone = false, topDone = false, bottomDone = false;
|
||||||
boolean continueThisDirection;
|
boolean continueThisDirection;
|
||||||
|
|
||||||
while(((blocksInRegion && insideRegion) || (!insideRegion)) && !done) {
|
while((blocksInRegion || !insideRegion) && !done) {
|
||||||
blocksInRegion = false;
|
blocksInRegion = false;
|
||||||
|
|
||||||
// North side
|
// North side
|
||||||
|
|
|
@ -49,6 +49,7 @@ import java.net.Proxy;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -519,7 +520,7 @@ public class Metrics {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
gzos = new GZIPOutputStream(baos);
|
gzos = new GZIPOutputStream(baos);
|
||||||
gzos.write(input.getBytes("UTF-8"));
|
gzos.write(input.getBytes(StandardCharsets.UTF_8));
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue