mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
2.1.24 - Critical Exploit Fix
This commit is contained in:
parent
363ea66335
commit
55fb3ed74f
@ -7,6 +7,9 @@ Key:
|
|||||||
! Change
|
! Change
|
||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
|
Version 2.1.24
|
||||||
|
Fixed an exploit where you could clone inventories
|
||||||
|
|
||||||
Version 2.1.23
|
Version 2.1.23
|
||||||
Fixed a bug with Double Drops for Mining (Update your configs instructions below)
|
Fixed a bug with Double Drops for Mining (Update your configs instructions below)
|
||||||
Fixed a 7 year old bug where damage in mcMMO from Skills was potentially getting reduced by damage reduction TWICE
|
Fixed a 7 year old bug where damage in mcMMO from Skills was potentially getting reduced by damage reduction TWICE
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.23</version>
|
<version>2.1.24</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -65,10 +65,19 @@ public class BlockListener implements Listener {
|
|||||||
if(is.getAmount() <= 0)
|
if(is.getAmount() <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
//Extra Protection
|
||||||
|
if(event.getBlock().getState() instanceof Container)
|
||||||
|
return;
|
||||||
|
|
||||||
if(event.getBlock().getState().getMetadata(mcMMO.doubleDropKey).size() > 0)
|
if(event.getBlock().getState().getMetadata(mcMMO.doubleDropKey).size() > 0)
|
||||||
|
{
|
||||||
|
event.getBlock().getState().removeMetadata(mcMMO.doubleDropKey, plugin);
|
||||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||||
|
}
|
||||||
|
|
||||||
else if(event.getBlock().getState().getMetadata(mcMMO.tripleDropKey).size() > 0)
|
else if(event.getBlock().getState().getMetadata(mcMMO.tripleDropKey).size() > 0)
|
||||||
{
|
{
|
||||||
|
event.getBlock().getState().removeMetadata(mcMMO.tripleDropKey, plugin);
|
||||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||||
}
|
}
|
||||||
|
@ -222,10 +222,10 @@ public class EntityListener implements Listener {
|
|||||||
if(defender.getMetadata(mcMMO.CUSTOM_DAMAGE_METAKEY).size() > 0)
|
if(defender.getMetadata(mcMMO.CUSTOM_DAMAGE_METAKEY).size() > 0)
|
||||||
{
|
{
|
||||||
defender.removeMetadata(mcMMO.CUSTOM_DAMAGE_METAKEY, plugin);
|
defender.removeMetadata(mcMMO.CUSTOM_DAMAGE_METAKEY, plugin);
|
||||||
LivingEntity defLive = (LivingEntity) defender;
|
|
||||||
|
|
||||||
if(defender instanceof Player)
|
if(defender instanceof Player)
|
||||||
{
|
{
|
||||||
|
LivingEntity defLive = (LivingEntity) defender;
|
||||||
defLive.setHealth(defLive.getHealth() - event.getFinalDamage());
|
defLive.setHealth(defLive.getHealth() - event.getFinalDamage());
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user