Skip to content

Commit

Permalink
2.0.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
4drian3d committed Jun 4, 2022
1 parent 865b83c commit 8547ab4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = me.dreamerzero.kickredirect
version = 2.0.0
version = 2.0.1
description = Set the redirect result of your servers shutdown
url = https://github.com/4drian3d/KickRedirect
id = kickredirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.mojang.brigadier.Command;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.tree.LiteralCommandNode;
import com.velocitypowered.api.command.BrigadierCommand;
import com.velocitypowered.api.command.CommandSource;

Expand All @@ -12,7 +11,7 @@ public final class KickRedirectCommand {
private KickRedirectCommand(){}

public static void command(final KickRedirect plugin) {
final LiteralCommandNode<CommandSource> command = LiteralArgumentBuilder.<CommandSource>literal("kickredirect")
final var command = new BrigadierCommand(LiteralArgumentBuilder.<CommandSource>literal("kickredirect")
.requires(src -> src.hasPermission("kickredirect.command"))
.then(LiteralArgumentBuilder.<CommandSource>literal("reload")
.executes(cmd -> {
Expand All @@ -27,16 +26,17 @@ public static void command(final KickRedirect plugin) {
source.sendMessage(
plugin.formatter().format(
plugin.loadConfig()
? plugin.messages().get().reload().reloadMessage()
: plugin.messages().get().reload().failedReload(),
? config.get().reload().reloadMessage()
: config.get().reload().failedReload(),
source
));
return Command.SINGLE_SUCCESS;
})
).build();
).build());

var manager = plugin.getProxy().getCommandManager();
manager.register(manager.metaBuilder("kickredirect")
.plugin(plugin).build(), new BrigadierCommand(command));
manager.register(manager.metaBuilder(command)
.plugin(plugin)
.build(), command);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static class Config implements ConfigSection {
private int randomAttempts = 5;

@Comment("Enables debug mode")
private boolean debug = true;
private boolean debug = false;

public String[] getServersToRedirect(){
return this.serversToRedirect;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import me.dreamerzero.kickredirect.configuration.Configuration.ConfigSection;

public class ConfigurationContainer<C extends ConfigSection> {
public final class ConfigurationContainer<C extends ConfigSection> {
private C config;
private final HoconConfigurationLoader loader;
private final Class<C> clazz;
Expand Down

0 comments on commit 8547ab4

Please sign in to comment.