mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-24 16:21:22 +01:00
Option to send coordinate after death (#3207)
This commit is contained in:
parent
db410fb3e7
commit
b9f8fc2e11
@ -1,6 +1,7 @@
|
|||||||
package com.earth2me.essentials;
|
package com.earth2me.essentials;
|
||||||
|
|
||||||
import net.ess3.api.IEssentials;
|
import net.ess3.api.IEssentials;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -145,6 +146,10 @@ public class EssentialsEntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final User user = ess.getUser(event.getEntity());
|
final User user = ess.getUser(event.getEntity());
|
||||||
|
if (ess.getSettings().infoAfterDeath()) {
|
||||||
|
final Location loc = user.getLocation();
|
||||||
|
user.sendMessage(tl("infoAfterDeath", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||||
|
}
|
||||||
if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) {
|
if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) {
|
||||||
user.setLastLocation();
|
user.setLastLocation();
|
||||||
user.sendMessage(tl("backAfterDeath"));
|
user.sendMessage(tl("backAfterDeath"));
|
||||||
|
@ -358,4 +358,6 @@ public interface ISettings extends IConf {
|
|||||||
|
|
||||||
boolean isSpawnIfNoHome();
|
boolean isSpawnIfNoHome();
|
||||||
|
|
||||||
|
boolean infoAfterDeath();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1684,4 +1684,9 @@ public class Settings implements net.ess3.api.ISettings {
|
|||||||
public boolean isSpawnIfNoHome() {
|
public boolean isSpawnIfNoHome() {
|
||||||
return config.getBoolean("spawn-if-no-home", true);
|
return config.getBoolean("spawn-if-no-home", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean infoAfterDeath() {
|
||||||
|
return config.getBoolean("send-info-after-death", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -459,6 +459,9 @@ broadcast-afk-message: true
|
|||||||
# You can disable the death messages of Minecraft here.
|
# You can disable the death messages of Minecraft here.
|
||||||
death-messages: true
|
death-messages: true
|
||||||
|
|
||||||
|
# When players die, should they receive the coordinates they died at?
|
||||||
|
send-info-after-death: false
|
||||||
|
|
||||||
# Should players with permissions be able to join and part silently?
|
# Should players with permissions be able to join and part silently?
|
||||||
# You can control this with essentials.silentjoin and essentials.silentquit permissions if it is enabled.
|
# You can control this with essentials.silentjoin and essentials.silentquit permissions if it is enabled.
|
||||||
# In addition, people with essentials.silentjoin.vanish will be vanished on join.
|
# In addition, people with essentials.silentjoin.vanish will be vanished on join.
|
||||||
|
@ -189,6 +189,7 @@ ignoredList=\u00a76Ignored\:\u00a7r {0}
|
|||||||
ignoreExempt=\u00a74You may not ignore that player.
|
ignoreExempt=\u00a74You may not ignore that player.
|
||||||
ignorePlayer=\u00a76You ignore player\u00a7c {0} \u00a76from now on.
|
ignorePlayer=\u00a76You ignore player\u00a7c {0} \u00a76from now on.
|
||||||
illegalDate=Illegal date format.
|
illegalDate=Illegal date format.
|
||||||
|
infoAfterDeath=\u00a76You died in \u00a7e{0} \u00a76at \u00a7e{1}, {2}, {3}\u00a76.
|
||||||
infoChapter=\u00a76Select chapter\:
|
infoChapter=\u00a76Select chapter\:
|
||||||
infoChapterPages=\u00a7e ---- \u00a76{0} \u00a7e--\u00a76 Page \u00a7c{1}\u00a76 of \u00a7c{2} \u00a7e----
|
infoChapterPages=\u00a7e ---- \u00a76{0} \u00a7e--\u00a76 Page \u00a7c{1}\u00a76 of \u00a7c{2} \u00a7e----
|
||||||
infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a7c{0}\u00a76/\u00a7c{1} \u00a7e----
|
infoPages=\u00a7e ---- \u00a76{2} \u00a7e--\u00a76 Page \u00a7c{0}\u00a76/\u00a7c{1} \u00a7e----
|
||||||
|
Loading…
Reference in New Issue
Block a user