Skip to content

Commit

Permalink
Fix command api & update version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchlueter committed Jun 9, 2023
1 parent 238f7ea commit 0c63238
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ plugins {
}

group = "de.oliver"
version = findProperty("version")!!
description = findProperty("description").toString()
version = "1.0.1"
description = "Economy plugin"

repositories {
mavenLocal()
Expand All @@ -29,9 +29,9 @@ dependencies {

compileOnly("me.clip:placeholderapi:2.11.3")

implementation("dev.jorel:commandapi-bukkit-shade:9.0.1")
compileOnly("dev.jorel:commandapi-annotations:9.0.1")
annotationProcessor("dev.jorel:commandapi-annotations:9.0.1")
implementation("dev.jorel:commandapi-bukkit-shade:9.0.2")
compileOnly("dev.jorel:commandapi-annotations:9.0.2")
annotationProcessor("dev.jorel:commandapi-annotations:9.0.2")
}

java {
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties

This file was deleted.

16 changes: 9 additions & 7 deletions src/main/java/de/oliver/fancyeconomy/FancyEconomy.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.List;


public class FancyEconomy extends JavaPlugin {

Expand Down Expand Up @@ -159,7 +161,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name())
.withArguments(
new MultiLiteralArgument("balance", "bal")
new MultiLiteralArgument(null, List.of("bal", "balance"))
.setListed(false)
)
.executesPlayer((sender, args) -> {
Expand All @@ -171,7 +173,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name())
.withArguments(
new MultiLiteralArgument("balance", "bal")
new MultiLiteralArgument(null, List.of("bal", "balance"))
.setListed(false)
)
.withArguments(new StringArgument("targetName").includeSuggestions(allPlayersSuggestion))
Expand All @@ -184,7 +186,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name())
.withArguments(
new MultiLiteralArgument("pay")
new MultiLiteralArgument(null, List.of("pay"))
.setListed(false)
)
.withArguments(new StringArgument("targetName").includeSuggestions(allPlayersSuggestion), new DoubleArgument("amount", 0.01))
Expand All @@ -197,7 +199,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name())
.withArguments(
new MultiLiteralArgument("withdraw")
new MultiLiteralArgument(null, List.of("withdraw"))
.setListed(false)
)
.withArguments(new DoubleArgument("amount"))
Expand All @@ -210,7 +212,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name() + ".admin")
.withArguments(
new MultiLiteralArgument("set")
new MultiLiteralArgument(null, List.of("set"))
.setListed(false)
)
.withArguments(new StringArgument("targetName").includeSuggestions(allPlayersSuggestion), new DoubleArgument("amount", 0.01))
Expand All @@ -223,7 +225,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name() + ".admin")
.withArguments(
new MultiLiteralArgument("add")
new MultiLiteralArgument(null, List.of("add"))
.setListed(false)
)
.withArguments(new StringArgument("targetName").includeSuggestions(allPlayersSuggestion), new DoubleArgument("amount", 0.01))
Expand All @@ -236,7 +238,7 @@ private void registerCommands(){
new CommandAPICommand(currency.name())
.withPermission("fancyeconomy." + currency.name() + ".admin")
.withArguments(
new MultiLiteralArgument("remove")
new MultiLiteralArgument(null, List.of("remove"))
.setListed(false)
)
.withArguments(new StringArgument("targetName").includeSuggestions(allPlayersSuggestion), new DoubleArgument("amount", 0.01))
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: FancyEconomy
main: de.oliver.fancyeconomy.FancyEconomy
authors: [ OliverHD ]
contributors: [ mani1232 ]
version: 1.0.0
version: 1.0.1
api-version: 1.19
website: https://github.com/FancyMcPlugins/FancyEconomy
softdepend:
Expand Down

0 comments on commit 0c63238

Please sign in to comment.