mirror of https://github.com/LOOHP/Limbo.git
Corrected conditions to better meet expectations
This commit is contained in:
parent
a7f6a34fbe
commit
268b8dc234
|
|
@ -249,7 +249,7 @@ public class Player extends LivingEntity implements CommandSender {
|
|||
public void chat(String message) {
|
||||
String format = "<%name%> %message%";
|
||||
PlayerChatEvent event = (PlayerChatEvent) Limbo.getInstance().getEventsManager().callEvent(new PlayerChatEvent(this, format, message, false));
|
||||
if ((!event.isCancelled() || this.hasPermission("limboserver.chat")) && Limbo.getInstance().getServerProperties().isAllowChat()) {
|
||||
if (!event.isCancelled() && (Limbo.getInstance().getServerProperties().isAllowChat() || this.hasPermission("limboserver.chat"))) {
|
||||
String chat = event.getFormat().replace("%name%", username).replace("%message%", event.getMessage());
|
||||
Limbo.getInstance().getConsole().sendMessage(chat);
|
||||
for (Player each : Limbo.getInstance().getPlayers()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue