diff --git a/pom.xml b/pom.xml
index 1e3d8971d..48e7bfcbe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
UTF-8
${project.basedir}/lib
-
+
clean package install
askyblock
@@ -162,5 +162,5 @@
http://maven.sk89q.com/repo/
- 3.0.0.4
+ 3.0.0.5
diff --git a/src/com/wasteofplastic/askyblock/DeleteIslandChunk.java b/src/com/wasteofplastic/askyblock/DeleteIslandChunk.java
index f6131a8a7..90947f312 100644
--- a/src/com/wasteofplastic/askyblock/DeleteIslandChunk.java
+++ b/src/com/wasteofplastic/askyblock/DeleteIslandChunk.java
@@ -128,6 +128,7 @@ public DeleteIslandChunk(final ASkyBlock plugin, final Island island) {
plugin.getLogger().info("Island delete: There are " + chunksToClear.size() + " chunks that need to be cleared up.");
plugin.getLogger().info("Clean rate is " + Settings.cleanRate + " chunks per second. Should take ~" + Math.round(chunksToClear.size()/Settings.cleanRate) + "s");
new BukkitRunnable() {
+ @SuppressWarnings("deprecation")
@Override
public void run() {
Iterator it = chunksToClear.iterator();
diff --git a/src/com/wasteofplastic/askyblock/InventorySave.java b/src/com/wasteofplastic/askyblock/InventorySave.java
index 025da892d..3cdb5b784 100644
--- a/src/com/wasteofplastic/askyblock/InventorySave.java
+++ b/src/com/wasteofplastic/askyblock/InventorySave.java
@@ -31,13 +31,11 @@
public class InventorySave {
private static InventorySave instance = new InventorySave(ASkyBlock.getPlugin());
private HashMap inventories;
- private ASkyBlock plugin;
/**
* Saves the inventory of a player
*/
public InventorySave(ASkyBlock plugin) {
- this.plugin = plugin;
inventories = new HashMap();
}
diff --git a/src/com/wasteofplastic/askyblock/Locale.java b/src/com/wasteofplastic/askyblock/Locale.java
index 02b6887bd..9c5098050 100644
--- a/src/com/wasteofplastic/askyblock/Locale.java
+++ b/src/com/wasteofplastic/askyblock/Locale.java
@@ -17,7 +17,6 @@
package com.wasteofplastic.askyblock;
import java.io.File;
-import java.io.InputStream;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@@ -642,9 +641,7 @@ public void reloadLocale(String localeName) {
locale = YamlConfiguration.loadConfiguration(localeFile);
} else {
// Look for defaults in the jar
- InputStream defLocaleStream = plugin.getResource("locale/" + localeName + ".yml");
- if (defLocaleStream != null) {
- //plugin.getLogger().info("DEBUG: Saving from jar");
+ if (plugin.getResource("locale/" + localeName + ".yml") != null) {
plugin.saveResource("locale/" + localeName + ".yml", true);
localeFile = new File(plugin.getDataFolder() + File.separator + "locale", localeName + ".yml");
locale = YamlConfiguration.loadConfiguration(localeFile);
@@ -655,9 +652,8 @@ public void reloadLocale(String localeName) {
if (localeFile.exists()) {
locale = YamlConfiguration.loadConfiguration(localeFile);
} else {
- // Look for defaults in the jar
- defLocaleStream = plugin.getResource("locale/locale.yml");
- if (defLocaleStream != null) {
+ // Look for defaults in the jar
+ if (plugin.getResource("locale/locale.yml") != null) {
plugin.saveResource("locale/locale.yml", true);
localeFile = new File(plugin.getDataFolder() + File.separator + "locale", "locale.yml");
locale = YamlConfiguration.loadConfiguration(localeFile);
diff --git a/src/com/wasteofplastic/askyblock/SafeBoat.java b/src/com/wasteofplastic/askyblock/SafeBoat.java
index 2033fd9f7..712c37ec5 100644
--- a/src/com/wasteofplastic/askyblock/SafeBoat.java
+++ b/src/com/wasteofplastic/askyblock/SafeBoat.java
@@ -50,13 +50,11 @@
public class SafeBoat implements Listener {
// Flags to indicate if a player has exited a boat recently or not
private static HashMap exitedBoat = new HashMap();
- private final ASkyBlock plugin;
// Stores players that should be ignored because they are being teleported away from
// a locked islands
private static Set ignoreList = new HashSet();
public SafeBoat(ASkyBlock aSkyBlock) {
- plugin = aSkyBlock;
}
/**
diff --git a/src/com/wasteofplastic/askyblock/SafeSpotTeleport.java b/src/com/wasteofplastic/askyblock/SafeSpotTeleport.java
index 4fc0ff813..200916f01 100644
--- a/src/com/wasteofplastic/askyblock/SafeSpotTeleport.java
+++ b/src/com/wasteofplastic/askyblock/SafeSpotTeleport.java
@@ -114,7 +114,8 @@ public SafeSpotTeleport(final ASkyBlock plugin, final Entity entity, final Locat
//plugin.getLogger().info("DEBUG:world height = " + worldHeight);
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable() {
- @Override
+ @SuppressWarnings("deprecation")
+ @Override
public void run() {
// Find a safe spot, defined as a solid block, with 2 air spaces above it
//long time = System.nanoTime();
@@ -134,7 +135,6 @@ public void run() {
Vector portalPart = null;
double distance = 0D;
double safeDistance = 0D;
- search:
for (ChunkSnapshot chunk: finalChunk) {
for (x = 0; x< 16; x++) {
for (z = 0; z < 16; z++) {
diff --git a/src/com/wasteofplastic/askyblock/TinyDB.java b/src/com/wasteofplastic/askyblock/TinyDB.java
index 95541ac4a..1503f29c8 100644
--- a/src/com/wasteofplastic/askyblock/TinyDB.java
+++ b/src/com/wasteofplastic/askyblock/TinyDB.java
@@ -25,7 +25,6 @@
import java.io.PrintWriter;
import java.util.Map.Entry;
import java.util.Scanner;
-import java.util.TreeMap;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
diff --git a/src/com/wasteofplastic/askyblock/commands/Challenges.java b/src/com/wasteofplastic/askyblock/commands/Challenges.java
index 09b2abf77..a7bd0d8b7 100644
--- a/src/com/wasteofplastic/askyblock/commands/Challenges.java
+++ b/src/com/wasteofplastic/askyblock/commands/Challenges.java
@@ -18,7 +18,6 @@
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -1865,12 +1864,11 @@ public void reloadChallengeConfig() {
challengeFile = YamlConfiguration.loadConfiguration(challengeConfigFile);
// Look for defaults in the jar
-
- InputStream defConfigStream = plugin.getResource("challenges.yml");
- if (defConfigStream != null) {
+ /*
+ if (plugin.getResource("challenges.yml") != null) {
YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
challengeFile.setDefaults(defConfig);
- }
+ }*/
Settings.challengeList = getChallengeConfig().getConfigurationSection("challenges.challengeList").getKeys(false);
Settings.challengeLevels = Arrays.asList(getChallengeConfig().getString("challenges.levels","").split(" "));
Settings.freeLevels = Arrays.asList(getChallengeConfig().getString("challenges.freelevels","").split(" "));
diff --git a/src/com/wasteofplastic/askyblock/commands/IslandCmd.java b/src/com/wasteofplastic/askyblock/commands/IslandCmd.java
index 2a14a55e0..2c5d71096 100644
--- a/src/com/wasteofplastic/askyblock/commands/IslandCmd.java
+++ b/src/com/wasteofplastic/askyblock/commands/IslandCmd.java
@@ -126,6 +126,7 @@ public IslandCmd(ASkyBlock aSkyBlock) {
* Loads schematics from the config.yml file. If the default
* island is not included, it will be made up
*/
+ @SuppressWarnings("deprecation")
public void loadSchematics() {
// Check if there is a schematic folder and make it if it does not exist
File schematicFolder = new File(plugin.getDataFolder(), "schematics");
@@ -2549,7 +2550,7 @@ public void run() {
} else {
plugin.getMessages().setMessage(targetPlayerUUID, ChatColor.GREEN + plugin.myLocale(targetPlayerUUID).banLifted.replace("[name]", player.getDisplayName()));
}
- OfflinePlayer offlineTarget = plugin.getServer().getOfflinePlayer(targetPlayerUUID);
+ //OfflinePlayer offlineTarget = plugin.getServer().getOfflinePlayer(targetPlayerUUID);
// Player
player.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("[name]", split[1]));
// Console
diff --git a/src/com/wasteofplastic/askyblock/listeners/AcidEffect.java b/src/com/wasteofplastic/askyblock/listeners/AcidEffect.java
index 5c5e08ceb..1eebfcbc8 100644
--- a/src/com/wasteofplastic/askyblock/listeners/AcidEffect.java
+++ b/src/com/wasteofplastic/askyblock/listeners/AcidEffect.java
@@ -363,6 +363,7 @@ public void onPlayerInteract(final PlayerInteractEvent e) {
}
if (plugin.getGrid().playerIsOnIsland(e.getPlayer())) {
boolean otherOb = false;
+ @SuppressWarnings("deprecation")
ItemStack inHand = e.getPlayer().getItemInHand();
if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK) && inHand.getType().equals(Material.BUCKET)
&& e.getClickedBlock().getType().equals(Material.OBSIDIAN)) {
diff --git a/src/com/wasteofplastic/askyblock/listeners/NetherPortals.java b/src/com/wasteofplastic/askyblock/listeners/NetherPortals.java
index caff0853e..10c02aeba 100644
--- a/src/com/wasteofplastic/askyblock/listeners/NetherPortals.java
+++ b/src/com/wasteofplastic/askyblock/listeners/NetherPortals.java
@@ -79,7 +79,7 @@ public void onEntityPortal(EntityPortalEvent event) {
if (plugin.getServer().getWorld(Settings.worldName + "_the_end") != null) {
// The end exists
Location end_place = plugin.getServer().getWorld(Settings.worldName + "_the_end").getSpawnLocation();
- boolean result = event.getEntity().teleport(end_place);
+ event.getEntity().teleport(end_place);
//plugin.getLogger().info("DEBUG: Result " + result + " teleported " + event.getEntityType() + " to " + end_place);
return;
}
diff --git a/src/com/wasteofplastic/askyblock/listeners/WorldLoader.java b/src/com/wasteofplastic/askyblock/listeners/WorldLoader.java
index add763a6e..e52fe2fb6 100644
--- a/src/com/wasteofplastic/askyblock/listeners/WorldLoader.java
+++ b/src/com/wasteofplastic/askyblock/listeners/WorldLoader.java
@@ -26,7 +26,7 @@
import com.wasteofplastic.askyblock.Settings;
public class WorldLoader implements Listener {
- private ASkyBlock plugin;
+ //private ASkyBlock plugin;
private boolean worldLoaded = false;
/**
@@ -34,7 +34,7 @@ public class WorldLoader implements Listener {
* @param aSkyBlock
*/
public WorldLoader(ASkyBlock aSkyBlock) {
- this.plugin = aSkyBlock;
+ //this.plugin = aSkyBlock;
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
diff --git a/src/com/wasteofplastic/askyblock/nms/fallback/NMSHandler.java b/src/com/wasteofplastic/askyblock/nms/fallback/NMSHandler.java
index 06206a12e..dce09e36f 100644
--- a/src/com/wasteofplastic/askyblock/nms/fallback/NMSHandler.java
+++ b/src/com/wasteofplastic/askyblock/nms/fallback/NMSHandler.java
@@ -67,6 +67,7 @@ public boolean isPotion(ItemStack item) {
return false;
}
+ @SuppressWarnings("deprecation")
@Override
public ItemStack setPotion(Material itemMaterial, Tag itemTags,
ItemStack chestItem) {
diff --git a/src/com/wasteofplastic/askyblock/panels/MiniShopItem.java b/src/com/wasteofplastic/askyblock/panels/MiniShopItem.java
index b1943381c..96f9ff8df 100644
--- a/src/com/wasteofplastic/askyblock/panels/MiniShopItem.java
+++ b/src/com/wasteofplastic/askyblock/panels/MiniShopItem.java
@@ -338,6 +338,7 @@ public void setExtra(String extra) {
* The item stack
* @return A string with the name of the item.
*/
+ @SuppressWarnings("deprecation")
private static String getDataName(ItemStack item) {
Material mat = item.getType();
// Find out durability, which indicates additional information on the
diff --git a/src/com/wasteofplastic/askyblock/schematics/Schematic.java b/src/com/wasteofplastic/askyblock/schematics/Schematic.java
index 28191a4bc..e6e48780a 100644
--- a/src/com/wasteofplastic/askyblock/schematics/Schematic.java
+++ b/src/com/wasteofplastic/askyblock/schematics/Schematic.java
@@ -116,14 +116,14 @@ public class Schematic {
private Vector welcomeSign;
private Vector topGrass;
private Vector playerSpawn;
- private Material playerSpawnBlock;
+ //private Material playerSpawnBlock;
private NMSAbstraction nms;
private Set attachable = new HashSet();
private Map paintingList = new HashMap();
private Map facingList = new HashMap();
private Map rotationList = new HashMap();
private List islandBlocks;
- private boolean pasteAir;
+ //private boolean pasteAir;
private int durability;
private int levelHandicap;
@@ -151,7 +151,7 @@ public Schematic(ASkyBlock plugin) {
welcomeSign = null;
topGrass = null;
playerSpawn = null;
- playerSpawnBlock = null;
+ //playerSpawnBlock = null;
partnerName = "";
}
@@ -182,7 +182,7 @@ public Schematic(ASkyBlock plugin, File file) throws IOException {
welcomeSign = null;
topGrass = null;
playerSpawn = null;
- playerSpawnBlock = null;
+ //playerSpawnBlock = null;
partnerName = "";
attachable.add(Material.STONE_BUTTON.getId());
@@ -284,6 +284,7 @@ public Schematic(ASkyBlock plugin, File file) throws IOException {
CompoundTag schematicTag = (CompoundTag) nbtStream.readTag();
nbtStream.close();
+ stream.close();
if (!schematicTag.getName().equals("Schematic")) {
throw new IllegalArgumentException("Tag \"Schematic\" does not exist or is not first");
}
@@ -1046,7 +1047,7 @@ public void prePasteSchematic(short[] blocks, byte[] data) {
//plugin.getLogger().info("DEBUG: torch = " + Material.TORCH.getId());
//plugin.getLogger().info("DEBUG: non attachable");
//plugin.getLogger().info("DEBUG: bedrock y = " + bedrock.getBlockY());
- int count = 0;
+ //int count = 0;
for (int x = 0; x < width; ++x) {
for (int y = 0; y < height; ++y) {
for (int z = 0; z < length; ++z) {
@@ -1512,6 +1513,7 @@ public Location getPlayerSpawn(Location pasteLocation) {
* @param playerSpawnBlock the playerSpawnBlock to set
* @return true if block is found otherwise false
*/
+ @SuppressWarnings("deprecation")
public boolean setPlayerSpawnBlock(Material playerSpawnBlock) {
if (bedrock == null) {
return false;