Add check for when the session state doesn't actually change
This commit is contained in:
parent
2d08ef55fa
commit
f4871574d3
1 changed files with 4 additions and 0 deletions
|
@ -105,6 +105,10 @@ public final class Computer {
|
||||||
*/
|
*/
|
||||||
public void onLock(CommandSender sender) {
|
public void onLock(CommandSender sender) {
|
||||||
System.out.println("A");
|
System.out.println("A");
|
||||||
|
if (session.getState() != SessionState.Locked) {
|
||||||
|
sendMessage(sender, "§cFailed to start computer! Failed to lock session");
|
||||||
|
return;
|
||||||
|
}
|
||||||
machine = session.getMachine(); // This is the Machine object we can work with
|
machine = session.getMachine(); // This is the Machine object we can work with
|
||||||
final IConsole console = session.getConsole();
|
final IConsole console = session.getConsole();
|
||||||
if (embedded) { //Otherwise it's set while starting the VM
|
if (embedded) { //Otherwise it's set while starting the VM
|
||||||
|
|
Loading…
Reference in a new issue