Skip to content

Commit

Permalink
Added deny-drops to config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Wertik committed Aug 12, 2020
1 parent d768d33 commit 370b11f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>space.devport.wertik.firstdeathrewards</groupId>
<artifactId>FirstDeathRewards</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>

<name>FirstDeathRewards</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public void onDeath(PlayerDeathEvent event) {
event.setKeepInventory(plugin.getConfig().getBoolean("keep-inventory", false));
event.setKeepLevel(plugin.getConfig().getBoolean("keep-exp", false));

event.getDrops().clear();
if (plugin.getConfig().getBoolean("deny-drops", true)) {
event.getDrops().clear();
event.setDroppedExp(0);
}

plugin.getDataManager().getReward().give(player);
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ disabled-worlds:
keep-inventory: true
keep-exp: true

# Deny item and exp drops?
deny-drops: true

# Rewards given to player upon death
rewards:
inform:
Expand Down

0 comments on commit 370b11f

Please sign in to comment.