This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
What is the expected output? What do you see instead? add-xp-player: true >> negative experience values leaves your minecraft exp value bugged
How can you reproduce the issue? Please be as descriptive as possible, including any commands or in-game actions. add-xp-player: true https://github.com/phrstbrn/Jobs/blob/30f81aceec0034d0018a39a3668f8227694e3500/src/main/java/me/zford/jobs/Jobs.java#L365
What version of Jobs plugin are you using? Do not enter "latest" or anything similar. 2.11.4
What version of Bukkit are you using (/version)? Do not enter "latest" or anything similar. irrelevant
fix: when expInt < 0 && p.getExp() < abs(expInt) expInt=+p.getExp p.setLevel(1 less) and then give exp
My previous fix is barely usable, I suggest getTotalExperience and setTotalExperience. (The latter has false documentation, but I think it works https://github.com/Bukkit/CraftBukkit/blob/4d832c39f320f7745a210a9d9a0accc665bd49dd/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java#L824)
Ok, last comment from me. The mentioned ones are bugged on minecraft side. This works. https://forums.bukkit.org/threads/setting-total-experience.117935/#post-1467472 but you have to add: if (total > 0)
To post a comment, please login or register a new account.