Minor changes

Removed one unnecessary Exception
Fixed spelling
This commit is contained in:
NichtStudioCode 2021-01-28 17:26:47 +01:00
parent e4980188e2
commit ed64b2e60a
2 changed files with 3 additions and 3 deletions

@ -70,7 +70,7 @@ public abstract class BaseAnimation implements Animation {
@Override
public void start() {
task = Bukkit.getScheduler().runTaskTimer(InvGui.getInstance().getPlugin(), () -> {
// if there are now viewers for more than 3 ticks, the animation can be cancelled
// if there are no viewers for more than 3 ticks, the animation can be cancelled
if (getViewers().isEmpty()) {
noViewerTicks++;
if (noViewerTicks > 3) {

@ -165,13 +165,13 @@ public abstract class BaseWindow implements Window, GUIParent {
@Override
public void closeForViewer() {
closeable = true;
new ArrayList<>(inventory.getViewers()).forEach(HumanEntity::closeInventory); // clone list to prevent ConcurrentModificationException
// clone list to prevent ConcurrentModificationException
new ArrayList<>(inventory.getViewers()).forEach(HumanEntity::closeInventory);
}
@Override
public void show() {
if (closed) throw new IllegalStateException("The Window has already been closed.");
if (inventory.getViewers().size() != 0) throw new IllegalStateException("A Window can only have one viewer.");
Player viewer = getViewer();
if (viewer == null) throw new IllegalStateException("The player is not online.");