Fixes the default wait for player after teleport delay

This commit is contained in:
Kristian Knarvik 2022-02-09 18:28:47 +01:00
parent 9e78e32db4
commit 00462799b9
2 changed files with 4 additions and 1 deletions

View File

@ -117,7 +117,7 @@ public enum ConfigOption {
*/
WAIT_FOR_PLAYER_AFTER_TELEPORT_DELAY("advanced.waitForPlayerAfterTeleportDelay",
"The amount of ticks to wait before adding a player as passenger of a vehicle. On slow servers, " +
"a value of 6 is required to avoid client glitches after teleporting on a vehicle.", 1),
"a value of 6 is required to avoid client glitches after teleporting on a vehicle.", 6),
/**
* Whether to enable economy support for taking payment from players creating/destroying/using stargates

View File

@ -143,6 +143,9 @@ public final class StargateGateConfig {
* @return <p>The delay to use before adding a player as passenger of a teleported vehicle</p>
*/
public int waitForPlayerAfterTeleportDelay() {
if ((int) configOptions.get(ConfigOption.WAIT_FOR_PLAYER_AFTER_TELEPORT_DELAY) < 2) {
configOptions.put(ConfigOption.WAIT_FOR_PLAYER_AFTER_TELEPORT_DELAY, 6);
}
return (int) configOptions.get(ConfigOption.WAIT_FOR_PLAYER_AFTER_TELEPORT_DELAY);
}