mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-29 03:31:43 +01:00
Fix memory leak preventing users from being unloaded
This commit is contained in:
parent
ee3db1e5c5
commit
46b122a167
@ -73,7 +73,7 @@ public abstract class AbstractManager<I, T extends Identifiable<I>> implements F
|
|||||||
* @return a {@link T} object if the object is loaded, returns null if the object is not loaded
|
* @return a {@link T} object if the object is loaded, returns null if the object is not loaded
|
||||||
*/
|
*/
|
||||||
public final T get(I id) {
|
public final T get(I id) {
|
||||||
return objects.asMap().get(id);
|
return objects.getIfPresent(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,7 +91,7 @@ public abstract class AbstractManager<I, T extends Identifiable<I>> implements F
|
|||||||
*/
|
*/
|
||||||
public final void unload(T t) {
|
public final void unload(T t) {
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
objects.invalidate(t);
|
objects.invalidate(t.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user