Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Code issues (Memory leak is probable) #1

Closed
IllusionTheDev opened this issue Nov 30, 2019 · 3 comments
Closed

Code issues (Memory leak is probable) #1

IllusionTheDev opened this issue Nov 30, 2019 · 3 comments
Assignees
Labels
Pending Pending

Comments

@IllusionTheDev
Copy link

I've analyzed the plugin's code and here are some tips to improve it:

Make multiple classes, as the Main class is full of junk:

  • The main class listens to events on big method (InventoryClickEvent)
  • The main class manages commands (You can make a class that implements CommandExecutor)

Some more issues:

  • You are using a public static Map whose key is a Player (This will be pretty bad, since static variables can't be properly garbage collected, and storing player data using the Player class is pretty bad, you should use the UUID class and call Bukkit.getPlayer(uuid) when needed)
@BGHDDevelopment
Copy link
Owner

All the things noted were from the previous author, next few updates hopefully I will get to cleaning up the past code and improving the quality. I will leave this open and keep you updated!

@BGHDDevelopment BGHDDevelopment self-assigned this Dec 1, 2019
@BGHDDevelopment BGHDDevelopment added the Pending Pending label Dec 1, 2019
@BGHDDevelopment
Copy link
Owner

I started work on this issue ALPHA

@BGHDDevelopment
Copy link
Owner

I have released the first update to fix the reported issues, I will close this for now and finish the update for calling the UUID next weekend.

Thanks for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Pending Pending
Projects
None yet
Development

No branches or pull requests

2 participants