From 1994e8710ea4b55ef44fc017a282354acaea7ee5 Mon Sep 17 00:00:00 2001 From: OllieJW <71931263+OllieJW@users.noreply.github.com> Date: Sat, 18 Sep 2021 10:33:25 +0100 Subject: [PATCH] Permissions fix --- pom.xml | 8 +------- .../java/me/olliejw/oremarket/OreMarket.java | 18 +++++++++++------- src/main/resources/plugin.yml | 13 ++++++++++++- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 60c840c..02bc115 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.olliejw OreMarket - 2.2.2 + 2.2.3 jar OreMarket @@ -91,11 +91,5 @@ 2.10.10 provided - - org.projectlombok - lombok - RELEASE - provided - diff --git a/src/main/java/me/olliejw/oremarket/OreMarket.java b/src/main/java/me/olliejw/oremarket/OreMarket.java index cad8df7..a5cfe65 100644 --- a/src/main/java/me/olliejw/oremarket/OreMarket.java +++ b/src/main/java/me/olliejw/oremarket/OreMarket.java @@ -12,6 +12,7 @@ import me.olliejw.oremarket.utils.Updates; import net.milkbowl.vault.economy.Economy; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; @@ -38,20 +39,23 @@ public void onEnable() { saveDefaultConfig(); createGuiConfig(); - Logger logger = this.getLogger(); instance = this; // Spigot and bStats new Updates(this, 91015).getVersion(version -> { if (this.getDescription().getVersion().equalsIgnoreCase(version)) { - logger.info("OreMarket v" + version + " is up-to-date!"); + this.getServer().getConsoleSender().sendMessage(ChatColor.AQUA + " ___ __ __ "); + this.getServer().getConsoleSender().sendMessage(ChatColor.AQUA + " / _ \\ | \\/ | " + ChatColor.GREEN +"OreMarket v"+this.getDescription().getVersion()); + this.getServer().getConsoleSender().sendMessage(ChatColor.AQUA + " | (_) || |\\/| |"); + this.getServer().getConsoleSender().sendMessage(ChatColor.AQUA + " \\___/ |_| |_|"); + this.getServer().getConsoleSender().sendMessage(""); } else { - logger.info("============================"); - logger.info("OreMarket v" + version + " is now available!"); - logger.info("Your on still on v" + this.getDescription().getVersion()); - logger.info("spigotmc.org/resources/91015"); - logger.info("============================"); + this.getServer().getConsoleSender().sendMessage(ChatColor.RED + " ___ __ __ "); + this.getServer().getConsoleSender().sendMessage(ChatColor.RED + " / _ \\ | \\/ | " + ChatColor.RED +"OreMarket v"+this.getDescription().getVersion()); + this.getServer().getConsoleSender().sendMessage(ChatColor.RED + " | (_) || |\\/| | " + ChatColor.GREEN + "v" + version + " now available!"); + this.getServer().getConsoleSender().sendMessage(ChatColor.RED + " \\___/ |_| |_| " + ChatColor.GREEN + "Download at spigotmc.org"); + this.getServer().getConsoleSender().sendMessage(""); } }); final Metrics metrics = new Metrics(this, 10961); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0163bbc..b739340 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -6,6 +6,7 @@ depend: [ Vault ] softdepend: [ PlaceholderAPI ] authors: [ OllieJW ] description: Realistic stock market for ores +website: https://olliejw.me commands: openmarket: @@ -19,4 +20,14 @@ commands: usage: / om-crash: description: Crashes Market - usage: / \ No newline at end of file + usage: / + +permissions: + oremarket.crashmarket: + default: op + oremarket.reload: + default: op + oremarket.open: + default: not op + oremarket.stats: + default: not op \ No newline at end of file