Skip to content

Commit

Permalink
allow custom bukkit platform & bump ver
Browse files Browse the repository at this point in the history
  • Loading branch information
Badbird5907 committed May 1, 2024
1 parent a643b11 commit 55d0707
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

public class BukkitCommander {
public static BukkitHelpService HELP_SERVICE = BukkitHelpService.INSTANCE;
public static Commander getCommander(Plugin plugin) {
BukkitPlatform platform = new BukkitPlatform(plugin);

public static Commander getCommander(BukkitPlatform platform) {
Commander impl = new CommanderImpl(platform)
.init()
.registerProvider(Player.class, new PlayerProvider())
Expand All @@ -61,7 +61,7 @@ public static Commander getCommander(Plugin plugin) {
if (!sender.isPlayer()) {
throw new LocalizedCommandException("must-be.player");
}
}else if (ctx.getCommandInfo().isAnnotationPresent(ConsoleOnly.class)) {
} else if (ctx.getCommandInfo().isAnnotationPresent(ConsoleOnly.class)) {
BukkitCommandSender sender = (BukkitCommandSender) ctx.getCommandSender();
if (!sender.isConsole()) {
throw new LocalizedCommandException("must-be.console");
Expand All @@ -77,4 +77,9 @@ public static Commander getCommander(Plugin plugin) {
impl.getResponseHandler().addBundle(ResourceBundle.getBundle("bukkit", impl.getResponseHandler().getLocale()));
return impl;
}

public static Commander getCommander(Plugin plugin) {
BukkitPlatform platform = new BukkitPlatform(plugin);
return getCommander(platform);
}
}
2 changes: 1 addition & 1 deletion Commander-Core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {
}

group = "net.octopvp"
version = "0.0.10-REL"
version = "0.0.11-REL"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion Commander-JDA/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = "net.octopvp"
version = "0.0.10-REL"
version = "0.0.11-REL"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ subprojects {
}
}
if (octomcRepository) {
maven ("https://repo.octopvp.net/public"){
maven ("https://repo.octopvp.net/repo"){
name = "octomc"
credentials(PasswordCredentials::class)
authentication {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.0.10-REL
version=0.0.11-REL

0 comments on commit 55d0707

Please sign in to comment.