mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Add permission for storing user's last location on teleportation (#3272)
This commit is contained in:
parent
8f5b97b9d2
commit
302f0acbaa
3 changed files with 10 additions and 2 deletions
|
@ -458,7 +458,7 @@ public class EssentialsPlayerListener implements Listener {
|
|||
}
|
||||
final User user = ess.getUser(player);
|
||||
//There is TeleportCause.COMMMAND but plugins have to actively pass the cause in on their teleports.
|
||||
if (backListener && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND)) {
|
||||
if (user.isAuthorized("essentials.back.onteleport") && backListener && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND)) {
|
||||
user.setLastLocation();
|
||||
}
|
||||
if (teleportInvulnerability && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND)) {
|
||||
|
|
|
@ -129,7 +129,9 @@ public class Teleport implements ITeleport {
|
|||
return;
|
||||
}
|
||||
|
||||
teleportee.setLastLocation();
|
||||
if (teleportee.isAuthorized("essentials.back.onteleport")) {
|
||||
teleportee.setLastLocation();
|
||||
}
|
||||
|
||||
if (!teleportee.getBase().isEmpty()) {
|
||||
if (!ess.getSettings().isTeleportPassengerDismount()) {
|
||||
|
|
|
@ -632,6 +632,12 @@ permissions:
|
|||
essentials.balancetop.exclude:
|
||||
default: false
|
||||
description: Players with this permission are excluded from the balancetop
|
||||
essentials.back.onteleport:
|
||||
default: true
|
||||
description: Players with this permission will have back location stored during any teleportation
|
||||
essentials.back.ondeath:
|
||||
default: false
|
||||
description: Players with this permission will have back location stored during death
|
||||
essentials.exempt:
|
||||
default: false
|
||||
description: Parent permission to be exempt from many moderator actions
|
||||
|
|
Loading…
Reference in a new issue