mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-18 22:49:45 +00:00
Add hidden config to stop throwing errors for passengers (#3445)
This commit is contained in:
parent
65f88834ba
commit
0b4ee9e73e
3 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||||
|
|
|
@ -125,6 +125,8 @@ public interface ISettings extends IConf {
|
||||||
|
|
||||||
boolean isTeleportPassengerDismount();
|
boolean isTeleportPassengerDismount();
|
||||||
|
|
||||||
|
boolean isForcePassengerTeleport();
|
||||||
|
|
||||||
double getTeleportCooldown();
|
double getTeleportCooldown();
|
||||||
|
|
||||||
double getTeleportDelay();
|
double getTeleportDelay();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue