SteamWar/SpigotCore
Archiviert
13
0

Fix local chat signing
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2022-08-05 12:10:19 +02:00
Ursprung 012fd7afcd
Commit ed89d2b37b
3 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -16,6 +16,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
LOCAL_CHAT=§eLocal §r{0}§8»§7 {1}
COMMAND_SYSTEM_ERROR = §cError executing the command!

Datei anzeigen

@ -16,6 +16,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
LOCAL_CHAT=§eLokal §r{0}§8»§7 {1}
COMMAND_SYSTEM_ERROR = §cFehler beim Ausführen des Befehls!

Datei anzeigen

@ -19,14 +19,17 @@
package de.steamwar.core.events;
import de.steamwar.core.Core;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
public class ChattingEvent implements Listener {
@EventHandler
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
private void onChat(AsyncPlayerChatEvent event) {
event.setFormat("§eLokal §r"+ event.getPlayer().getDisplayName() + "§8»§7 %2$s");
event.setCancelled(true);
Core.MESSAGE.broadcastPrefixless("LOCAL_CHAT", event.getPlayer().getDisplayName(), event.getMessage());
}
}