Add Permission Multilingual
Dieser Commit ist enthalten in:
Ursprung
1d450321c5
Commit
7fee0669a1
@ -1 +1,9 @@
|
||||
PREFIX = §eBau§8System §8»
|
||||
|
||||
PERMISSION_WORLD = Einstellungen vornehmen
|
||||
PERMISSION_WORLD_EDIT = WorldEdit verwenden
|
||||
|
||||
PERMISSION_CHANGE_YOU_ENABLE = §aDer Spieler darf nun {0}
|
||||
PERMISSION_CHANGE_YOU_DISABLE = §cDer Spieler darf nun nicht mehr {0}
|
||||
PERMISSION_CHANGE_OTHER_ENABLE = §aDu kannst nun auf der Welt von §6{0}§a {1}
|
||||
PERMISSION_CHANGE_OTHER_DISABLE = §cDu kannst nun nicht mehr auf der Welt von §6{0}§c {1}
|
@ -1 +0,0 @@
|
||||
PREFIX = §eBau§8System §8»
|
@ -37,8 +37,8 @@ import java.util.logging.Level;
|
||||
|
||||
public class BauSystem extends JavaPlugin implements Listener {
|
||||
|
||||
@Getter
|
||||
private static Message message;
|
||||
// This should be treated as final!
|
||||
public static Message MESSAGE;
|
||||
|
||||
@Getter
|
||||
private static BauSystem instance;
|
||||
@ -50,7 +50,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
// LOGGER
|
||||
fixLogging();
|
||||
|
||||
message = new Message("BauSystem", getClassLoader());
|
||||
MESSAGE = new Message("BauSystem", getClassLoader());
|
||||
|
||||
instance = this;
|
||||
SWUtils.setBausystem(instance);
|
||||
|
@ -36,11 +36,11 @@ public enum Permission {
|
||||
|
||||
WORLD(BauweltMember::isWorld, (player, target) -> {
|
||||
target.setWorld(!target.isWorld());
|
||||
sendMessages(player, target.isWorld(), target, "Einstellungen vornehmen");
|
||||
sendMessages(player, target.isWorld(), target, "PERMISSION_WORLD");
|
||||
}),
|
||||
WORLDEDIT(BauweltMember::isWorldEdit, (player, target) -> {
|
||||
target.setWorldEdit(!target.isWorldEdit());
|
||||
sendMessages(player, target.isWorldEdit(), target, "WorldEdit verwenden");
|
||||
sendMessages(player, target.isWorldEdit(), target, "PERMISSION_WORLD_EDIT");
|
||||
}),
|
||||
MEMBER(bauweltMember -> true),
|
||||
OWNER(bauweltMember -> false);
|
||||
@ -69,15 +69,15 @@ public enum Permission {
|
||||
Player targetPlayer = Bukkit.getPlayer(SteamwarUser.get(target.getMemberID()).getUUID());
|
||||
if (targetPlayer != null) {
|
||||
if (ableTo) {
|
||||
targetPlayer.sendMessage(BauSystem.PREFIX + "§aDu kannst nun auf der Welt von §6" + player.getName() + "§a " + what);
|
||||
BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_ENABLE", player, player.getName(), what);
|
||||
} else {
|
||||
targetPlayer.sendMessage(BauSystem.PREFIX + "§cDu kannst nun nicht mehr auf der Welt von §6" + player.getName() + "§c " + what);
|
||||
BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_DISABLE", player, player.getName(), what);
|
||||
}
|
||||
}
|
||||
if (ableTo) {
|
||||
player.sendMessage(BauSystem.PREFIX + "§aDer Spieler darf nun " + what);
|
||||
BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_ENABLE", player, what);
|
||||
} else {
|
||||
player.sendMessage(BauSystem.PREFIX + "§cDer Spieler darf nun nicht mehr " + what);
|
||||
BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_DISABLE", player, what);
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren