mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +00:00
Shade in CommandAPI and fix startup issue
This commit is contained in:
1 parent
0807506045
commit
e258b57a1f
3 files changed
+11
-3
No files matched your search
+1
-1
@@ -51,7 +51,7 @@ dependencies {
|
|||||||
compile 'io.lettuce:lettuce-core:6.0.0.M1'
|
compile 'io.lettuce:lettuce-core:6.0.0.M1'
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
compileOnly "dev.jorel:commandapi-core:4.0"
|
compile "dev.jorel:commandapi-shade:4.1"
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.143'
|
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.143'
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.draycia.carbon;
|
package net.draycia.carbon;
|
||||||
|
|
||||||
|
import dev.jorel.commandapi.CommandAPI;
|
||||||
import net.draycia.carbon.channels.contexts.impl.EconomyContext;
|
import net.draycia.carbon.channels.contexts.impl.EconomyContext;
|
||||||
import net.draycia.carbon.channels.contexts.impl.DistanceContext;
|
import net.draycia.carbon.channels.contexts.impl.DistanceContext;
|
||||||
import net.draycia.carbon.channels.contexts.impl.TownyContext;
|
import net.draycia.carbon.channels.contexts.impl.TownyContext;
|
||||||
@@ -51,8 +52,14 @@ public final class CarbonChat extends JavaPlugin {
|
|||||||
.useUnusualXRepeatedCharacterHexFormat()
|
.useUnusualXRepeatedCharacterHexFormat()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoad() {
|
||||||
|
CommandAPI.onLoad(false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
CommandAPI.onEnable(this);
|
||||||
Metrics metrics = new Metrics(this, BSTATS_PLUGIN_ID);
|
Metrics metrics = new Metrics(this, BSTATS_PLUGIN_ID);
|
||||||
|
|
||||||
// Ensure config is present to be modified by the user
|
// Ensure config is present to be modified by the user
|
||||||
@@ -160,7 +167,9 @@ public final class CarbonChat extends JavaPlugin {
|
|||||||
loadModConfig();
|
loadModConfig();
|
||||||
loadLanguage();
|
loadLanguage();
|
||||||
loadCommandsConfig();
|
loadCommandsConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reloadFilters() {
|
||||||
filterHandler.reloadFilters();
|
filterHandler.reloadFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,13 +35,12 @@ public class ChatReloadCommand {
|
|||||||
|
|
||||||
private void execute(CommandSender sender, Object[] args) {
|
private void execute(CommandSender sender, Object[] args) {
|
||||||
carbonChat.reloadConfig();
|
carbonChat.reloadConfig();
|
||||||
|
carbonChat.reloadFilters();
|
||||||
|
|
||||||
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getLanguage().getString("reloaded"),
|
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getLanguage().getString("reloaded"),
|
||||||
"br", "\n");
|
"br", "\n");
|
||||||
|
|
||||||
carbonChat.getAdventureManager().getAudiences().audience(sender).sendMessage(message);
|
carbonChat.getAdventureManager().getAudiences().audience(sender).sendMessage(message);
|
||||||
|
|
||||||
// TODO: Ensure moderation filters ETC are updated when reloading.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user