Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ allprojects {
apply(plugin = "com.gradleup.shadow")

group = "dev.shiza"
version = "1.0.0"
version = "1.0.1"

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

bungee {
main = "dev.shiza.itemshopsys.bukkit.ItemShopBungeePlugin"
main = "dev.shiza.itemshopsys.bungee.ItemShopBungeePlugin"
name = "itemshopsys"
version = project.version.toString()
author = "shiza"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,28 @@ public ExecutableCommands retrieveCommands(final String shopId, final String ser
.routeParam("shopId", shopId)
.routeParam("serverId", serverId)
.asObject(ExecutableCommands.class);

if (response.getStatus() == 200) {
return response.getBody();
}

switch (response.getStatus()) {
case 429:
logger.debug("Rate limit exceeded, commands could not be retrieved.");
return EMPTY_COMMANDS;
case 503:
logger.debug("Service unavailable, commands could not be retrieved.");
return EMPTY_COMMANDS;
case 400:
logger.debug("Server token is invalid or is empty, commands could not be retrieved.");
return EMPTY_COMMANDS;
case 404:
logger.debug("Invalid shop or server parameters, commands could not be retrieved. Make sure that you have passed them correctly.");
return EMPTY_COMMANDS;
default:
break;
logger.debug("Received unknown HTTP status from ItemShopSys API during commands fetching. Received status code: " + response.getStatus());
return EMPTY_COMMANDS;
}
return response.getBody();
}

@Override
Expand Down