Skip to content

Commit

Permalink
Try to fix a bug occurred in giving items
Browse files Browse the repository at this point in the history
Remove feather falling enchantments from boots
  • Loading branch information
iceBear67 committed Oct 22, 2024
1 parent 4aed21d commit c987c2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 4 additions & 6 deletions src/main/java/dev/tylerm/khs/game/PlayerLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ public static void resetPlayer(Player player, Board board) {
loadPlayer(player);
if (board.isSeeker(player)) {
if (pvpEnabled) {
for (int i = 0; i < Math.min(9, SEEKER_ITEMS.size()-1); i++) {
if (SEEKER_ITEMS.get(i) == null) continue;
player.getInventory().setItem(i, SEEKER_ITEMS.get(i));
for (ItemStack seekerItem : SEEKER_ITEMS) {
if(seekerItem!=null) player.getInventory().addItem(seekerItem);
}
if (Items.SEEKER_HELM != null)
player.getInventory().setHelmet(Items.SEEKER_HELM);
Expand All @@ -107,9 +106,8 @@ public static void resetPlayer(Player player, Board board) {
player.addPotionEffect(effect);
} else if (board.isHider(player)) {
if (pvpEnabled) {
for (int i = 0; i < Math.min(9, HIDER_ITEMS.size()-1); i++) {
if (HIDER_ITEMS.get(i) == null) continue;
player.getInventory().setItem(i, HIDER_ITEMS.get(i));
for (ItemStack item : HIDER_ITEMS) {
if(item!=null)player.getInventory().addItem(item);
}
if (Items.HIDER_HELM != null)
player.getInventory().setHelmet(Items.HIDER_HELM);
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ items:
material: LEATHER_LEGGINGS
'boots':
material: LEATHER_BOOTS
enchantments:
feather_falling: 4

hider:
'0':
Expand All @@ -50,10 +48,6 @@ items:
name: '&b击退棍'
lore:
- '&f"Combo master!"'
'boots':
material: LEATHER_BOOTS
enchantments:
feather_falling: 1
effects:
seeker:
'0':
Expand Down

0 comments on commit c987c2f

Please sign in to comment.