Currently realms are deleted immediately when triggered from the teacher controller. Players are teleported out of the realm to the spawn realm and then the realm is immediately removed and the coordinate space is freed up. This is all expected behavior, however it causes significant lag on the server.
Realm deletion should be queued and then either done asynchronously or triggered by a teacher when it is not expected to impact the game session. A few things need to be implemented for this to work properly:
[x] Delay realm deletion by at least 30 seconds after teleporting the player. This ensures that the players have been removed and their clients have time to get the nodes and chunks of the spawn realm.
Nanjou: latest version has a 15 second delay, but changing this is trivial if 15 seconds isn't enough time
[x] Add a property/attribute to realms that indicates if the realm is hidden or not (i.e., queued for deletion).
[x] Add three tabs where the current "Available Classrooms" list is under the classrooms tab of the teacher controller: "Public", "Private", "Hidden".
[x] Add two tabs where the current "Available Classrooms" list is under the classrooms tab of the student notebook: "Public" and"Private".
[x] Under the "Public" tab: list the classrooms of type spawn and classroom; teachers see buttons to Teleport, Edit, and Hide in the teacher controller; students see button to Teleport in the student notebook..
[ ] Under the "Private" tab: students see a list of all their own instanced classrooms in the student notebook and buttons to "Teleport" and "Hide"; somewhere else in the student notebook formspec are some simple features to create an instanced realm (students are limited to one instanced realm by default - maybe this is another setting that the teacher can change in the teacher notebook?); teachers see a list of their own instanced classrooms in the student notebook with buttons to "Teleport" and "Hide"; teachers see all instanced classrooms created by all players in the teacher controller with buttons to "Teleport" and "Hide".
[x] Under the "Hidden" tab (teacher controller only): teachers see all realms queued for deletion and buttons for "Teleport", "Delete Selected Now", "Delete All Now", and "Restore". Restoring the realm, moves it from the list in the "Hidden" tab to the "Public" or "Private" tabs, depending on the type of realm it is. When either of the delete buttons are activated, a popup should be displayed warning the teacher that deleting classrooms is irreversible, may take a long time to complete, and the server may become unresponsive in the meantime. Maybe the delete buttons are only made available to a player who has both teacher and admin privs?
Currently realms are deleted immediately when triggered from the teacher controller. Players are teleported out of the realm to the spawn realm and then the realm is immediately removed and the coordinate space is freed up. This is all expected behavior, however it causes significant lag on the server.
Realm deletion should be queued and then either done asynchronously or triggered by a teacher when it is not expected to impact the game session. A few things need to be implemented for this to work properly: