diff --git a/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java b/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java index 7e2c634bf..0f1bbd7aa 100644 --- a/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java +++ b/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java @@ -46,15 +46,17 @@ public static void givePrize(@NotNull final Player player, @Nullable Prize prize prize = prize.hasPermission(player) ? prize.getAlternativePrize() : prize; - final int pulls = getCurrentPulls(prize, crate); + if (!player.isOp()) { + final int pulls = getCurrentPulls(prize, crate); - if (pulls != -1 && pulls < prize.getMaxPulls()) { - YamlConfiguration configuration = Files.data.getConfiguration(); + if (pulls != -1 && pulls < prize.getMaxPulls()) { + YamlConfiguration configuration = Files.data.getConfiguration(); - configuration.set("Prizes." + crate.getFileName() + "." + prize.getSectionName() + ".Pulls", pulls + 1); + configuration.set("Prizes." + crate.getFileName() + "." + prize.getSectionName() + ".Pulls", pulls + 1); - // save to file! - Files.data.save(); + // save to file! + Files.data.save(); + } } for (ItemStack item : prize.getEditorItems()) {