Get the Player if a user is online when using /seen
Workaround for
@@ -92,6 +92,11 @@ public class SeenCommand extends AbstractCommand<CommandSource> {
@Override
public CommandResult executeCommand(CommandSource src, CommandContext args) throws Exception {
User user = args.<User>getOne(uuid).isPresent() ? args.<User>getOne(uuid).get() : args.<User>getOne(playerKey).get();
+ if (user.isOnline()) {
+ // Get the player in case the User is displaying the wrong name.
+ user = user.getPlayer().get();
+ }
+
ModularUserService iqsu = Nucleus.getNucleus().getUserDataManager().getUnchecked(user);
CoreUserDataModule coreUserDataModule = iqsu.get(CoreUserDataModule.class);
