Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@ public boolean isConsole() {
public void sendMessage(ChatComponent component, ChatMessageType type, UUID uuid) {
this.parser.sendMessage(this.sender, component, type, uuid);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
BukkitChatCommandSender other = (BukkitChatCommandSender) obj;
return this.parser.equals(other.parser) && this.sender.equals(other.sender);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,15 @@ public boolean isOnline() {
public ChatTeam getTeam() {
return this.parser.toChatTeam(Bukkit.getScoreboardManager().getMainScoreboard().getEntryTeam(this.getName()));
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
BukkitChatOfflinePlayer other = (BukkitChatOfflinePlayer) obj;
return this.parser.equals(other.parser) && this.player.equals(other.player);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@ public Server getImpl() {
public void execute(IChatPlugin plugin, Runnable runnable) {
this.parser.execute(this.server.getScheduler(), plugin, runnable);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
BukkitChatServer other = (BukkitChatServer) obj;
return this.parser.equals(other.parser) && this.server.equals(other.server);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ public ChatComponent getPrefix() {
public ChatComponent getSuffix() {
return new ChatTextComponent(this.team.getSuffix());
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
BukkitChatTeam other = (BukkitChatTeam) obj;
return this.parser.equals(other.parser) && this.team.equals(other.team);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@ public String getName() {
public void sendMessage(ChatComponent component, ChatMessageType type, UUID uuid) {
this.parser.sendMessage(this.commandSource, component, type, uuid);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
FabricChatCommandSender other = (FabricChatCommandSender) obj;
return this.parser.equals(other.parser) && this.commandSource.equals(other.commandSource);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,15 @@ public boolean isOnline() {
public ChatTeam getTeam() {
return this.parser.toChatTeam(this.server.getScoreboard().getPlayerTeam(this.getName()));
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
FabricChatOfflinePlayer other = (FabricChatOfflinePlayer) obj;
return this.parser.equals(other.parser) && this.server.equals(other.server) && this.gameProfile.equals(other.gameProfile);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,15 @@ public void kick(ChatComponent reason) {
public void sendMessage(ChatComponent component, ChatMessageType type, UUID uuid) {
this.parser.sendMessage(this.player, component, type, uuid);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
FabricChatPlayer other = (FabricChatPlayer) obj;
return this.parser.equals(other.parser) && this.player.equals(other.player);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@ public MinecraftServer getImpl() {
public void execute(IChatPlugin plugin, Runnable runnable) {
this.parser.execute(this.server, plugin, runnable);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
FabricChatServer other = (FabricChatServer) obj;
return this.parser.equals(other.parser) && this.server.equals(other.server);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ public ChatComponent getPrefix() {
public ChatComponent getSuffix() {
return FabricParser.fabric(this.team.getPlayerSuffix());
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
FabricChatTeam other = (FabricChatTeam) obj;
return this.parser.equals(other.parser) && this.team.equals(other.team);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@ public String getName() {
public void sendMessage(ChatComponent component, ChatMessageType type, UUID uuid) {
this.parser.sendMessage(this.commandSource, component, type, uuid);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
ForgeChatCommandSender other = (ForgeChatCommandSender) obj;
return this.parser.equals(other.parser) && this.commandSource.equals(other.commandSource);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,15 @@ public boolean isOnline() {
public ChatTeam getTeam() {
return this.parser.toChatTeam(this.server.getScoreboard().getPlayerTeam(this.getName()));
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
ForgeChatOfflinePlayer other = (ForgeChatOfflinePlayer) obj;
return this.parser.equals(other.parser) && this.server.equals(other.server) && this.gameProfile.equals(other.gameProfile);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,15 @@ public void kick(ChatComponent reason) {
public void sendMessage(ChatComponent component, ChatMessageType type, UUID uuid) {
this.parser.sendMessage(this.player, component, type, uuid);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
ForgeChatPlayer other = (ForgeChatPlayer) obj;
return this.parser.equals(other.parser) && this.player.equals(other.player);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@ public MinecraftServer getImpl() {
public void execute(IChatPlugin plugin, Runnable runnable) {
this.parser.execute(this.server, plugin, runnable);
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
ForgeChatServer other = (ForgeChatServer) obj;
return this.parser.equals(other.parser) && this.server.equals(other.server);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,15 @@ public ChatComponent getPrefix() {
public ChatComponent getSuffix() {
return ForgeParser.forge(this.team.getPlayerSuffix());
}

public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj != null && this.getClass() == obj.getClass()) {
ForgeChatTeam other = (ForgeChatTeam) obj;
return this.parser.equals(other.parser) && this.team.equals(other.team);
} else {
return false;
}
}
}