Makes looking around a dropper arena possible

This commit is contained in:
2023-06-13 18:42:20 +02:00
parent ba1a7fff68
commit 57183b64f5
2 changed files with 49 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ public class DropperArenaSession extends AbstractArenaSession {
private final @NotNull DropperArena arena;
private final @NotNull Player player;
private final @NotNull DropperArenaGameMode gameMode;
private boolean startedMoving = false;
/**
* Instantiates a new dropper arena session
@@ -39,6 +40,22 @@ public class DropperArenaSession extends AbstractArenaSession {
this.entryState.setArenaState();
}
/**
* Marks that this arena's player has started moving
*/
public void setStartedMoving() {
this.startedMoving = true;
}
/**
* Gets whether the player of this session has started moving in the arena
*
* @return <p>True if the player has started moving</p>
*/
public boolean getStartedMoving() {
return this.startedMoving;
}
/**
* Gets the player playing in this session
*
@@ -103,6 +120,12 @@ public class DropperArenaSession extends AbstractArenaSession {
return new DropperGUI(player);
}
@Override
public void reset() {
this.startedMoving = false;
super.reset();
}
@Override
protected void removeSession() {
// Remove this session for game sessions to stop listeners from fiddling more with the player