Skip to content

Commit

Permalink
Update KitManager.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jd07159 authored Jan 11, 2025
1 parent 0fff891 commit b44dc8f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/dev/noah/perplayerkit/KitManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,29 +525,29 @@ public boolean deleteKit(UUID uuid, int slot) {
private void applyKitLoadEffects(Player player, boolean isEnderChest) {

if (isEnderChest) {
if (plugin.getConfig().getBoolean("heal-on-enderchest-load", false)) {
if (plugin.getConfig().getBoolean("feature.heal-on-enderchest-load", false)) {
player.setHealth(20);
}
if (plugin.getConfig().getBoolean("feed-on-enderchest-load", false)) {
if (plugin.getConfig().getBoolean("feature.feed-on-enderchest-load", false)) {
player.setFoodLevel(20);
}
if (plugin.getConfig().getBoolean("set-saturation-on-enderchest-load", false)) {
if (plugin.getConfig().getBoolean("feature.set-saturation-on-enderchest-load", false)) {
player.setSaturation(20);
}
if (plugin.getConfig().getBoolean("remove-potion-effects-on-enderchest-load", false)) {
if (plugin.getConfig().getBoolean("feature.remove-potion-effects-on-enderchest-load", false)) {
player.getActivePotionEffects().forEach(potionEffect -> player.removePotionEffect(potionEffect.getType()));
}
} else {
if (plugin.getConfig().getBoolean("set-health-on-kit-load", false)) {
if (plugin.getConfig().getBoolean("feature.set-health-on-kit-load", false)) {
player.setHealth(20);
}
if (plugin.getConfig().getBoolean("set-hunger-on-kit-load", false)) {
if (plugin.getConfig().getBoolean("feature.set-hunger-on-kit-load", false)) {
player.setFoodLevel(20);
}
if (plugin.getConfig().getBoolean("set-saturation-on-kit-load", false)) {
if (plugin.getConfig().getBoolean("feature.set-saturation-on-kit-load", false)) {
player.setSaturation(20);
}
if (plugin.getConfig().getBoolean("remove-potion-effects-on-kit-load", false)) {
if (plugin.getConfig().getBoolean("feature.remove-potion-effects-on-kit-load", false)) {
player.getActivePotionEffects().forEach(potionEffect -> player.removePotionEffect(potionEffect.getType()));
}
}
Expand Down

0 comments on commit b44dc8f

Please sign in to comment.