geforkt von Mirrors/Velocity
Add Player#getGameProfile() to make tab list plugins easier to make.
Dieser Commit ist enthalten in:
Ursprung
118574e535
Commit
564cb99861
@ -106,6 +106,11 @@ public interface Player extends CommandSource, InboundConnection, ChannelMessage
|
||||
*/
|
||||
void setGameProfileProperties(List<GameProfile.Property> properties);
|
||||
|
||||
/**
|
||||
* Returns the player's game profile.
|
||||
*/
|
||||
GameProfile getGameProfile();
|
||||
|
||||
/**
|
||||
* Sets the tab list header and footer for the player.
|
||||
*
|
||||
|
@ -72,7 +72,7 @@ public class LoginSessionHandler implements MinecraftSessionHandler {
|
||||
response.setId(packet.getId());
|
||||
response.setData(createForwardingData(configuration.getForwardingSecret(),
|
||||
serverConn.getPlayer().getRemoteAddress().getHostString(),
|
||||
serverConn.getPlayer().getProfile()));
|
||||
serverConn.getPlayer().getGameProfile()));
|
||||
mc.write(response);
|
||||
informationForwarded = true;
|
||||
} else {
|
||||
|
@ -126,9 +126,9 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
||||
.append('\0')
|
||||
.append(proxyPlayer.getRemoteAddress().getHostString())
|
||||
.append('\0')
|
||||
.append(proxyPlayer.getProfile().getUndashedId())
|
||||
.append(proxyPlayer.getGameProfile().getUndashedId())
|
||||
.append('\0');
|
||||
GSON.toJson(proxyPlayer.getProfile().getProperties(), data);
|
||||
GSON.toJson(proxyPlayer.getGameProfile().getProperties(), data);
|
||||
return data.toString();
|
||||
}
|
||||
|
||||
@ -192,8 +192,8 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[server connection] " + proxyPlayer.getProfile().getName() + " -> " + registeredServer
|
||||
.getServerInfo().getName();
|
||||
return "[server connection] " + proxyPlayer.getGameProfile().getName() + " -> "
|
||||
+ registeredServer.getServerInfo().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -109,8 +109,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger
|
||||
.info("Exception occurred while running command for {}", player.getProfile().getName(),
|
||||
logger.info("Exception occurred while running command for {}", player.getUsername(),
|
||||
e);
|
||||
player.sendMessage(
|
||||
TextComponent.of("An error occurred while running this command.", TextColor.RED));
|
||||
|
@ -114,7 +114,8 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
return Optional.ofNullable(connectedServer);
|
||||
}
|
||||
|
||||
public GameProfile getProfile() {
|
||||
@Override
|
||||
public GameProfile getGameProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren