Skip to content

Commit

Permalink
Bug Fix: KeepInv was clearing drops
Browse files Browse the repository at this point in the history
  • Loading branch information
nickstuaw committed Oct 13, 2021
1 parent 03efe04 commit 41032ad
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .idea/artifacts/PersonalPVP_jar3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>xyz.nsgw.personalpvp</groupId>
<artifactId>PersonalPVP</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.5.0-SNAPSHOT-1</version>
<packaging>jar</packaging>

<name>PersonalPVP</name>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/xyz/nsgw/personalpvp/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ class DeathListener implements Listener {
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onDeath(final PlayerDeathEvent e) {
if(e.getEntity().getKiller() == null) return;
if(!PPVPPlugin.inst().conf().get().getProperty(GeneralConfig.KEEPINV_ON_PVP_DEATH)) return;
e.getDrops().clear();
e.setKeepInventory(PPVPPlugin.inst().conf().get().getProperty(GeneralConfig.KEEPINV_ON_PVP_DEATH));
e.setKeepInventory(true);
e.setKeepLevel(PPVPPlugin.inst().conf().get().getProperty(GeneralConfig.KEEPXP_ON_PVP_DEATH));
}
}
Expand Down

0 comments on commit 41032ad

Please sign in to comment.