Skip to content

Commit

Permalink
v7.3.53 - properly reset Toggle varibale when toggling functionality …
Browse files Browse the repository at this point in the history
…back on - affects "Remember Toggle Status"
  • Loading branch information
slipcor committed Feb 17, 2024
1 parent 8707668 commit ca65ef9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## v7.3 - API Expansion

- v7.3.53 - properly reset Toggle varibale when toggling functionality back on - affects "Remember Toggle Status"
- v7.3.52 - [core update] - Support servers without Spigot base unless they want to use hex codes
- v7.3.51 - update for 1.20.4, also make updating minecraft-version-dependent to not break servers by introducing unknown blocks or tree definitions
- v7.3.50 - print correct permission message for "treeconfig" command
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ It also will take down an entire tree when it is enabled in the config.

## Changelog

- v7.3.52 - [core update] - Support servers without Spigot base unless they want to use hex codes
- v7.3.53 - properly reset Toggle varibale when toggling functionality back on - affects "Remember Toggle Status"
- [read more](doc/changelog.md)

***
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/slipcor/treeassist/TreeAssist.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,11 @@ public boolean toggleGlobal(String player) {
* @return whether the player is able to use the plugin in that world now
*/
public boolean toggleWorld(String world, String player) {
boolean result = false;
if (disabledMap.containsKey(world)) {
if (disabledMap.get(world).contains(player)) {
disabledMap.get(world).remove(player);
return true;
result = true;
} else {
disabledMap.get(world).add(player);
}
Expand All @@ -538,7 +539,7 @@ public boolean toggleWorld(String world, String player) {
}
config.save();
}
return false;
return result;
}

/**
Expand Down

0 comments on commit ca65ef9

Please sign in to comment.