Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix world management #23

Open
totemo opened this issue Apr 9, 2013 · 0 comments
Open

Fix world management #23

totemo opened this issue Apr 9, 2013 · 0 comments
Assignees
Labels

Comments

@totemo
Copy link
Owner

totemo commented Apr 9, 2013

Currently, lookup results are assumed to pertain to the current world. This is not always the case.

According to the Minecraft protocol document the current world name is not available to the client. Only the dimension type is available. Therefore:

  • Add a ServerConfiguration class to store per-server settings.
  • For each server, store a mapping from world name to dimension type (normal, nether, end) and for each dimension map back to a list of worlds of that type (Multiverse support). The first world name in the list is the assumed world for that dimension. When that dimension is entered, that first world is the one that is displayed.
  • Store edits for each world separately (already done but indexed by dimension).
  • If the Watson display is active, when the current dimension changes, issue a message indicating the world whose edits will be shown.
  • Add a default set of world names: world, world_nether, world_the_end.
  • The first time a new world name is encountered, add a mapping for its type. If the world name is seen in a lookup result, assume the current dimension is the type. If seen in an inspector result, it definitely is the current dimension.
  • On inspector results, verify that the stored type for a world is correct. Also, move the current world to the head of the list of worlds for the current dimension, thus making it the one that will be displayed. Because of this, if the default world names happen to be wrong for a particular server (with all custom world names) they will be ignored after the first inspector result in each dimension.
  • The configuration file will be saved on any update to the mappings between world name and dimension type.
  • Add support for a %s (world name) parameter in the teleport command.

The following commands will also be added for completeness (although most things are done automatically):

  • /w world add <name> (normal|nether|end)
  • /w world remove <name>
  • /w world set <name> - equivalent to getting an inspector result in the current dimension.
  • /w world list

Output:
Worlds for test.server:
normal: world world_redstone
nether: world_nether
end: world_the_end

@ghost ghost assigned totemo Apr 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant