Skip to content

Commit

Permalink
Merge pull request #166 from SpaceServerUniverse/dev/syoyu-fix-a
Browse files Browse the repository at this point in the history
やばバグ
  • Loading branch information
m1sk9 authored Oct 23, 2024
2 parents cb9f034 + af6e4c8 commit e9abbe9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package space.yurisi.universecorev2.subplugins.autocollect.event;

import net.kyori.adventure.text.Component;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
Expand All @@ -20,6 +21,7 @@ public class AutoCollectListener implements Listener{
public void onDrop(BlockDropItemEvent event) {
Player player = event.getPlayer();
if(!AutoCollectMap.getInstance().isAutoCollect(player)) return;
event.setCancelled(true);
List<Item> itemEntity = event.getItems();
outside:for(int i = 0; i < itemEntity.size(); i++){
ItemStack dropItem = itemEntity.get(i).getItemStack();
Expand Down Expand Up @@ -50,7 +52,7 @@ public void onDrop(BlockDropItemEvent event) {
player.getWorld().dropItem(player.getLocation(), item);
}
if(isDrop){
Message.sendWarningMessage(player, AutoCollectCommand.ACCommand, "インベントリが満杯です!");
player.sendActionBar(Component.text("§b" + AutoCollectCommand.ACCommand + " §6インベントリが満杯です!"));
}
}

Expand Down

0 comments on commit e9abbe9

Please sign in to comment.