Small change, not sure if it will fix anything

This commit is contained in:
fullwall 2012-09-09 17:35:26 +08:00
parent 7abdca47a5
commit 7d214ffce9
3 changed files with 6 additions and 7 deletions

View File

@ -214,7 +214,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
Economy.class);
if (provider != null && provider.getProvider() != null) {
Economy economy = provider.getProvider();
Bukkit.getPluginManager().registerEvents(new NPCPayListener(economy), this);
Bukkit.getPluginManager().registerEvents(new PaymentListener(economy), this);
}
} catch (NoClassDefFoundError e) {
Messaging.log("Unable to use economy handling. Has Vault been enabled?");

View File

@ -12,10 +12,10 @@ import org.bukkit.event.Listener;
import com.google.common.base.Preconditions;
public class NPCPayListener implements Listener {
public class PaymentListener implements Listener {
private final Economy provider;
public NPCPayListener(Economy provider) {
public PaymentListener(Economy provider) {
Preconditions.checkNotNull(provider, "provider cannot be null");
this.provider = provider;
}

View File

@ -26,7 +26,7 @@ public class CitizensNavigator implements Navigator {
.range(Setting.DEFAULT_PATHFINDING_RANGE.asFloat())
.stationaryTicks(Setting.DEFAULT_STATIONARY_TICKS.asInt());
private PathStrategy executing;
int lastX, lastY, lastZ;
private int lastX, lastY, lastZ;
private NavigatorParameters localParams = defaultParams;
private final CitizensNPC npc;
private int stationaryTicks;
@ -149,11 +149,10 @@ public class CitizensNavigator implements Navigator {
StuckAction action = localParams.stuckAction();
if (action != null) {
boolean shouldContinue = action.run(npc, this);
if (shouldContinue) {
stationaryTicks = 0;
if (shouldContinue)
return;
}
}
stationaryTicks = 0;
}
Bukkit.getPluginManager().callEvent(new NavigationCancelEvent(this, reason));
stopNavigating();