Remove broken maven repos, bug fixes

* Fix stack trace when players click with no block selected
* Fix zone reset error caused by earlier commit
This commit is contained in:
Connor Monahan 2017-07-19 18:15:38 -04:00
parent 66445eb61d
commit 00ec38c739
3 changed files with 3 additions and 11 deletions

View File

@ -31,14 +31,6 @@
<id>sk89q-repo</id>
<url>http://maven.sk89q.com/repo/</url>
</repository>
<repository>
<id>mcstats</id>
<url>http://repo.mcstats.org/content/repositories/public/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
</repository>
</repositories>
<issueManagement>
<system>Github issues</system>

View File

@ -237,7 +237,7 @@ public class WarPlayerListener implements Listener {
public void onPlayerInteract(PlayerInteractEvent event) {
if (War.war.isLoaded()) {
Player player = event.getPlayer();
if (event.getItem().getType() == Material.WOOD_SWORD && War.war.isWandBearer(player)) {
if (event.getItem() != null && event.getItem().getType() == Material.WOOD_SWORD && War.war.isWandBearer(player)) {
String zoneName = War.war.getWandBearerZone(player);
ZoneSetter setter = new ZoneSetter(player, zoneName);
if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {

View File

@ -98,14 +98,14 @@ public class PartialZoneResetJob extends BukkitRunnable implements Cloneable {
new Object[]{volume.getName(), secondsAsText});
conn.close();
} else {
this.runTaskLater(War.war, JOB_INTERVAL);
War.war.getServer().getScheduler().runTaskLater(War.war, (Runnable) this.clone(), JOB_INTERVAL);
}
} else {
int solidChanges = volume.resetSection(conn, completed, speed, changes);
completed += solidChanges;
totalChanges += solidChanges;
this.displayStatusMessage();
this.runTaskLater(War.war, JOB_INTERVAL);
War.war.getServer().getScheduler().runTaskLater(War.war, (Runnable) this.clone(), JOB_INTERVAL);
}
} catch (SQLException e) {
War.war.getLogger().log(Level.WARNING, "Failed to load zone during reset loop", e);