diff --git a/.gitignore b/.gitignore
index 987a4e1..92a1ffd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@
*.iml
/.project
out/
+.classpath
+.settings
diff --git a/.travis.yml b/.travis.yml
index c12545e..810d144 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: java
jdk:
- - oraclejdk8
+ - oraclejdk11
notifications:
email: false
diff --git a/pom.xml b/pom.xml
index c132d75..08422a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
net.lankylord
SimpleHomes
- 2.0.4
+ 2.0.5
jar
SimpleHomes
diff --git a/src/main/java/net/lankylord/simplehomes/SimpleHomes.java b/src/main/java/net/lankylord/simplehomes/SimpleHomes.java
index 4610739..dd0bf31 100644
--- a/src/main/java/net/lankylord/simplehomes/SimpleHomes.java
+++ b/src/main/java/net/lankylord/simplehomes/SimpleHomes.java
@@ -135,6 +135,8 @@ private void loadUpdater() {
//No update found
getLogger().log(Level.INFO, "No update found.");
break;
+ default:
+ break;
}
}
}
diff --git a/src/main/java/net/lankylord/simplehomes/commands/HomeListCommand.java b/src/main/java/net/lankylord/simplehomes/commands/HomeListCommand.java
index 2394d55..c2259dc 100644
--- a/src/main/java/net/lankylord/simplehomes/commands/HomeListCommand.java
+++ b/src/main/java/net/lankylord/simplehomes/commands/HomeListCommand.java
@@ -28,7 +28,6 @@
*/
package net.lankylord.simplehomes.commands;
-import net.lankylord.simplehomes.SimpleHomes;
import net.lankylord.simplehomes.configuration.languages.LanguageManager;
import net.lankylord.simplehomes.homes.HomeManager;
import net.lankylord.simplehomes.util.UUIDManager;
diff --git a/src/main/java/net/lankylord/simplehomes/commands/OtherHomeCommand.java b/src/main/java/net/lankylord/simplehomes/commands/OtherHomeCommand.java
index 6ef94d0..587e6cc 100644
--- a/src/main/java/net/lankylord/simplehomes/commands/OtherHomeCommand.java
+++ b/src/main/java/net/lankylord/simplehomes/commands/OtherHomeCommand.java
@@ -65,14 +65,14 @@ public boolean onCommand(CommandSender sender, Command command, String s, String
homeName = "default";
}
final String targetName = strings[0].toLowerCase();
- simpleHomes.getServer().getScheduler().runTaskAsynchronously(simpleHomes, new BukkitRunnable() {
+ new BukkitRunnable() {
UUID targetUUID;
@Override
public void run() {
targetUUID = UUIDManager.getUUIDFromPlayer(targetName);
if (targetUUID != null) {
- simpleHomes.getServer().getScheduler().runTask(simpleHomes, new BukkitRunnable() {
+ new BukkitRunnable() {
@Override
public void run() {
Location location = homeManager.getPlayerHome(targetUUID, homeName);
@@ -86,12 +86,12 @@ public void run() {
player.sendMessage(LanguageManager.HOME_NOT_FOUND);
}
}
- });
+ }.runTask(simpleHomes);
} else {
player.sendMessage(LanguageManager.PLAYER_NOT_EXIST);
}
}
- });
+ }.runTaskAsynchronously(simpleHomes);
} else {
sender.sendMessage(LanguageManager.PLAYER_COMMAND_ONLY);
}
diff --git a/src/main/java/net/lankylord/simplehomes/homes/HomeManager.java b/src/main/java/net/lankylord/simplehomes/homes/HomeManager.java
index 6a315e8..8278c94 100644
--- a/src/main/java/net/lankylord/simplehomes/homes/HomeManager.java
+++ b/src/main/java/net/lankylord/simplehomes/homes/HomeManager.java
@@ -46,7 +46,7 @@ public class HomeManager {
public HomeManager(HomeFileManager fileManager) {
this.fileManager = fileManager;
- this.loadedHomes = new HashMap<>();
+ this.loadedHomes = new HashMap>();
}
/**
@@ -93,7 +93,6 @@ private void saveHomeToFile(UUID uuid, Location location, String homeName) {
* @param player The player
* @param homeName Name of the home
*/
- @SuppressWarnings("unchecked")
public void saveHome(Player player, String homeName) {
UUID uuid = player.getUniqueId();
Location location = player.getLocation();
@@ -108,9 +107,8 @@ public void saveHome(Player player, String homeName) {
saveHomeToFile(uuid, location, homeName);
}
- @SuppressWarnings("unchecked")
public void deleteHome(UUID uuid, String homeName) {
- Map homeLocations = loadedHomes.get(uuid);
+ Map homeLocations = loadedHomes.get(uuid);
if (homeLocations != null) {
homeLocations.remove(homeName.toLowerCase());
loadedHomes.put(uuid, homeLocations);
@@ -166,7 +164,6 @@ public void unloadPlayerHomes(UUID uuid) {
* @param homeName Name of the home
* @return Location of home
*/
- @SuppressWarnings("unchecked")
public Location getPlayerHome(UUID uuid, String homeName) {
Map homeLocations = loadedHomes.get(uuid);
if (homeLocations != null) {
@@ -193,13 +190,12 @@ public Location getPlayerHomeFromFile(UUID uuid, String homeName) {
return homeLocation.get(homeName.toLowerCase());
}
- @SuppressWarnings("unchecked")
public Map getPlayerHomes(UUID uuid) {
if (loadedHomes.containsKey(uuid)) {
return loadedHomes.get(uuid);
} else {
loadPlayerHomes(uuid);
- HashMap playerHomes = (HashMap) loadedHomes.get(uuid);
+ HashMap playerHomes = (HashMap) loadedHomes.get(uuid);
unloadPlayerHomes(uuid);
return playerHomes;
}