mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
Fix a few more invalid ticks
This commit is contained in:
parent
bd8d5a7f74
commit
4053795588
@ -509,7 +509,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
despawnNPCs(false);
|
||||
ProfileFetcher.reset();
|
||||
Skin.clearCache();
|
||||
|
||||
getServer().getPluginManager().callEvent(new CitizensPreReloadEvent());
|
||||
|
||||
saves.reloadFromSource();
|
||||
|
@ -169,7 +169,7 @@ public class CitizensNPC extends AbstractNPC {
|
||||
@Override
|
||||
public boolean isUpdating(NPCUpdate update) {
|
||||
return update == NPCUpdate.PACKET
|
||||
? updateCounter > data().get(NPC.Metadata.PACKET_UPDATE_DELAY, Setting.PACKET_UPDATE_DELAY.asInt())
|
||||
? updateCounter > data().get(NPC.Metadata.PACKET_UPDATE_DELAY, Setting.PACKET_UPDATE_DELAY.asTicks())
|
||||
: false;
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ public class CitizensNavigator implements Navigator, Runnable {
|
||||
} else {
|
||||
root.removeKey("distancemargin");
|
||||
}
|
||||
if (defaultParams.updatePathRate() != Setting.DEFAULT_PATHFINDER_UPDATE_PATH_RATE.asInt()) {
|
||||
if (defaultParams.updatePathRate() != Setting.DEFAULT_PATHFINDER_UPDATE_PATH_RATE.asTicks()) {
|
||||
root.setInt("updatepathrate", defaultParams.updatePathRate());
|
||||
} else {
|
||||
root.removeKey("updatepathrate");
|
||||
|
@ -280,7 +280,7 @@ public class Text extends Trait implements Runnable, Listener {
|
||||
sendText(player);
|
||||
|
||||
int delay = this.delay == -1
|
||||
? Setting.DEFAULT_TEXT_DELAY_MIN.asInt() + Util.getFastRandom()
|
||||
? Setting.DEFAULT_TEXT_DELAY_MIN.asTicks() + Util.getFastRandom()
|
||||
.nextInt(Setting.DEFAULT_TEXT_DELAY_MAX.asTicks() - Setting.DEFAULT_TEXT_DELAY_MIN.asTicks())
|
||||
: this.delay;
|
||||
if (delay <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user