Clean up some of our messes.

This commit is contained in:
GJ
2014-01-20 13:58:40 -08:00
parent c6ea32f0b0
commit 43e2c813d1
47 changed files with 133 additions and 225 deletions

View File

@ -13,9 +13,7 @@ import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.skills.SkillUtils;
public class TeleportationWarmup extends BukkitRunnable {
private static Player teleportingPlayer;
private McMMOPlayer mcMMOPlayer;
private static Player targetPlayer;
private McMMOPlayer mcMMOTarget;
public TeleportationWarmup(McMMOPlayer mcMMOPlayer, McMMOPlayer mcMMOTarget) {
@ -25,12 +23,8 @@ public class TeleportationWarmup extends BukkitRunnable {
@Override
public void run() {
checkPartyTeleport();
}
private void checkPartyTeleport() {
teleportingPlayer = mcMMOPlayer.getPlayer();
targetPlayer = mcMMOTarget.getPlayer();
Player teleportingPlayer = mcMMOPlayer.getPlayer();
Player targetPlayer = mcMMOTarget.getPlayer();
Location previousLocation = mcMMOPlayer.getTeleportCommenceLocation();
Location newLocation = mcMMOPlayer.getPlayer().getLocation();
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();

View File

@ -17,7 +17,6 @@ public class AlchemyBrewCheckTask extends BukkitRunnable {
private Player player;
private Block brewingStand;
private ItemStack[] oldInventory;
private ItemStack[] newInventory;
public AlchemyBrewCheckTask(Player player, BrewingStand brewingStand) {
this.player = player;
@ -27,7 +26,7 @@ public class AlchemyBrewCheckTask extends BukkitRunnable {
@Override
public void run() {
this.newInventory = Arrays.copyOfRange(((BrewingStand) brewingStand.getState()).getInventory().getContents(), 0, 4);
ItemStack[] newInventory = Arrays.copyOfRange(((BrewingStand) brewingStand.getState()).getInventory().getContents(), 0, 4);
if (Alchemy.brewingStandMap.containsKey(brewingStand)) {
if (oldInventory[INGREDIENT_SLOT] == null || newInventory[INGREDIENT_SLOT] == null || !oldInventory[INGREDIENT_SLOT].isSimilar(newInventory[INGREDIENT_SLOT]) || !AlchemyPotionBrewer.isValidBrew(player, newInventory)) {

View File

@ -28,7 +28,7 @@ public class BleedTimerTask extends BukkitRunnable {
continue;
}
int damage = 0;
int damage;
if (entity instanceof Player) {
damage = 1;