Dieser Commit ist enthalten in:
Ursprung
012fd7afcd
Commit
ed89d2b37b
@ -16,6 +16,7 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# 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!
|
COMMAND_SYSTEM_ERROR = §cError executing the command!
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# 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!
|
COMMAND_SYSTEM_ERROR = §cFehler beim Ausführen des Befehls!
|
||||||
|
|
||||||
|
@ -19,14 +19,17 @@
|
|||||||
|
|
||||||
package de.steamwar.core.events;
|
package de.steamwar.core.events;
|
||||||
|
|
||||||
|
import de.steamwar.core.Core;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
public class ChattingEvent implements Listener {
|
public class ChattingEvent implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
private void onChat(AsyncPlayerChatEvent event) {
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren