diff --git a/build.gradle b/build.gradle index f140928..4aabdd4 100644 --- a/build.gradle +++ b/build.gradle @@ -82,27 +82,11 @@ String hangarType = isBeta ? "Beta" : "Release" String description = """ # Please take backups and report any bugs you find! -## Breaking Changes: - * Only supports 1.20+ - * Permissions have changed, You can view the updated permissions @ https://docs.crazycrew.us/crazyauctions/info/commands/permissions - ## Changes: - * Re-organized and cleaned up a large portion of the code, Functionality shouldn't change - * Added proper tab completion - * Added proper permissions to plugin.yml - * The permission for /crazyauctions reload is now crazyauctions.reload + * Add missing player names for the ah view command ## Fixes: - * Fixed a permission check for the /ah gui - -## Optimizations: - * Only use uuid for hashmap's / arrays as god intended. - -## Warning: - * Data is still stored only using name's which is terrible but at the moment it's annoying to remove, It will change in the next few versions after some more clean up is made. - -## Developers: - * Do not rely on any methods in CrazyAuctions as an API, it will constantly be refactored and moved around until told otherwise. + * Fix tab complete order ## Other: * [Feature Requests](https://github.com/Crazy-Crew/${rootProject.name}/issues) diff --git a/gradle.properties b/gradle.properties index 257e0a2..0575eb0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ issues = https://github.com/Crazy-Crew/CrazyAuctions/issues group = com.badbones69.crazyauctions description = Auction off items in style. -version = 1.3 +version = 1.3.1 apiVersion = 1.20 minecraftVersion = 1.20.2 \ No newline at end of file diff --git a/paper/src/main/java/com/badbones69/crazyauctions/paper/commands/AuctionTab.java b/paper/src/main/java/com/badbones69/crazyauctions/paper/commands/AuctionTab.java index 3582b84..7c82881 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/paper/commands/AuctionTab.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/paper/commands/AuctionTab.java @@ -1,8 +1,11 @@ package com.badbones69.crazyauctions.paper.commands; +import com.badbones69.crazyauctions.paper.CrazyAuctions; +import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; +import org.bukkit.entity.Player; import org.bukkit.util.StringUtil; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; @@ -10,6 +13,8 @@ import java.util.Arrays; import java.util.List; public class AuctionTab implements TabCompleter { + + private final CrazyAuctions plugin = CrazyAuctions.get(); @Override public List onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String commandLabel, String[] args) { @@ -28,23 +33,17 @@ public class AuctionTab implements TabCompleter { if (hasPermission(sender, "bid")) completions.add("bid"); return StringUtil.copyPartialMatches(args[0], completions, new ArrayList<>()); } else if (args.length == 2) { // /crazyauctions arg0 + switch (args[0].toLowerCase()) { + case "bid", "sell" -> completions.addAll(Arrays.asList("50", "100", "250", "500", "1000", "2500", "5000", "10000")); + case "view" -> completions.addAll(this.plugin.getServer().getOnlinePlayers().stream().map(Player::getName).toList()); + } return StringUtil.copyPartialMatches(args[1], completions, new ArrayList<>()); } else if (args.length == 3) { // /crazyauctions arg0 arg1 switch (args[0].toLowerCase()) { - case "bid", "sell" -> { - if (hasPermission(sender, "bid") || hasPermission(sender, "sell")) completions.addAll(Arrays.asList("50", "100", "250", "500", "1000", "2500", "5000", "10000")); - } + case "bid", "sell" -> completions.addAll(Arrays.asList("1", "2", "4", "8", "10", "20", "40", "64")); } return StringUtil.copyPartialMatches(args[2], completions, new ArrayList<>()); - } else if (args.length == 4) { // /crazyauctions arg0 arg1 arg2 - switch (args[0].toLowerCase()) { - case "bid", "sell" -> { - if (hasPermission(sender, "bid") || hasPermission(sender, "sell")) completions.addAll(Arrays.asList("50", "100", "250", "500", "1000", "2500", "5000", "10000")); - } - } - - return StringUtil.copyPartialMatches(args[3], completions, new ArrayList<>()); } return new ArrayList<>(); diff --git a/paper/src/main/resources/paper-plugin.yml b/paper/src/main/resources/paper-plugin.yml deleted file mode 100644 index 7552ffe..0000000 --- a/paper/src/main/resources/paper-plugin.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: '${name}' -main: '${group}.CrazyAuctions' - -version: '${version}' -api-version: '${apiVersion}' -description: '${description}' - -bootstrapper: '${group}.CrazyStarter' \ No newline at end of file