mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-09-29 07:37:46 +02: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);
|
despawnNPCs(false);
|
||||||
ProfileFetcher.reset();
|
ProfileFetcher.reset();
|
||||||
Skin.clearCache();
|
Skin.clearCache();
|
||||||
|
|
||||||
getServer().getPluginManager().callEvent(new CitizensPreReloadEvent());
|
getServer().getPluginManager().callEvent(new CitizensPreReloadEvent());
|
||||||
|
|
||||||
saves.reloadFromSource();
|
saves.reloadFromSource();
|
||||||
|
@ -169,7 +169,7 @@ public class CitizensNPC extends AbstractNPC {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isUpdating(NPCUpdate update) {
|
public boolean isUpdating(NPCUpdate update) {
|
||||||
return update == NPCUpdate.PACKET
|
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;
|
: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ public class CitizensNavigator implements Navigator, Runnable {
|
|||||||
} else {
|
} else {
|
||||||
root.removeKey("distancemargin");
|
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());
|
root.setInt("updatepathrate", defaultParams.updatePathRate());
|
||||||
} else {
|
} else {
|
||||||
root.removeKey("updatepathrate");
|
root.removeKey("updatepathrate");
|
||||||
|
@ -280,7 +280,7 @@ public class Text extends Trait implements Runnable, Listener {
|
|||||||
sendText(player);
|
sendText(player);
|
||||||
|
|
||||||
int delay = this.delay == -1
|
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())
|
.nextInt(Setting.DEFAULT_TEXT_DELAY_MAX.asTicks() - Setting.DEFAULT_TEXT_DELAY_MIN.asTicks())
|
||||||
: this.delay;
|
: this.delay;
|
||||||
if (delay <= 0)
|
if (delay <= 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user