|
19 | 19 | import java.lang.reflect.Constructor;
|
20 | 20 | import java.util.ArrayList;
|
21 | 21 | import java.util.List;
|
| 22 | +import java.util.Objects; |
22 | 23 |
|
23 | 24 | import com.comphenix.protocol.PacketType;
|
24 | 25 | import com.comphenix.protocol.reflect.EquivalentConverter;
|
25 | 26 | import com.comphenix.protocol.reflect.StructureModifier;
|
26 | 27 | import com.comphenix.protocol.utility.MinecraftReflection;
|
27 | 28 | import com.comphenix.protocol.utility.MinecraftVersion;
|
28 | 29 | import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode;
|
29 |
| -import com.google.common.base.Objects; |
30 | 30 |
|
31 | 31 | /**
|
32 | 32 | * Represents an immutable PlayerInfoData in the PLAYER_INFO packet.
|
@@ -176,19 +176,19 @@ public boolean equals(Object obj) {
|
176 | 176 | if (obj instanceof PlayerInfoData) {
|
177 | 177 | PlayerInfoData other = (PlayerInfoData) obj;
|
178 | 178 | return profile.equals(other.profile) && latency == other.latency && gameMode == other.gameMode
|
179 |
| - && displayName.equals(other.displayName); |
| 179 | + && Objects.equals(displayName, other.displayName); |
180 | 180 | }
|
181 | 181 | return false;
|
182 | 182 | }
|
183 | 183 |
|
184 | 184 | @Override
|
185 | 185 | public int hashCode() {
|
186 |
| - return Objects.hashCode(latency, gameMode, profile, displayName); |
| 186 | + return Objects.hash(latency, gameMode, profile, displayName); |
187 | 187 | }
|
188 | 188 |
|
189 | 189 | @Override
|
190 | 190 | public String toString() {
|
191 |
| - return String.format("PlayerInfoData[latency=%s, gameMode=%s, profile=%s, displayName=%s", |
| 191 | + return String.format("PlayerInfoData[latency=%s, gameMode=%s, profile=%s, displayName=%s]", |
192 | 192 | latency, gameMode, profile, displayName);
|
193 | 193 | }
|
194 | 194 | }
|
0 commit comments