Dieser Commit ist enthalten in:
Ursprung
36e0c4c910
Commit
4c7f56be7c
@ -31,6 +31,7 @@ import de.steamwar.bausystem.features.world.WorldEditListener;
|
||||
import de.steamwar.bausystem.utils.WorldEditUtils;
|
||||
import de.steamwar.inventory.SWAnvilInv;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -192,7 +193,7 @@ public class SteamWarLuaPlugin extends TwoArgFunction {
|
||||
class Print extends VarArgFunction {
|
||||
@Override
|
||||
public Varargs invoke(Varargs args) {
|
||||
player.sendMessage(varArgsToString(args).replaceAll("&([a-z0-9klmnor])", "§\1"));
|
||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', varArgsToString(args)));
|
||||
return LuaValue.NIL;
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package de.steamwar.bausystem.features.script.lua.libs;
|
||||
import de.steamwar.linkage.Linked;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.luaj.vm2.LuaTable;
|
||||
@ -94,7 +94,7 @@ public class PlayerLib implements LuaLib {
|
||||
|
||||
@Override
|
||||
public Varargs invoke(Varargs args) {
|
||||
player.sendMessage(varArgsToString(args).replaceAll("&([a-z0-9klmnor])", "§\1"));
|
||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', varArgsToString(args)));
|
||||
return LuaValue.NIL;
|
||||
}
|
||||
}
|
||||
@ -108,7 +108,7 @@ public class PlayerLib implements LuaLib {
|
||||
|
||||
@Override
|
||||
public Varargs invoke(Varargs args) {
|
||||
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(varArgsToString(args).replaceAll("&([a-z0-9klmnor])", "§\1")));
|
||||
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&', varArgsToString(args))));
|
||||
return LuaValue.NIL;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren