Skip to content

Commit

Permalink
Full inv items glitch patch
Browse files Browse the repository at this point in the history
  • Loading branch information
MrButtersDEV committed Feb 11, 2023
1 parent 4079291 commit 430cf01
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package us.thezircon.play.autopickup.listeners;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.inventory.ItemStack;
import us.thezircon.play.autopickup.AutoPickup;
import us.thezircon.play.autopickup.utils.AutoSmelt;
import us.thezircon.play.autopickup.utils.PickupObjective;

import java.util.HashMap;
Expand All @@ -24,7 +22,6 @@ public class ItemSpawnEventListener implements Listener {
@EventHandler
public void onSpawn(ItemSpawnEvent e) {
boolean doBlacklist = PLUGIN.getBlacklistConf().getBoolean("doBlacklisted");

List<String> blacklist = PLUGIN.getBlacklistConf().getStringList("Blacklisted");

if (AutoPickup.worldsBlacklist!=null && AutoPickup.worldsBlacklist.contains(e.getLocation().getWorld().getName())) {
Expand Down Expand Up @@ -55,7 +52,7 @@ public void onSpawn(ItemSpawnEvent e) {
e.getEntity().remove();
if (leftOver.keySet().size()>0) {
for (ItemStack items : leftOver.values()) {
player.getWorld().dropItemNaturally(loc, items);
player.getWorld().dropItemNaturally(new Location(loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()).add(.5,0,.5), items);
}
}
// if (player.getInventory().firstEmpty()!=-1) {
Expand Down

0 comments on commit 430cf01

Please sign in to comment.