OK guys one question I have to push this investigation further: How would you would “simulate” a connected Player? Without actually starting a real MC GUI Client… that’s too heavy.
Say you wanted to use this @RunWith(MinecraftRunner.class) infrastructure to integration test e.g. some Command, assume say a simple /echo kinda command that just replies back, as an example, in this scenario, for a headless full stack integration test, where from would you get a Player (CommandSource) to pass as argument into a CommandService process, so that it can be replied to? Just mock a Player… but that won’t really be active in-world - there must be some better way to do this that I’m not seeing - thoughts?
PS: I did find the PlayerSimulator available on World, but that clearly has another purpose, and doesn’t actually implement Player/CommandSource, so that can’t be used for this.
1 Like
I’d say you could make a dummy class that extends Player. This, however, would not work for methods that require a UUID.