Skip to content

Commit

Permalink
feat(inventory): Add Kryo enablement to InventoryRegistrar
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeV220 committed Jul 2, 2023
1 parent ba6e568 commit b1a33b4
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class InventoryRegistrar {
private final List<PagedInventoryCloseHandler> globalCloseHandlers;
private final List<PagedInventorySwitchPageHandler> globalSwitchHandlers;

private boolean kryo = false;

private final Plugin plugin;

InventoryRegistrar(Plugin plugin) {
Expand Down Expand Up @@ -166,6 +168,25 @@ public Plugin getPlugin() {
return plugin;
}

/**
* Checks if Kryo is enabled.
*
* @return {@code true} if Kryo is enabled, {@code false} if it is disabled.
*/
public boolean kryo() {
return kryo;
}

/**
* Sets the Kryo enablement.
*
* @param kryo {@code true} to enable Kryo support, {@code false} to disable it.
*/

public void kryo(boolean kryo) {
this.kryo = kryo;
}

@Override
public boolean equals(Object obj) {
if (obj == this)
Expand Down

0 comments on commit b1a33b4

Please sign in to comment.