Skip to content

Commit

Permalink
Permissions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
OllieJW authored Sep 18, 2021
1 parent 5789cc0 commit 1994e87
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
8 changes: 1 addition & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.olliejw</groupId>
<artifactId>OreMarket</artifactId>
<version>2.2.2</version>
<version>2.2.3</version>
<packaging>jar</packaging>

<name>OreMarket</name>
Expand Down Expand Up @@ -91,11 +91,5 @@
<version>2.10.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>RELEASE</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
18 changes: 11 additions & 7 deletions src/main/java/me/olliejw/oremarket/OreMarket.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
13 changes: 12 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ depend: [ Vault ]
softdepend: [ PlaceholderAPI ]
authors: [ OllieJW ]
description: Realistic stock market for ores
website: https://olliejw.me

commands:
openmarket:
Expand All @@ -19,4 +20,14 @@ commands:
usage: /<command>
om-crash:
description: Crashes Market
usage: /<command>
usage: /<command>

permissions:
oremarket.crashmarket:
default: op
oremarket.reload:
default: op
oremarket.open:
default: not op
oremarket.stats:
default: not op

0 comments on commit 1994e87

Please sign in to comment.