mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-01 13:01:41 +01:00
Fix messages & add warning
This commit is contained in:
parent
16381234e0
commit
64930e3771
@ -449,7 +449,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
private boolean autoTeleportEnabled;
|
||||
|
||||
private boolean _getAutoTeleportEnabled() {
|
||||
return config.getBoolean("autoteleportenabled", false);
|
||||
return config.getBoolean("teleportauto", false);
|
||||
}
|
||||
|
||||
public boolean isAutoTeleportEnabled() {
|
||||
@ -458,7 +458,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
|
||||
public void setAutoTeleportEnabled(boolean set) {
|
||||
autoTeleportEnabled = set;
|
||||
config.setProperty("autoteleportenabled", set);
|
||||
config.setProperty("teleportauto", set);
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class Commandtpa extends EssentialsCommand {
|
||||
&& player.isTpRequestHere() == false) { // Make sure the last teleport request was actually tpa and not tpahere
|
||||
throw new Exception(tl("requestSentAlready", player.getDisplayName()));
|
||||
}
|
||||
if(player.isAutoTeleportEnabled() && !player.isIgnoredPlayer(user)) {
|
||||
if (player.isAutoTeleportEnabled() && !player.isIgnoredPlayer(user)) {
|
||||
final Trade charge = new Trade(this.getName(), ess);
|
||||
Teleport teleport = user.getTeleport();
|
||||
teleport.setTpType(Teleport.TeleportType.TPA);
|
||||
|
@ -31,6 +31,9 @@ public class Commandtpauto extends EssentialsToggleCommand {
|
||||
user.setAutoTeleportEnabled(enabled);
|
||||
|
||||
user.sendMessage(enabled ? tl("autoTeleportEnabled") : tl("autoTeleportDisabled"));
|
||||
if (enabled && !user.isTeleportEnabled()) {
|
||||
user.sendMessage(tl("teleportationDisabledWarning"));
|
||||
}
|
||||
if (!sender.isPlayer() || !user.getBase().equals(sender.getPlayer())) {
|
||||
sender.sendMessage(enabled ? tl("autoTeleportEnabledFor", user.getDisplayName()) : tl("autoTeleportDisabledFor", user.getDisplayName()));
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ antiBuildInteract=\u00a74You are not permitted to interact with\u00a7c {0}\u00a7
|
||||
antiBuildPlace=\u00a74You are not permitted to place\u00a7c {0} \u00a74here.
|
||||
antiBuildUse=\u00a74You are not permitted to use\u00a7c {0}\u00a74.
|
||||
autoAfkKickReason=You have been kicked for idling more than {0} minutes.
|
||||
autoTeleportDisabled=\u00a76Automatic teleportation request approval \u00a7cdisabled\u00a76.
|
||||
autoTeleportDisabledFor=\u00a76Automatic teleportation request approval \u00a7cdisabled \u00a76for \u00a7c{0}\u00a76.
|
||||
autoTeleportEnabled=\u00a76Automatic teleportation request approval \u00a7cenabled\u00a76.
|
||||
autoTeleportEnabledFor=\u00a76Automatic teleportation request approval \u00a7cenabled \u00a76for \u00a7c{0}\u00a76.
|
||||
autoTeleportDisabled=\u00a76You are no longer automatically approving teleport requests.
|
||||
autoTeleportDisabledFor=\u00a7c{0}\u00a76 is no longer automatically approving teleport requests.
|
||||
autoTeleportEnabled=\u00a76You are now automatically approving teleport requests.
|
||||
autoTeleportEnabledFor=\u00a7c{0}\u00a76 is now automatically approving teleport requests.
|
||||
backAfterDeath=\u00a76Use the /back command to return to your death point.
|
||||
backupDisabled=\u00a74An external backup script has not been configured.
|
||||
backupFinished=\u00a76Backup finished.
|
||||
@ -509,6 +509,7 @@ teleportAll=\u00a76Teleporting all players...
|
||||
teleportationCommencing=\u00a76Teleportation commencing...
|
||||
teleportationDisabled=\u00a76Teleportation \u00a7cdisabled\u00a76.
|
||||
teleportationDisabledFor=\u00a76Teleportation \u00a7cdisabled \u00a76for \u00a7c{0}\u00a76.
|
||||
teleportationDisabledWarning=\u00a76You must enable teleportation before other players can teleport to you.
|
||||
teleportationEnabled=\u00a76Teleportation \u00a7cenabled\u00a76.
|
||||
teleportationEnabledFor=\u00a76Teleportation \u00a7cenabled \u00a76for \u00a7c{0}\u00a76.
|
||||
teleportAtoB=\u00a7c{0}\u00a76 teleported you to \u00a7c{1}\u00a76.
|
||||
|
Loading…
Reference in New Issue
Block a user