Skip to content

Commit

Permalink
fix: nullptrException
Browse files Browse the repository at this point in the history
  • Loading branch information
JWJUN233233 committed May 3, 2024
1 parent e178bf3 commit fcac070
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ private void setup() {
* Resets this ChestMenu to a Point BEFORE the User interacted with it
*/
public void reset(boolean update) {
if (this.inventory == null) this.inventory = Bukkit.createInventory(this, getSize(), title);
if (update) this.inventory.clear();
else this.inventory = Bukkit.createInventory(this, getSize(), title);
for (int i = 0; i < this.items.size(); i++) {
Expand Down

0 comments on commit fcac070

Please sign in to comment.