Rename Window#show to Window#open

This commit is contained in:
NichtStudioCode 2023-03-04 17:10:31 +01:00
parent 88da7bb141
commit ad42afe225
2 changed files with 6 additions and 6 deletions

@ -194,7 +194,7 @@ public abstract class AbstractWindow implements Window, GuiParent {
} }
} else { } else {
if (player.equals(getViewer())) if (player.equals(getViewer()))
Bukkit.getScheduler().runTaskLater(InvUI.getInstance().getPlugin(), this::show, 0); Bukkit.getScheduler().runTaskLater(InvUI.getInstance().getPlugin(), this::open, 0);
} }
} }
@ -250,7 +250,7 @@ public abstract class AbstractWindow implements Window, GuiParent {
} }
@Override @Override
public void show() { public void open() {
Player viewer = getViewer(); Player viewer = getViewer();
if (viewer == null) if (viewer == null)
throw new IllegalStateException("The player is not online."); throw new IllegalStateException("The player is not online.");
@ -485,8 +485,8 @@ public abstract class AbstractWindow implements Window, GuiParent {
} }
@Override @Override
public void show(Player viewer) { public void open(Player viewer) {
build(viewer).show(); build(viewer).open();
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

@ -90,7 +90,7 @@ public interface Window {
/** /**
* Shows the window to the player. * Shows the window to the player.
*/ */
void show(); void open();
/** /**
* Gets if the player is able to close the {@link Inventory}. * Gets if the player is able to close the {@link Inventory}.
@ -326,7 +326,7 @@ public interface Window {
* *
* @param viewer The {@link Player} to show the {@link Window} to. * @param viewer The {@link Player} to show the {@link Window} to.
*/ */
void show(Player viewer); void open(Player viewer);
/** /**
* Clones the {@link Builder Window Builder}. * Clones the {@link Builder Window Builder}.