mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Add alias support
This commit is contained in:
1 parent
ebb6b67ab4
commit
5c0d901aaf
2 files changed
+4
-1
No files matched your search
@@ -147,7 +147,9 @@ public class ChannelManager {
|
|||||||
|
|
||||||
CommandManager commandManager = simpleChat.getCommandManager().getCommandManager();
|
CommandManager commandManager = simpleChat.getCommandManager().getCommandManager();
|
||||||
|
|
||||||
commandManager.getCommandReplacements().addReplacement("channelName", channel.getName().toLowerCase());
|
String commandName = section.contains("aliases") ? section.getString("aliases") : channel.getName();
|
||||||
|
|
||||||
|
commandManager.getCommandReplacements().addReplacement("channelName", commandName);
|
||||||
commandManager.registerCommand(new AliasedChannelCommand(simpleChat, channel));
|
commandManager.registerCommand(new AliasedChannelCommand(simpleChat, channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ default:
|
|||||||
channels:
|
channels:
|
||||||
global:
|
global:
|
||||||
name: 'Global'
|
name: 'Global'
|
||||||
|
aliases: 'global|g'
|
||||||
id: -1 # Set to -1, comment out, or remove to disable channel bridge
|
id: -1 # Set to -1, comment out, or remove to disable channel bridge
|
||||||
webhook: '' # Comment out / remove to disable webhook
|
webhook: '' # Comment out / remove to disable webhook
|
||||||
default: true # Removing this option defaults to 'false'
|
default: true # Removing this option defaults to 'false'
|
||||||
|
|||||||
Reference in new issue
Block a user