mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 13:15:52 +01:00
parent
8774d87d59
commit
dd687ce175
@ -19,6 +19,7 @@ package com.comphenix.protocol.wrappers;
|
|||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.comphenix.protocol.PacketType;
|
import com.comphenix.protocol.PacketType;
|
||||||
import com.comphenix.protocol.reflect.EquivalentConverter;
|
import com.comphenix.protocol.reflect.EquivalentConverter;
|
||||||
@ -26,7 +27,6 @@ import com.comphenix.protocol.reflect.StructureModifier;
|
|||||||
import com.comphenix.protocol.utility.MinecraftReflection;
|
import com.comphenix.protocol.utility.MinecraftReflection;
|
||||||
import com.comphenix.protocol.utility.MinecraftVersion;
|
import com.comphenix.protocol.utility.MinecraftVersion;
|
||||||
import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode;
|
import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode;
|
||||||
import com.google.common.base.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an immutable PlayerInfoData in the PLAYER_INFO packet.
|
* Represents an immutable PlayerInfoData in the PLAYER_INFO packet.
|
||||||
@ -176,19 +176,19 @@ public class PlayerInfoData {
|
|||||||
if (obj instanceof PlayerInfoData) {
|
if (obj instanceof PlayerInfoData) {
|
||||||
PlayerInfoData other = (PlayerInfoData) obj;
|
PlayerInfoData other = (PlayerInfoData) obj;
|
||||||
return profile.equals(other.profile) && latency == other.latency && gameMode == other.gameMode
|
return profile.equals(other.profile) && latency == other.latency && gameMode == other.gameMode
|
||||||
&& displayName.equals(other.displayName);
|
&& Objects.equals(displayName, other.displayName);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hashCode(latency, gameMode, profile, displayName);
|
return Objects.hash(latency, gameMode, profile, displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("PlayerInfoData[latency=%s, gameMode=%s, profile=%s, displayName=%s",
|
return String.format("PlayerInfoData[latency=%s, gameMode=%s, profile=%s, displayName=%s]",
|
||||||
latency, gameMode, profile, displayName);
|
latency, gameMode, profile, displayName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user