Skip to content

Commit

Permalink
v1.0.4 - Minor fix and added 1.20 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Brannstroom committed Jul 13, 2023
1 parent 841cd08 commit 891ae78
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.brannstroom</groupId>
<artifactId>ExpBottle</artifactId>
<version>1.0.4</version>
<version>1.0.5</version>
<packaging>jar</packaging>

<name>ExpBottle</name>
Expand Down Expand Up @@ -75,7 +75,7 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import me.brannstroom.expbottle.handlers.InfoKeeper;
import me.brannstroom.expbottle.handlers.MainHandler;
import me.brannstroom.expbottle.model.Experience;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ public void onPlayerInteract(PlayerInteractEvent event) {
event.setCancelled(true);

Player player = event.getPlayer();
player.getInventory().remove(item);

if(item.getAmount() > 1) {
item.setAmount(item.getAmount() - 1);
} else {
player.getInventory().remove(item);
}

int bottledExperience = MainHandler.getBottledExperience(item);
Experience.changeExp(player, bottledExperience-1);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ExpBottle
version: ${project.version}
main: me.brannstroom.expbottle.ExpBottle
api-version: 1.13
api-version: 1.20
authors: [ MiniGutt ]

0 comments on commit 891ae78

Please sign in to comment.