mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
Rename per request
This commit is contained in:
1 parent
d4cf721272
commit
787a78c935
4 files changed
+5
-5
No files matched your search
@@ -105,6 +105,6 @@ public abstract class ChatChannel {
|
|||||||
|
|
||||||
public String processPlaceholders(ChatUser user, String input) { return input; }
|
public String processPlaceholders(ChatUser user, String input) { return input; }
|
||||||
|
|
||||||
public abstract boolean isCanceled();
|
public abstract boolean shouldCancelChatEvent();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -438,7 +438,7 @@ public class CarbonChatChannel extends ChatChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCanceled() {
|
public boolean shouldCancelChatEvent() {
|
||||||
return getBoolean("cancel");
|
return getBoolean("cancel-message-event");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ public class BukkitChatListener implements Listener {
|
|||||||
ChatUser user = carbonChat.getUserService().wrap(event.getPlayer());
|
ChatUser user = carbonChat.getUserService().wrap(event.getPlayer());
|
||||||
ChatChannel channel = user.getSelectedChannel();
|
ChatChannel channel = user.getSelectedChannel();
|
||||||
|
|
||||||
if (channel.isCanceled()) event.setCancelled(true);
|
if (channel.shouldCancelChatEvent()) event.setCancelled(true);
|
||||||
|
|
||||||
for (ChatChannel entry : carbonChat.getChannelManager().getRegistry().values()) {
|
for (ChatChannel entry : carbonChat.getChannelManager().getRegistry().values()) {
|
||||||
if (entry.getMessagePrefix() == null) {
|
if (entry.getMessagePrefix() == null) {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ default:
|
|||||||
# The messages will still go through, however other plugins should assume they didn't.
|
# The messages will still go through, however other plugins should assume they didn't.
|
||||||
# As such, setting this on private channels is recommended.
|
# As such, setting this on private channels is recommended.
|
||||||
# For example, use this if DiscordSRV is sending messages when you don't want it to.
|
# For example, use this if DiscordSRV is sending messages when you don't want it to.
|
||||||
cancel: false
|
cancel-message-event: false
|
||||||
|
|
||||||
channels:
|
channels:
|
||||||
global:
|
global:
|
||||||
|
|||||||
Reference in new issue
Block a user