Skip to content

Commit

Permalink
v1.3.4.298 - attempt to properly back up NBT data of player's items i…
Browse files Browse the repository at this point in the history
…n case of an unnatural leaving of the arena
  • Loading branch information
slipcor committed Jul 23, 2018
1 parent e5690d8 commit 9b74b0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
- v1.3.4.298 - attempt to properly back up NBT data of player's items in case of an unnatural leaving of the arena

- v1.3.4.297 - address github issue #351 - add yet another delay to fix Spigot
- v1.3.4.296 - address github issue #329 - actually change the scoreboard title :O
- v1.3.4.295 - fix the fact that the scoreboard did not update on losing the last life. Thanks to @Oruss7
- v1.3.4.294 - add team size and total team count when joining
- v1.3.4.293 - address github issue #332 - display first checkpoint message, and display numbers starting from 1
- v1.3.4.292 - address github issue #329 - use arena prefix instead of name, if still too long, shorten manually

- v1.3.4.291 - added debug to PotionSplashEvent for someone to have evidence to report a bug
- v1.3.4.290 - when setting up a region, check that it has actual resulting volume before saving
- v1.3.4.289 - address github issue #324 - call home asynchronously
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Users tutorials :

## Changelog

- v1.3.4.297 - address github issue #351 - add yet another delay to fix Spigot
- v1.3.4.298 - attempt to properly back up NBT data of player's items in case of an unnatural leaving of the arena
- [read more](doc/changelog.md)

***
Expand Down
8 changes: 4 additions & 4 deletions src/net/slipcor/pvparena/arena/ArenaPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ public void dump() {
}

try {
cfg.set("inventory",
StringParser.getStringFromItemStacks(savedInventory));
cfg.set("inventory", savedInventory);
cfg.set("loc", Config.parseToString(location));

cfg.save(file);
Expand Down Expand Up @@ -638,8 +637,9 @@ public void readDump() {
}

arena = ArenaManager.getArenaByName(cfg.getString("arena"));
savedInventory = StringParser.getItemStacksFromString(cfg.getString(
"inventory", "AIR"));
savedInventory = cfg.getList("inventory").toArray(new ItemStack[0]);
/*StringParser.getItemStacksFromString(cfg.getString(
"inventory", "AIR"));*/
location = Config.parseLocation(cfg.getString("loc"));

if (arena != null) {
Expand Down

0 comments on commit 9b74b0e

Please sign in to comment.