Skip to content

Commit

Permalink
Add option to require player online
Browse files Browse the repository at this point in the history
  • Loading branch information
ivall committed May 5, 2022
1 parent 02a21ed commit 6935eae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# VIshop-plugin
Plugin for Minecraft itemshop - VIshop.pl

Author of plugin: Author of plugin: [Kamilkime](https://github.com/Kamilkime)
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public static Set<Order> get(final OkHttpClient httpClient, final Config config)

final UUID orderId = UUID.fromString(order.getString("id"));
final String player = order.getString("player");
final boolean requirePlayerOnline = order.getJSONObject("product").getBoolean("require_player_online");
if (Bukkit.getServer().getPlayer(player) == null && requirePlayerOnline) {
Bukkit.getLogger().warning("Nieudane wykonanie zamówienia "+ orderId +". Gracz nie jest na serwerze.");
continue;
}
final List<String> commands = new ArrayList<>();

final JSONArray commandsArray = order.getJSONObject("product").getJSONArray("commands");
Expand Down

0 comments on commit 6935eae

Please sign in to comment.