mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 11:38:26 +01:00
Small change, not sure if it will fix anything
This commit is contained in:
parent
7abdca47a5
commit
7d214ffce9
@ -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?");
|
||||
|
@ -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;
|
||||
}
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user