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(); teleportee.setLastLocation();
if (!teleportee.getBase().isEmpty()) { if (!ess.getSettings().isForcePassengerTeleport() && !teleportee.getBase().isEmpty()) {
if (!ess.getSettings().isTeleportPassengerDismount()) { if (!ess.getSettings().isTeleportPassengerDismount()) {
future.completeExceptionally(new Exception(tl("passengerTeleportFail"))); future.completeExceptionally(new Exception(tl("passengerTeleportFail")));
return; return;

View file

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

View file

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