Skip to content

Commit

Permalink
V1.2
Browse files Browse the repository at this point in the history
Adds /SVL reload
  • Loading branch information
zax71 authored Dec 19, 2021
1 parent 56d0a35 commit fa3b819
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/java/me/zax71/svl/SVL.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
import me.zax71.svl.commands.SVLCommand;
import me.zax71.svl.events.vote;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

public final class SVL extends JavaPlugin {

public static SVL plugin;
public String prefix = ChatColor.GOLD + "[" + ChatColor.GRAY + "SVL" + ChatColor.GOLD + "] ";


@Override
public void onEnable() {

// Config
plugin = this;
saveDefaultConfig();
Expand All @@ -34,8 +38,4 @@ public void onEnable() {
public void onDisable() {
// Plugin shutdown logic
}

public static void reloadSVL() {
reloadConfig();
}
}
12 changes: 11 additions & 1 deletion src/main/java/me/zax71/svl/commands/SVLCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.*;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import me.zax71.svl.SVL;

Expand All @@ -12,6 +13,15 @@ public class SVLCommand extends BaseCommand {
@CommandPermission("SVL.reload")
@Description("Reloads the configuration file")
public static void onReload(CommandSender sender, String[] args) {
SVL.reloadSVL();
SVL.plugin.reloadConfig();
sender.sendMessage(SVL.plugin.prefix + ChatColor.GREEN + "Successfully reloaded config.yml");
}

@Default
@HelpCommand
public static void onHelp(CommandSender sender, String[] args) {
sender.sendMessage(SVL.plugin.prefix + ChatColor.GREEN + "--- /SVL usage ---");
sender.sendMessage(SVL.plugin.prefix + ChatColor.GRAY + "/SVL help" + ChatColor.GREEN + " - This page");
sender.sendMessage(SVL.plugin.prefix + ChatColor.GRAY + "/SVL reload" + ChatColor.GREEN + " - Reload config.yml");
}
}
Binary file modified target/classes/me/zax71/svl/SVL.class
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion target/classes/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: SVL
version: '1.1'
version: '1.2'
main: me.zax71.svl.SVL
api-version: 1.17
prefix: SVL
Expand Down
4 changes: 2 additions & 2 deletions target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven
#Fri Nov 19 18:11:14 GMT 2021
#Sun Dec 19 12:13:23 GMT 2021
groupId=me.zax71
artifactId=SVL
version=1.1
version=1.2
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
me\zax71\svl\commands\SVLCommand.class
me\zax71\svl\events\vote.class
me\zax71\svl\SVL.class
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
D:\Users\Admin\Documents\coding\Java\plugins\SVL\src\main\java\me\zax71\svl\SVL.java
D:\Users\Admin\Documents\coding\Java\plugins\SVL\src\main\java\me\zax71\svl\events\vote.java
D:\Users\Admin\Documents\coding\Java\plugins\SVL\src\main\java\me\zax71\svl\commands\SVLCommand.java

0 comments on commit fa3b819

Please sign in to comment.