Add hidden config to stop throwing errors for passengers (#3445)

This commit is contained in:
Josh Roy 2020-07-02 18:30:22 -04:00 committed by GitHub
parent 65f88834ba
commit 0b4ee9e73e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -164,7 +164,7 @@ public class AsyncTeleport implements IAsyncTeleport {
}
teleportee.setLastLocation();
if (!teleportee.getBase().isEmpty()) {
if (!ess.getSettings().isForcePassengerTeleport() && !teleportee.getBase().isEmpty()) {
if (!ess.getSettings().isTeleportPassengerDismount()) {
future.completeExceptionally(new Exception(tl("passengerTeleportFail")));
return;

View File

@ -125,6 +125,8 @@ public interface ISettings extends IConf {
boolean isTeleportPassengerDismount();
boolean isForcePassengerTeleport();
double getTeleportCooldown();
double getTeleportDelay();

View File

@ -167,6 +167,11 @@ public class Settings implements net.ess3.api.ISettings {
return config.getBoolean("teleport-passenger-dismount", true);
}
@Override
public boolean isForcePassengerTeleport() {
return config.getBoolean("force-passenger-teleportation", false);
}
@Override
public double getTeleportDelay() {
return config.getDouble("teleport-delay", 0);