mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Trying fix display item can be pickup by hopper
Former-commit-id: 50ead2f2f8628d0c998daf0f950a26e75083322f
This commit is contained in:
1 parent
a9a12658f6
commit
454a6bcd98
3 files changed
+4
-6
No files matched your search
@@ -127,10 +127,6 @@ public class BlockListener implements Listener {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
Block removeHopper=(Block)h;
|
||||
removeHopper.setType(Material.AIR);
|
||||
plugin.getLogger().warning("[Exploit Alert] a Hopper tried to move the item of "+shop);
|
||||
Util.sendMessageToOps(ChatColor.RED+"[QuickShop][Exploit alert] A Hopper tried to move the item of "+shop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,6 @@ public class DisplayProtectionListener implements Listener {
|
||||
}
|
||||
|
||||
boolean itemStackCheck(ItemStack is) {
|
||||
return is!=null && is.getItemMeta()!=null && is.getItemMeta().hasDisplayName() && is.getItemMeta().getDisplayName().startsWith(ChatColor.RED + "QuickShop ");
|
||||
return is!=null & is.getItemMeta().hasDisplayName() && is.getItemMeta().getDisplayName().startsWith(ChatColor.RED + "QuickShop ");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.maxgamer.quickshop.Shop;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
@@ -66,7 +68,7 @@ public class DisplayItem {
|
||||
}
|
||||
public void safeGuard(Item item) {
|
||||
item.setPickupDelay(Integer.MAX_VALUE);
|
||||
item.setCustomName(ChatColor.RED + "QuickShop " + Util.getName(iStack) + " " + nextId++);
|
||||
item.setCustomName(ChatColor.RED + "QuickShop "+UUID.randomUUID().toString().replaceAll("-", ""));
|
||||
}
|
||||
/**
|
||||
* Removes all items floating ontop of the chest that aren't the display
|
||||
|
||||
Reference in new issue
Block a user