mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
2.1.27 - Fixed an exploit that allowed players to dupe torches, rails, etc
This commit is contained in:
@ -62,6 +62,9 @@ public class BlockListener implements Listener {
|
||||
{
|
||||
ItemStack is = new ItemStack(item.getItemStack());
|
||||
|
||||
if(!event.getBlock().getDrops().contains(is))
|
||||
continue;
|
||||
|
||||
if(is.getAmount() <= 0)
|
||||
continue;
|
||||
|
||||
@ -70,6 +73,7 @@ public class BlockListener implements Listener {
|
||||
//Extra Protection
|
||||
if(event.getBlock().getState() instanceof Container)
|
||||
return;
|
||||
|
||||
event.getBlock().getState().removeMetadata(mcMMO.doubleDropKey, plugin);
|
||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||
}
|
||||
|
Reference in New Issue
Block a user