Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
byteful committed Jun 17, 2024
1 parent 4099e60 commit 332dd34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ shadowJar {
def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ protected void handle(LevelToolsItem tool, Player player, double modifier) {
int newLevel = tool.getLevel() + 1;
final int maxLevel = LevelToolsPlugin.getInstance().getConfig().getInt("max_level");

if (newLevel > maxLevel && tool.getXp() != tool.getMaxXp()) {
tool.setXp(tool.getMaxXp());
LevelToolsUtil.setHand(player, tool.getItemStack());
if (newLevel > maxLevel) {
if (tool.getXp() != tool.getMaxXp()) {
tool.setXp(tool.getMaxXp());
LevelToolsUtil.setHand(player, tool.getItemStack());
}
return;
}

Expand Down

0 comments on commit 332dd34

Please sign in to comment.