mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Fix wrong message length check (#5041)
This commit is contained in:
parent
422f25af8b
commit
ee7c1b1cf1
@ -96,7 +96,7 @@ public abstract class AbstractChatHandler {
|
||||
format = format.replace("{9}", nickname == null ? username : nickname);
|
||||
|
||||
// Local, shout and question chat types are only enabled when there's a valid radius
|
||||
if (chat.getRadius() > 0 && event.getMessage().length() > 1) {
|
||||
if (chat.getRadius() > 0 && event.getMessage().length() > 0) {
|
||||
if (chat.getType().isEmpty()) {
|
||||
if (user.isToggleShout() && event.getMessage().charAt(0) == ess.getSettings().getChatShout()) {
|
||||
event.setMessage(event.getMessage().substring(1));
|
||||
@ -139,7 +139,7 @@ public abstract class AbstractChatHandler {
|
||||
|
||||
final User user = chat.getUser();
|
||||
|
||||
if (event.getMessage().length() > 1) {
|
||||
if (event.getMessage().length() > 0) {
|
||||
if (chat.getType().isEmpty()) {
|
||||
if (!user.isAuthorized("essentials.chat.local")) {
|
||||
user.sendMessage(tl("notAllowedToLocal"));
|
||||
|
Loading…
Reference in New Issue
Block a user