mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Removed independent management server
World server now handles its own management-server-related functionality, a new management server will be written in the future to facilitate cross-world event syncing World server now runs standalone, this requires the client to be configured to connect the world server port for the world list (world list was previously supplied by the management server on port 5555, which should be swapped to the world server port that is generally 43595 for world 1) work is in progress to update client launchers to make this as seamless as possible This should resolve issues where players sometimes get a login error claiming they are already logged in
This commit is contained in:
parent
a61c6072be
commit
2045143378
58 changed files with 15483 additions and 749 deletions
110
Proto/Management.proto
Normal file
110
Proto/Management.proto
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
|
package management;
|
||||||
|
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_package = "proto.management";
|
||||||
|
option java_outer_classname = "ManagementProtos";
|
||||||
|
|
||||||
|
message PlayerStatusUpdate {
|
||||||
|
required string username = 1;
|
||||||
|
required int32 world = 2;
|
||||||
|
required bool notifyFriendsOnly = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ClanMessage {
|
||||||
|
required string sender = 1;
|
||||||
|
required string clanName = 2;
|
||||||
|
required string message = 3;
|
||||||
|
required int32 rank = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PrivateMessage {
|
||||||
|
required string sender = 1;
|
||||||
|
required string receiver = 2;
|
||||||
|
required string message = 3;
|
||||||
|
required int32 rank = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RequestContactInfo {
|
||||||
|
required string username = 1;
|
||||||
|
required int32 world = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendContactInfo {
|
||||||
|
message Contact {
|
||||||
|
required string username = 1;
|
||||||
|
optional int32 world = 2;
|
||||||
|
optional int32 rank = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
required string username = 1;
|
||||||
|
repeated Contact contacts = 2;
|
||||||
|
repeated string blocked = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FriendUpdate {
|
||||||
|
enum Type {
|
||||||
|
ADD = 0;
|
||||||
|
REMOVE = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
required Type type = 1;
|
||||||
|
required string username = 2;
|
||||||
|
required string friend = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BlockedUpdate {
|
||||||
|
enum Type {
|
||||||
|
ADD = 0;
|
||||||
|
REMOVE = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
required Type type = 1;
|
||||||
|
required string username = 2;
|
||||||
|
required string friend = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RequestClanInfo {
|
||||||
|
required int32 world = 1;
|
||||||
|
required string clanOwner = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendClanInfo {
|
||||||
|
message ClanMember {
|
||||||
|
required string username = 1;
|
||||||
|
required int32 world = 2;
|
||||||
|
required int32 rank = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
required string clanOwner = 1;
|
||||||
|
required bool hasInfo = 2;
|
||||||
|
optional string clanName = 3;
|
||||||
|
optional int32 joinRequirement = 4;
|
||||||
|
optional int32 kickRequirement = 5;
|
||||||
|
optional int32 messageRequirement = 6;
|
||||||
|
optional int32 lootRequirement = 7;
|
||||||
|
repeated ClanMember members = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
message JoinClanRequest {
|
||||||
|
required string username = 1;
|
||||||
|
required string clanName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message LeaveClanRequest {
|
||||||
|
required string username = 1;
|
||||||
|
required string clanName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ClanJoinNotification {
|
||||||
|
required string username = 1;
|
||||||
|
required string clanName = 2;
|
||||||
|
required int32 world = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ClanLeaveNotification {
|
||||||
|
required string username = 1;
|
||||||
|
required string clanName = 2;
|
||||||
|
required int32 world = 3;
|
||||||
|
}
|
||||||
|
|
@ -125,7 +125,6 @@ public final class LumbridgeGuideDialogue extends DialoguePlugin {
|
||||||
break;
|
break;
|
||||||
case 807:
|
case 807:
|
||||||
player.getIronmanManager().setMode(IronmanMode.NONE);
|
player.getIronmanManager().setMode(IronmanMode.NONE);
|
||||||
MSPacketRepository.sendInfoUpdate(player);
|
|
||||||
end();
|
end();
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import core.game.node.entity.player.info.RenderInfo;
|
||||||
import core.game.node.entity.player.info.Rights;
|
import core.game.node.entity.player.info.Rights;
|
||||||
import core.game.node.entity.player.info.UIDInfo;
|
import core.game.node.entity.player.info.UIDInfo;
|
||||||
import core.game.node.entity.player.info.login.LoginConfiguration;
|
import core.game.node.entity.player.info.login.LoginConfiguration;
|
||||||
import core.game.node.entity.player.info.login.PlayerParser;
|
|
||||||
import core.game.node.entity.player.link.*;
|
import core.game.node.entity.player.link.*;
|
||||||
import core.game.node.entity.player.link.appearance.Appearance;
|
import core.game.node.entity.player.link.appearance.Appearance;
|
||||||
import core.game.node.entity.player.link.audio.AudioManager;
|
import core.game.node.entity.player.link.audio.AudioManager;
|
||||||
|
|
@ -64,14 +63,15 @@ import core.tools.RandomFunction;
|
||||||
import core.tools.StringUtils;
|
import core.tools.StringUtils;
|
||||||
import kotlin.Unit;
|
import kotlin.Unit;
|
||||||
import kotlin.jvm.functions.Function1;
|
import kotlin.jvm.functions.Function1;
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
import org.rs09.consts.Items;
|
import org.rs09.consts.Items;
|
||||||
|
import proto.management.ClanLeaveNotification;
|
||||||
|
import proto.management.LeaveClanRequest;
|
||||||
|
import proto.management.PlayerStatusUpdate;
|
||||||
import rs09.GlobalStats;
|
import rs09.GlobalStats;
|
||||||
import rs09.ServerConstants;
|
import rs09.ServerConstants;
|
||||||
import rs09.game.VarpManager;
|
import rs09.game.VarpManager;
|
||||||
import rs09.game.node.entity.combat.CombatSwingHandler;
|
import rs09.game.node.entity.combat.CombatSwingHandler;
|
||||||
import rs09.game.node.entity.combat.equipment.EquipmentDegrader;
|
import rs09.game.node.entity.combat.equipment.EquipmentDegrader;
|
||||||
import rs09.game.node.entity.player.info.login.PlayerSaveParser;
|
|
||||||
import rs09.game.node.entity.player.info.login.PlayerSaver;
|
import rs09.game.node.entity.player.info.login.PlayerSaver;
|
||||||
import rs09.game.node.entity.skill.runecrafting.PouchManager;
|
import rs09.game.node.entity.skill.runecrafting.PouchManager;
|
||||||
import rs09.game.node.entity.state.newsys.State;
|
import rs09.game.node.entity.state.newsys.State;
|
||||||
|
|
@ -84,6 +84,7 @@ import rs09.game.world.update.NPCRenderer;
|
||||||
import rs09.game.world.update.PlayerRenderer;
|
import rs09.game.world.update.PlayerRenderer;
|
||||||
import rs09.game.world.update.UpdateSequence;
|
import rs09.game.world.update.UpdateSequence;
|
||||||
import rs09.tools.TickUtilsKt;
|
import rs09.tools.TickUtilsKt;
|
||||||
|
import rs09.worker.ManagementEvents;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
@ -382,13 +383,29 @@ public class Player extends Entity {
|
||||||
interfaceManager.closeSingleTab();
|
interfaceManager.closeSingleTab();
|
||||||
super.clear();
|
super.clear();
|
||||||
getZoneMonitor().clear();
|
getZoneMonitor().clear();
|
||||||
CommunicationInfo.notifyPlayers(this, false, false);
|
|
||||||
HouseManager.leave(this);
|
HouseManager.leave(this);
|
||||||
UpdateSequence.getRenderablePlayers().remove(this);
|
UpdateSequence.getRenderablePlayers().remove(this);
|
||||||
details.save();
|
details.save();
|
||||||
|
sendLogoutEvents();
|
||||||
Repository.getDisconnectionQueue().add(this);
|
Repository.getDisconnectionQueue().add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendLogoutEvents() {
|
||||||
|
PlayerStatusUpdate.Builder statusBuilder = PlayerStatusUpdate.newBuilder();
|
||||||
|
statusBuilder.setUsername(this.name);
|
||||||
|
statusBuilder.setWorld(0); //offline
|
||||||
|
statusBuilder.setNotifyFriendsOnly(false);
|
||||||
|
ManagementEvents.publish(statusBuilder.build());
|
||||||
|
|
||||||
|
if (getCommunication().getClan() != null) {
|
||||||
|
ClanLeaveNotification.Builder event = ClanLeaveNotification.newBuilder();
|
||||||
|
event.setUsername(getName());
|
||||||
|
event.setWorld(GameWorld.getSettings().getWorldId());
|
||||||
|
event.setClanName(getCommunication().getClan().getOwner());
|
||||||
|
ManagementEvents.publish(event.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void toggleWardrobe(boolean intoWardrobe){
|
public void toggleWardrobe(boolean intoWardrobe){
|
||||||
class wardrobePulse extends Pulse{
|
class wardrobePulse extends Pulse{
|
||||||
final Player player;
|
final Player player;
|
||||||
|
|
|
||||||
|
|
@ -255,6 +255,11 @@ public class PlayerDetails {
|
||||||
public void save() {
|
public void save() {
|
||||||
if(isBanned()) return;
|
if(isBanned()) return;
|
||||||
try {
|
try {
|
||||||
|
accountInfo.setContacts(communicationInfo.getContactString());
|
||||||
|
accountInfo.setBlocked(communicationInfo.getBlockedString());
|
||||||
|
accountInfo.setClanName(communicationInfo.getClanName());
|
||||||
|
accountInfo.setClanReqs(communicationInfo.getClanReqString());
|
||||||
|
accountInfo.setCurrentClan(communicationInfo.getCurrentClan());
|
||||||
GameWorld.getAccountStorage().update(accountInfo);
|
GameWorld.getAccountStorage().update(accountInfo);
|
||||||
} catch (IllegalStateException ignored) {}
|
} catch (IllegalStateException ignored) {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,6 @@ public final class LoginConfiguration {
|
||||||
player.getConfigManager().reset();
|
player.getConfigManager().reset();
|
||||||
sendGameConfiguration(player);
|
sendGameConfiguration(player);
|
||||||
Repository.getLobbyPlayers().remove(player);
|
Repository.getLobbyPlayers().remove(player);
|
||||||
Repository.getPlayerNames().putIfAbsent(player.getName().toLowerCase(),player);
|
|
||||||
player.setPlaying(true);
|
player.setPlaying(true);
|
||||||
UpdateSequence.getRenderablePlayers().add(player);
|
UpdateSequence.getRenderablePlayers().add(player);
|
||||||
RegionManager.move(player);
|
RegionManager.move(player);
|
||||||
|
|
@ -169,10 +168,7 @@ public final class LoginConfiguration {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.getCommunication().sync(player);
|
player.getAppearance().sync();
|
||||||
if (WorldCommunicator.isEnabled()) {
|
|
||||||
MSPacketRepository.sendInfoUpdate(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -191,11 +191,6 @@ public final class Settings {
|
||||||
publicChatSetting = pub;
|
publicChatSetting = pub;
|
||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
if (privateChatSetting != priv) {
|
|
||||||
privateChatSetting = priv;
|
|
||||||
update = true;
|
|
||||||
CommunicationInfo.notifyPlayers(player, privateChatSetting != 2, true);
|
|
||||||
}
|
|
||||||
if (tradeSetting != trade) {
|
if (tradeSetting != trade) {
|
||||||
tradeSetting = trade;
|
tradeSetting = trade;
|
||||||
update = true;
|
update = true;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.info.PlayerDetails;
|
import core.game.node.entity.player.info.PlayerDetails;
|
||||||
import core.game.node.entity.player.info.Rights;
|
import core.game.node.entity.player.info.Rights;
|
||||||
import core.game.system.monitor.PlayerMonitor;
|
import core.game.system.monitor.PlayerMonitor;
|
||||||
|
import proto.management.ClanJoinNotification;
|
||||||
|
import proto.management.ClanLeaveNotification;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
import rs09.game.world.repository.Repository;
|
import rs09.game.world.repository.Repository;
|
||||||
import core.net.amsc.WorldCommunicator;
|
import core.net.amsc.WorldCommunicator;
|
||||||
|
|
@ -14,6 +16,7 @@ import core.net.packet.context.ClanContext;
|
||||||
import core.net.packet.context.MessageContext;
|
import core.net.packet.context.MessageContext;
|
||||||
import core.net.packet.out.CommunicationMessage;
|
import core.net.packet.out.CommunicationMessage;
|
||||||
import core.net.packet.out.UpdateClanChat;
|
import core.net.packet.out.UpdateClanChat;
|
||||||
|
import rs09.worker.ManagementEvents;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
@ -123,6 +126,13 @@ public final class ClanRepository {
|
||||||
if (!players.contains(entry)) {
|
if (!players.contains(entry)) {
|
||||||
players.add(entry);
|
players.add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClanJoinNotification.Builder event = ClanJoinNotification.newBuilder();
|
||||||
|
event.setUsername(player.getName());
|
||||||
|
event.setWorld(GameWorld.getSettings().getWorldId());
|
||||||
|
event.setClanName(owner);
|
||||||
|
ManagementEvents.publish(event.build());
|
||||||
|
|
||||||
player.getPacketDispatch().sendMessage("Now talking in clan channel " + name + ":clan:");
|
player.getPacketDispatch().sendMessage("Now talking in clan channel " + name + ":clan:");
|
||||||
player.getPacketDispatch().sendMessage("To talk, start each line of chat with the / symbol.:clan:");
|
player.getPacketDispatch().sendMessage("To talk, start each line of chat with the / symbol.:clan:");
|
||||||
update();
|
update();
|
||||||
|
|
@ -258,6 +268,12 @@ public final class ClanRepository {
|
||||||
if (clanWar != null && !isDefault()) {
|
if (clanWar != null && !isDefault()) {
|
||||||
clanWar.fireEvent("leavefc", player);
|
clanWar.fireEvent("leavefc", player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClanLeaveNotification.Builder event = ClanLeaveNotification.newBuilder();
|
||||||
|
event.setClanName(owner);
|
||||||
|
event.setUsername(player.getName());
|
||||||
|
event.setWorld(GameWorld.getSettings().getWorldId());
|
||||||
|
ManagementEvents.publish(event.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package core.game.system.communication;
|
||||||
import core.cache.misc.buffer.ByteBufferUtils;
|
import core.cache.misc.buffer.ByteBufferUtils;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import proto.management.PrivateMessage;
|
||||||
import rs09.auth.UserAccountInfo;
|
import rs09.auth.UserAccountInfo;
|
||||||
import rs09.game.system.SystemLogger;
|
import rs09.game.system.SystemLogger;
|
||||||
import core.game.system.monitor.PlayerMonitor;
|
import core.game.system.monitor.PlayerMonitor;
|
||||||
|
|
@ -18,6 +19,7 @@ import core.net.packet.context.MessageContext;
|
||||||
import core.net.packet.out.CommunicationMessage;
|
import core.net.packet.out.CommunicationMessage;
|
||||||
import core.net.packet.out.ContactPackets;
|
import core.net.packet.out.ContactPackets;
|
||||||
import core.tools.StringUtils;
|
import core.tools.StringUtils;
|
||||||
|
import rs09.worker.ManagementEvents;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -37,7 +39,7 @@ public final class CommunicationInfo {
|
||||||
/**
|
/**
|
||||||
* The clan ranks.
|
* The clan ranks.
|
||||||
*/
|
*/
|
||||||
private final Map<String, Contact> contacts = new HashMap<>();
|
private Map<String, Contact> contacts = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of blocked players.
|
* The list of blocked players.
|
||||||
|
|
@ -233,64 +235,6 @@ public final class CommunicationInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Synchronizes the contact lists.
|
|
||||||
*/
|
|
||||||
public void sync(Player player) {
|
|
||||||
if (WorldCommunicator.isEnabled()) {
|
|
||||||
if (!player.isArtificial()) {
|
|
||||||
MSPacketRepository.requestCommunicationInfo(player.getName());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (player.getSettings().getPrivateChatSetting() != 2) {
|
|
||||||
notifyPlayers(player, true, false);
|
|
||||||
}
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, ContactContext.UPDATE_STATE_TYPE));
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, ContactContext.IGNORE_LIST_TYPE));
|
|
||||||
for (String name : contacts.keySet()) {
|
|
||||||
Player p = Repository.getPlayerByName(name);
|
|
||||||
int worldId = 0;
|
|
||||||
if (p != null && showActive(player, p)) {
|
|
||||||
worldId = GameWorld.getSettings().getWorldId();
|
|
||||||
}
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, name, worldId));
|
|
||||||
}
|
|
||||||
if (currentClan != null && !player.isArtificial() && (clan = ClanRepository.get(currentClan)) != null) {
|
|
||||||
clan.enter(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Notifies all other players.
|
|
||||||
* @param online If this player is online.
|
|
||||||
* @param chatSetting If it was a chat setting change.
|
|
||||||
*/
|
|
||||||
public static void notifyPlayers(Player player, boolean online, boolean chatSetting) {
|
|
||||||
if (WorldCommunicator.isEnabled()) {
|
|
||||||
if (!online && !chatSetting) {
|
|
||||||
MSPacketRepository.sendPlayerRemoval(player.getName());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (Player p : Repository.getPlayers()) {
|
|
||||||
if (p == player || !p.isActive()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (hasContact(p, player.getName())) {
|
|
||||||
int worldId = 0;
|
|
||||||
if (online && showActive(p, player)) {
|
|
||||||
worldId = GameWorld.getSettings().getWorldId();
|
|
||||||
}
|
|
||||||
p.getCommunication().getContacts().get(player.getName()).setWorldId(worldId);
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(p, player.getName(), worldId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!online && !chatSetting && player.getCommunication().getClan() != null) {
|
|
||||||
player.getCommunication().getClan().leave(player, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a message to the target.
|
* Sends a message to the target.
|
||||||
* @param player The player sending the message.
|
* @param player The player sending the message.
|
||||||
|
|
@ -298,28 +242,12 @@ public final class CommunicationInfo {
|
||||||
* @param message The message to send.
|
* @param message The message to send.
|
||||||
*/
|
*/
|
||||||
public static void sendMessage(Player player, String target, String message) {
|
public static void sendMessage(Player player, String target, String message) {
|
||||||
if (WorldCommunicator.isEnabled()) {
|
PrivateMessage.Builder builder = PrivateMessage.newBuilder();
|
||||||
StringBuilder sb = new StringBuilder(message);
|
builder.setSender(player.getName());
|
||||||
sb.append(" => ").append(target);
|
builder.setRank(player.getDetails().getRights().ordinal());
|
||||||
player.getMonitor().log(sb.toString(), PlayerMonitor.PRIVATE_CHAT_LOG);
|
builder.setMessage(message);
|
||||||
MSPacketRepository.sendPrivateMessage(player, target, message);
|
builder.setReceiver(target);
|
||||||
return;
|
ManagementEvents.publish(builder.build());
|
||||||
}
|
|
||||||
if (!player.getDetails().getCommunication().contacts.containsKey(target)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Player p = Repository.getPlayerByName(target);
|
|
||||||
if (p == null || !p.isActive() || !showActive(p, player)) {
|
|
||||||
player.getPacketDispatch().sendMessage("That player is currently offline.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!GameWorld.getSettings().isDevMode()) {
|
|
||||||
StringBuilder sb = new StringBuilder(message);
|
|
||||||
sb.append(" => ").append(target);
|
|
||||||
player.getMonitor().log(sb.toString(), PlayerMonitor.PRIVATE_CHAT_LOG);
|
|
||||||
}
|
|
||||||
PacketRepository.send(CommunicationMessage.class, new MessageContext(player, p, MessageContext.SEND_MESSAGE, message));
|
|
||||||
PacketRepository.send(CommunicationMessage.class, new MessageContext(p, player, MessageContext.RECIEVE_MESSAGE, message));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -525,7 +453,7 @@ public final class CommunicationInfo {
|
||||||
* @return The currentClan.
|
* @return The currentClan.
|
||||||
*/
|
*/
|
||||||
public String getCurrentClan() {
|
public String getCurrentClan() {
|
||||||
return currentClan;
|
return currentClan == null ? "" : currentClan;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -640,9 +568,21 @@ public final class CommunicationInfo {
|
||||||
currentClan = accountInfo.getCurrentClan();
|
currentClan = accountInfo.getCurrentClan();
|
||||||
|
|
||||||
String clanReqs = accountInfo.getClanReqs();
|
String clanReqs = accountInfo.getClanReqs();
|
||||||
|
ClanRank[] reqs = parseClanRequirements(clanReqs);
|
||||||
|
joinRequirement = reqs[0];
|
||||||
|
messageRequirement = reqs[1];
|
||||||
|
kickRequirement = reqs[2];
|
||||||
|
lootRequirement = reqs[3];
|
||||||
|
|
||||||
|
String contacts = accountInfo.getContacts();
|
||||||
|
this.contacts = parseContacts(contacts);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ClanRank[] parseClanRequirements(String clanReqs) {
|
||||||
|
ClanRank[] requirements = new ClanRank[4];
|
||||||
String[] tokens = clanReqs.split(",");
|
String[] tokens = clanReqs.split(",");
|
||||||
ClanRank rank = null;
|
ClanRank rank;
|
||||||
int ordinal = 0;
|
int ordinal;
|
||||||
for (int i = 0; i < tokens.length; i++) {
|
for (int i = 0; i < tokens.length; i++) {
|
||||||
ordinal = Integer.parseInt(tokens[i]);
|
ordinal = Integer.parseInt(tokens[i]);
|
||||||
if (ordinal < 0 || ordinal > ClanRank.values().length -1) {
|
if (ordinal < 0 || ordinal > ClanRank.values().length -1) {
|
||||||
|
|
@ -651,27 +591,33 @@ public final class CommunicationInfo {
|
||||||
rank = ClanRank.values()[ordinal];
|
rank = ClanRank.values()[ordinal];
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
joinRequirement = rank;
|
requirements[0] = rank;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
messageRequirement = rank;
|
requirements[1] = rank;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (ordinal < 3 || ordinal > 8) {
|
if (ordinal < 3 || ordinal > 8) {
|
||||||
|
requirements[2] = ClanRank.ADMINISTRATOR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
kickRequirement = rank;
|
requirements[2] = rank;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
lootRequirement = rank;
|
requirements[3] = rank;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String contacts = accountInfo.getContacts();
|
return requirements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HashMap<String, Contact> parseContacts(String contacts) {
|
||||||
|
HashMap<String, Contact> theseContacts = new HashMap<>();
|
||||||
|
String[] tokens;
|
||||||
if (!contacts.isEmpty()) {
|
if (!contacts.isEmpty()) {
|
||||||
String[] datas = contacts.split("~");
|
String[] datas = contacts.split("~");
|
||||||
Contact contact = null;
|
Contact contact;
|
||||||
for (String d : datas) {
|
for (String d : datas) {
|
||||||
tokens = d.replace("{", "").replace("}", "").split(",");
|
tokens = d.replace("{", "").replace("}", "").split(",");
|
||||||
if (tokens.length == 0) {
|
if (tokens.length == 0) {
|
||||||
|
|
@ -679,8 +625,46 @@ public final class CommunicationInfo {
|
||||||
}
|
}
|
||||||
contact = new Contact(tokens[0]);
|
contact = new Contact(tokens[0]);
|
||||||
contact.setRank(ClanRank.values()[Integer.parseInt(tokens[1])]);
|
contact.setRank(ClanRank.values()[Integer.parseInt(tokens[1])]);
|
||||||
this.contacts.put(tokens[0], contact);
|
theseContacts.put(tokens[0], contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return theseContacts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContactString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
int index = 0;
|
||||||
|
for (Contact contact : contacts.values()) {
|
||||||
|
sb.append("{");
|
||||||
|
sb.append(contact.getUsername());
|
||||||
|
sb.append(",");
|
||||||
|
sb.append(contact.getRank().ordinal());
|
||||||
|
sb.append("}");
|
||||||
|
if (index++ < contacts.size() - 1) sb.append("~");
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBlockedString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
int index = 0;
|
||||||
|
for (String block : blocked) {
|
||||||
|
sb.append(block);
|
||||||
|
if (index++ < blocked.size() - 1) sb.append(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClanReqString() {
|
||||||
|
return
|
||||||
|
joinRequirement.ordinal()
|
||||||
|
+ "," + messageRequirement.ordinal()
|
||||||
|
+ "," + kickRequirement.ordinal()
|
||||||
|
+ "," + lootRequirement.ordinal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -29,82 +29,6 @@ import java.nio.ByteBuffer;
|
||||||
* @author Emperor
|
* @author Emperor
|
||||||
*/
|
*/
|
||||||
public final class MSPacketRepository {
|
public final class MSPacketRepository {
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles a player info update.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static void sendInfoUpdate(Player player) {
|
|
||||||
IoBuffer buffer = new IoBuffer(14, PacketHeader.BYTE);
|
|
||||||
buffer.putString(player.getName());
|
|
||||||
buffer.put(Rights.getChatIcon(player));
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
player.getAppearance().sync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a player on the management server.
|
|
||||||
*
|
|
||||||
* @param parser The login.
|
|
||||||
*/
|
|
||||||
public static void sendPlayerRegistry(LoginParser parser) {
|
|
||||||
IoBuffer buffer = new IoBuffer(0, PacketHeader.BYTE);
|
|
||||||
PlayerDetails d = parser.getDetails();
|
|
||||||
buffer.putString(d.getUsername());
|
|
||||||
buffer.putString(d.getPassword());
|
|
||||||
buffer.putString(d.getIpAddress());
|
|
||||||
buffer.putString(d.getMacAddress());
|
|
||||||
buffer.putString(d.getCompName());
|
|
||||||
buffer.putString(d.getSerial());
|
|
||||||
buffer.putInt(d.getRights().toInteger());
|
|
||||||
buffer.put((byte) getIcon(d));
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends the player removal packet.
|
|
||||||
*
|
|
||||||
* @param username The name of the player to remove.
|
|
||||||
*/
|
|
||||||
public static void sendPlayerRemoval(String username) {
|
|
||||||
if (!WorldCommunicator.isEnabled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
IoBuffer buffer = new IoBuffer(1, PacketHeader.BYTE);
|
|
||||||
buffer.putString(username);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends the punishment packet to the MS.
|
|
||||||
*
|
|
||||||
* @param player The player punishing the other player.
|
|
||||||
* @param name The name of the player to punish.
|
|
||||||
* @param type The punishment type (0: mute, 1: ban, 2: ip-ban, 3: mac-ban,
|
|
||||||
* 4: msk-ban)
|
|
||||||
* @param duration The duration of the punishment (in milliseconds, -1 =
|
|
||||||
* permanent).
|
|
||||||
*/
|
|
||||||
public static void sendPunishment(Player player, String name, int type, long duration) {
|
|
||||||
IoBuffer buffer = new IoBuffer(2, PacketHeader.BYTE);
|
|
||||||
buffer.put(type);
|
|
||||||
buffer.putString(name);
|
|
||||||
buffer.putLong(duration);
|
|
||||||
buffer.putString(player.getName());
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requests the communication info for the given player.
|
|
||||||
*
|
|
||||||
* @param username The username.
|
|
||||||
*/
|
|
||||||
public static void requestCommunicationInfo(String username) {
|
|
||||||
IoBuffer buffer = new IoBuffer(3, PacketHeader.BYTE);
|
|
||||||
buffer.putString(username);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a contact update.
|
* Sends a contact update.
|
||||||
*
|
*
|
||||||
|
|
@ -127,22 +51,6 @@ public final class MSPacketRepository {
|
||||||
WorldCommunicator.getSession().write(buffer);
|
WorldCommunicator.getSession().write(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Joins a clan.
|
|
||||||
*
|
|
||||||
* @param player The player joining a clan.
|
|
||||||
* @param name The clan's owner name.
|
|
||||||
*/
|
|
||||||
public static void sendJoinClan(Player player, String name) {
|
|
||||||
if (name.length() > 0 && !ClanRepository.getClans().containsKey(name)) {
|
|
||||||
requestClanInfo(name);
|
|
||||||
}
|
|
||||||
IoBuffer buffer = new IoBuffer(6, PacketHeader.BYTE);
|
|
||||||
buffer.putString(player.getName());
|
|
||||||
buffer.putString(name);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the clan rename packet.
|
* Sends the clan rename packet.
|
||||||
*
|
*
|
||||||
|
|
@ -189,45 +97,6 @@ public final class MSPacketRepository {
|
||||||
WorldCommunicator.getSession().write(buffer);
|
WorldCommunicator.getSession().write(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends a clan message.
|
|
||||||
*
|
|
||||||
* @param player The player sending the message.
|
|
||||||
* @param message The message to send.
|
|
||||||
*/
|
|
||||||
public static void sendClanMessage(Player player, String message) {
|
|
||||||
IoBuffer buffer = new IoBuffer(10, PacketHeader.BYTE);
|
|
||||||
buffer.putString(player.getName());
|
|
||||||
buffer.putString(message);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends a private message.
|
|
||||||
*
|
|
||||||
* @param player The player.
|
|
||||||
* @param name The target name.
|
|
||||||
* @param message The message.
|
|
||||||
*/
|
|
||||||
public static void sendPrivateMessage(Player player, String name, String message) {
|
|
||||||
IoBuffer buffer = new IoBuffer(11, PacketHeader.BYTE);
|
|
||||||
buffer.putString(player.getName());
|
|
||||||
buffer.putString(name);
|
|
||||||
buffer.putString(message);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requests clan information.
|
|
||||||
*
|
|
||||||
* @param name The clan's owner name.
|
|
||||||
*/
|
|
||||||
public static void requestClanInfo(String name) {
|
|
||||||
IoBuffer buffer = new IoBuffer(12, PacketHeader.BYTE);
|
|
||||||
buffer.putString(name);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the chat settings.
|
* Sends the chat settings.
|
||||||
*
|
*
|
||||||
|
|
@ -244,421 +113,4 @@ public final class MSPacketRepository {
|
||||||
buffer.put(tradeSetting);
|
buffer.put(tradeSetting);
|
||||||
WorldCommunicator.getSession().write(buffer);
|
WorldCommunicator.getSession().write(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles an incoming packet from the management server.
|
|
||||||
*
|
|
||||||
* @param opcode The opcode.
|
|
||||||
* @param b The buffer.
|
|
||||||
*/
|
|
||||||
public static void handleIncoming(int opcode, ByteBuffer b) {
|
|
||||||
IoBuffer buffer = new IoBuffer(opcode, PacketHeader.NORMAL, b);
|
|
||||||
switch (opcode) {
|
|
||||||
case 0:
|
|
||||||
handleRegistryResponse(buffer);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
handlePlayerMessage(buffer);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
handleContactInformation(buffer);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
handleContactUpdate(buffer);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
handleMessage(buffer);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
handleClanInformation(buffer);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
handleLeaveClan(buffer);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
handleContactNotification(buffer);
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
handlePlayerLogout(buffer);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
handleUpdate(buffer);
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
handlePunishmentUpdate(buffer);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
SystemManager.getSystemConfig().parse();
|
|
||||||
SystemLogger.logInfo("System configurations reloaded.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
System.out.println("Handling incoming packet [opcode=" + opcode + ", size=" + b.limit() + "].");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the player registry response packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handleRegistryResponse(IoBuffer buffer) {
|
|
||||||
String username = buffer.getString();
|
|
||||||
int opcode = buffer.get() & 0xFF;
|
|
||||||
LoginParser parser = WorldCommunicator.finishLoginAttempt(username);
|
|
||||||
if (parser != null) {
|
|
||||||
PlayerDetails details = parser.getDetails();
|
|
||||||
AuthResponse response = AuthResponse.values()[opcode];
|
|
||||||
Player player = null;
|
|
||||||
switch (response) {
|
|
||||||
case AlreadyOnline:
|
|
||||||
player = Repository.getPlayerByName(username);
|
|
||||||
/* if (player == null || player.getSession().isActive() || !player.getSession().getAddress().equals(details.getSession().getAddress())) {
|
|
||||||
details.getSession().write(response, true);
|
|
||||||
break;
|
|
||||||
}*/
|
|
||||||
if (player != null) player.getPacketDispatch().sendLogout();
|
|
||||||
case Success:
|
|
||||||
if (!details.getSession().isActive()) {
|
|
||||||
sendPlayerRemoval(username);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (player == null) {
|
|
||||||
player = new Player(details);
|
|
||||||
} else {
|
|
||||||
player.updateDetails(details);
|
|
||||||
}
|
|
||||||
parser.initialize(player, response == AuthResponse.AlreadyOnline);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MovingWorld:
|
|
||||||
details.getSession().setServerKey(buffer.get());
|
|
||||||
default:
|
|
||||||
details.getSession().write(response, true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends global message to all player nodes.
|
|
||||||
*
|
|
||||||
* @param message The message.
|
|
||||||
*/
|
|
||||||
public static void sendWorldMessage(String message) {
|
|
||||||
IoBuffer buffer = new IoBuffer(12, PacketHeader.BYTE);
|
|
||||||
buffer.putString(message);
|
|
||||||
WorldCommunicator.getSession().write(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles sending a message to a player.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer to read from.
|
|
||||||
*/
|
|
||||||
private static void handlePlayerMessage(IoBuffer buffer) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
String message = buffer.getString();
|
|
||||||
Player player = Repository.getPlayerByName(name);
|
|
||||||
if (player != null && player.isActive()) {
|
|
||||||
player.getPacketDispatch().sendMessage(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the contact information packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer to read from.
|
|
||||||
*/
|
|
||||||
private static void handleContactInformation(IoBuffer buffer) {
|
|
||||||
String username = buffer.getString();
|
|
||||||
Player player = Repository.getPlayerByName(username);
|
|
||||||
if (player == null || !player.isActive()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, ContactContext.UPDATE_STATE_TYPE));
|
|
||||||
player.getCommunication().getContacts().clear();
|
|
||||||
int length = buffer.get() & 0xFF;
|
|
||||||
for (int i = 0; i < length; i++) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
Contact contact = new Contact(name);
|
|
||||||
contact.setRank(ClanRank.values()[buffer.get() & 0xFF]);
|
|
||||||
contact.setWorldId(buffer.get() & 0xFF);
|
|
||||||
player.getCommunication().getContacts().put(name, contact);
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, name, contact.getWorldId()));
|
|
||||||
}
|
|
||||||
player.getCommunication().getBlocked().clear();
|
|
||||||
length = buffer.get() & 0xFF;
|
|
||||||
for (int i = 0; i < length; i++) {
|
|
||||||
player.getCommunication().getBlocked().add(buffer.getString());
|
|
||||||
}
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, ContactContext.IGNORE_LIST_TYPE));
|
|
||||||
if (buffer.get() == 1) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
sendJoinClan(player, name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the contact update packet.
|
|
||||||
*/
|
|
||||||
private static void handleContactUpdate(IoBuffer buffer) {
|
|
||||||
String username = buffer.getString();
|
|
||||||
String contactName = buffer.getString();
|
|
||||||
boolean block = buffer.get() == 1;
|
|
||||||
int type = buffer.get();
|
|
||||||
Player player = Repository.getPlayerByName(username);
|
|
||||||
if (player == null || !player.isActive()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (type) {
|
|
||||||
case 0:
|
|
||||||
if (block) {
|
|
||||||
player.getCommunication().getBlocked().add(contactName);
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, ContactContext.IGNORE_LIST_TYPE));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
int worldId = buffer.get() & 0xFF;
|
|
||||||
Contact contact = player.getCommunication().getContacts().get(contactName);
|
|
||||||
if (contact == null) {
|
|
||||||
player.getCommunication().getContacts().put(contactName, contact = new Contact(contactName));
|
|
||||||
}
|
|
||||||
contact.setWorldId(worldId);
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, contactName, worldId));
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
if (block) {
|
|
||||||
player.getCommunication().getBlocked().remove(contactName);
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, ContactContext.IGNORE_LIST_TYPE));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
player.getCommunication().getContacts().remove(contactName);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ClanRank rank = ClanRank.values()[type - 2];
|
|
||||||
contact = player.getCommunication().getContacts().get(contactName);
|
|
||||||
if (contact == null) {
|
|
||||||
// SystemLogger.logErr("Invalid contact specified [name=" +
|
|
||||||
// contact + "]!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
contact.setRank(rank);
|
|
||||||
ClanRepository clan = ClanRepository.get(username);
|
|
||||||
if (clan != null) {
|
|
||||||
clan.rank(contactName, rank);
|
|
||||||
}
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, contactName, contact.getWorldId()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the message packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handleMessage(IoBuffer buffer) {
|
|
||||||
String username = buffer.getString();
|
|
||||||
String sender = buffer.getString();
|
|
||||||
int type = buffer.get() & 0xFF;
|
|
||||||
int icon = buffer.get() & 0xFF;
|
|
||||||
String message = buffer.getString();
|
|
||||||
Player player = Repository.getPlayerByName(username);
|
|
||||||
if (player == null || !player.isActive()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int opcode = MessageContext.SEND_MESSAGE;
|
|
||||||
switch (type) {
|
|
||||||
case 1:
|
|
||||||
opcode = MessageContext.RECIEVE_MESSAGE;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
opcode = MessageContext.CLAN_MESSAGE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
PacketRepository.send(CommunicationMessage.class, new MessageContext(player, sender, icon, opcode, message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the clan information packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handleClanInformation(IoBuffer buffer) {
|
|
||||||
String owner = buffer.getString();
|
|
||||||
ClanRepository clan = ClanRepository.getClans().get(owner);
|
|
||||||
if (clan == null) {
|
|
||||||
ClanRepository.getClans().put(owner, clan = new ClanRepository(owner));
|
|
||||||
} else {
|
|
||||||
clan.getRanks().clear();
|
|
||||||
clan.getPlayers().clear();
|
|
||||||
}
|
|
||||||
clan.setName(buffer.getString());
|
|
||||||
int length = buffer.get() & 0xFF;
|
|
||||||
for (int i = 0; i < length; i++) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
int worldId = buffer.get() & 0xFF;
|
|
||||||
clan.getRanks().put(name, ClanRank.values()[buffer.get() & 0xFF]);
|
|
||||||
ClanEntry entry = new ClanEntry(name, worldId);
|
|
||||||
if (worldId == GameWorld.getSettings().getWorldId()) {
|
|
||||||
Player player = Repository.getPlayerByName(name);
|
|
||||||
entry.setPlayer(player);
|
|
||||||
if (player != null) {
|
|
||||||
player.getCommunication().setClan(clan);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
clan.getPlayers().add(entry);
|
|
||||||
}
|
|
||||||
clan.setJoinRequirement(ClanRank.values()[buffer.get() & 0xFF]);
|
|
||||||
clan.setKickRequirement(ClanRank.values()[buffer.get() & 0xFF]);
|
|
||||||
clan.setMessageRequirement(ClanRank.values()[buffer.get() & 0xFF]);
|
|
||||||
clan.setLootRequirement(ClanRank.values()[buffer.get() & 0xFF]);
|
|
||||||
clan.update();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the clan information packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handleLeaveClan(IoBuffer buffer) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
Player player = Repository.getPlayerByName(name);
|
|
||||||
if (player == null || !player.isActive()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (player.getCommunication().getClan() == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PacketRepository.send(UpdateClanChat.class, new ClanContext(player, null, true));
|
|
||||||
player.getCommunication().setClan(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles a contact notification packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handleContactNotification(IoBuffer buffer) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
int worldId = buffer.get() & 0xFF;
|
|
||||||
int size = buffer.get() & 0xFF;
|
|
||||||
for (int i = 0; i < size; i++) {
|
|
||||||
String username = buffer.getString();
|
|
||||||
Player player = Repository.getPlayerByName(username);
|
|
||||||
if (player == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
Contact c = player.getCommunication().getContacts().get(name);
|
|
||||||
if (c == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
c.setWorldId(worldId);
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(player, name, worldId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles a player logout notification packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handlePlayerLogout(IoBuffer buffer) {
|
|
||||||
String name = buffer.getString();
|
|
||||||
for (Player p : Repository.getPlayers()) {
|
|
||||||
if (CommunicationInfo.hasContact(p, name)) {
|
|
||||||
PacketRepository.send(ContactPackets.class, new ContactContext(p, name, 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the update packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handleUpdate(IoBuffer buffer) {
|
|
||||||
int ticks = buffer.getInt();
|
|
||||||
if (ticks < 0) {
|
|
||||||
SystemManager.getUpdater().cancel();
|
|
||||||
} else {
|
|
||||||
SystemManager.getUpdater().setCountdown(ticks);
|
|
||||||
SystemManager.flag(SystemState.UPDATING);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the punishment update packet.
|
|
||||||
*
|
|
||||||
* @param buffer The buffer.
|
|
||||||
*/
|
|
||||||
private static void handlePunishmentUpdate(IoBuffer buffer) {
|
|
||||||
String key = buffer.getString();
|
|
||||||
int type = buffer.get();
|
|
||||||
long duration = buffer.getLong();
|
|
||||||
switch (type) {
|
|
||||||
case 0:
|
|
||||||
Player player = Repository.getPlayerByName(key);
|
|
||||||
if (player != null && player.isActive()) {
|
|
||||||
player.getPacketDispatch().sendMessages((duration > 0L ? new String[]{"You have been muted.", "To prevent further mutes please read the rules."} : new String[]{"You have been unmuted."}));
|
|
||||||
player.getDetails().setMuteTime(duration);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
player = Repository.getPlayerByName(key);
|
|
||||||
if (player != null && player.isActive() && duration > System.currentTimeMillis()) {
|
|
||||||
player.getSession().disconnect();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
for (Player p : Repository.getPlayers()) {
|
|
||||||
if (p.getDetails().getIpAddress().equals(key)) {
|
|
||||||
p.getSession().disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
for (Player p : Repository.getPlayers()) {
|
|
||||||
if (p == null || key == null || p.getDetails() == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (p.getDetails().getMacAddress().equals(key)) {
|
|
||||||
p.getSession().disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
for (Player p : Repository.getPlayers()) {
|
|
||||||
if (p == null || key == null || p.getDetails() == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (p.getDetails().getSerial().equals(key)) {
|
|
||||||
p.getSession().disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
player = Repository.getPlayerByName(key);
|
|
||||||
if (player != null) {
|
|
||||||
player.getPacketDispatch().sendLogout();
|
|
||||||
player.clear(true);
|
|
||||||
player.getSession().disconnect();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the icon to send.
|
|
||||||
*
|
|
||||||
* @param d the details.
|
|
||||||
* @return the icon.
|
|
||||||
*/
|
|
||||||
private static int getIcon(PlayerDetails d) {
|
|
||||||
int icon = 0;
|
|
||||||
if (d.getRights() != Rights.REGULAR_PLAYER) {
|
|
||||||
icon = d.getRights().toInteger();
|
|
||||||
}
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -67,23 +67,6 @@ public final class WorldCommunicator {
|
||||||
session.setObject(WORLDS[GameWorld.getSettings().getWorldId() - 1]);
|
session.setObject(WORLDS[GameWorld.getSettings().getWorldId() - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a login attempt.
|
|
||||||
* @param parser The login attempt.
|
|
||||||
*/
|
|
||||||
public static void register(final LoginParser parser) {
|
|
||||||
LoginParser p = loginAttempts.get(parser.getDetails().getUsername());
|
|
||||||
if (p != null && GameWorld.getTicks() - p.getTimeStamp() < 50 && p.getDetails().getRights() == Rights.REGULAR_PLAYER) {
|
|
||||||
parser.getDetails().getSession().write(AuthResponse.AlreadyOnline, true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
loginAttempts.put(parser.getDetails().getUsername(), parser);
|
|
||||||
TaskExecutor.executeSQL(() -> {
|
|
||||||
MSPacketRepository.sendPlayerRegistry(parser);
|
|
||||||
return Unit.INSTANCE;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to connect to the management server.
|
* Attempts to connect to the management server.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import core.net.IoSession;
|
||||||
import core.net.lobby.WorldList;
|
import core.net.lobby.WorldList;
|
||||||
import core.net.registry.AccountRegister;
|
import core.net.registry.AccountRegister;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
|
import rs09.game.system.SystemLogger;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -64,6 +65,7 @@ public final class HSReadEvent extends IoReadEvent {
|
||||||
WorldList.sendUpdate(session, updateStamp);
|
WorldList.sendUpdate(session, updateStamp);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
SystemLogger.logInfo("PKT " + opcode);
|
||||||
session.disconnect();
|
session.disconnect();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,11 +60,6 @@ public final class MSReadEvent extends IoReadEvent {
|
||||||
byte[] data = new byte[size];
|
byte[] data = new byte[size];
|
||||||
buffer.get(data);
|
buffer.get(data);
|
||||||
last = opcode;
|
last = opcode;
|
||||||
try {
|
|
||||||
MSPacketRepository.handleIncoming(opcode, ByteBuffer.wrap(data));
|
|
||||||
} catch (Throwable t) {
|
|
||||||
t.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package core.net.packet.in;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.system.monitor.PlayerMonitor;
|
import core.game.system.monitor.PlayerMonitor;
|
||||||
import core.game.system.task.Pulse;
|
import core.game.system.task.Pulse;
|
||||||
|
import proto.management.ClanMessage;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
import core.game.world.update.flag.context.ChatMessage;
|
import core.game.world.update.flag.context.ChatMessage;
|
||||||
import core.game.world.update.flag.player.ChatFlag;
|
import core.game.world.update.flag.player.ChatFlag;
|
||||||
|
|
@ -11,6 +12,7 @@ import core.net.amsc.WorldCommunicator;
|
||||||
import core.net.packet.IncomingPacket;
|
import core.net.packet.IncomingPacket;
|
||||||
import core.net.packet.IoBuffer;
|
import core.net.packet.IoBuffer;
|
||||||
import core.tools.StringUtils;
|
import core.tools.StringUtils;
|
||||||
|
import rs09.worker.ManagementEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the incoming chat packet.
|
* Represents the incoming chat packet.
|
||||||
|
|
@ -29,15 +31,12 @@ public class ChatPacket implements IncomingPacket {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (message.startsWith("/") && player.getCommunication().getClan() != null) {
|
if (message.startsWith("/") && player.getCommunication().getClan() != null) {
|
||||||
StringBuilder sb = new StringBuilder(message);
|
ClanMessage.Builder builder = ClanMessage.newBuilder();
|
||||||
sb.append(" => ").append(player.getName()).append(" (owned by ").append(player.getCommunication().getClan().getOwner()).append(")");
|
builder.setSender(player.getName());
|
||||||
String m = sb.toString();
|
builder.setClanName(player.getCommunication().getClan().getOwner().toLowerCase().replace(" ", "_"));
|
||||||
player.getMonitor().log(m.replace(m.charAt(0), ' ').trim(), PlayerMonitor.CLAN_CHAT_LOG);
|
builder.setMessage(message.substring(1));
|
||||||
if (WorldCommunicator.isEnabled()) {
|
builder.setRank(player.getDetails().getRights().ordinal());
|
||||||
MSPacketRepository.sendClanMessage(player, message.substring(1));
|
ManagementEvents.publish(builder.build());
|
||||||
} else {
|
|
||||||
player.getCommunication().getClan().message(player, message.substring(1));
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.getMonitor().log(message, PlayerMonitor.PUBLIC_CHAT_LOG);
|
player.getMonitor().log(message, PlayerMonitor.PUBLIC_CHAT_LOG);
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import core.game.node.entity.player.Player;
|
||||||
import core.game.system.communication.ClanRank;
|
import core.game.system.communication.ClanRank;
|
||||||
import core.game.system.communication.ClanRepository;
|
import core.game.system.communication.ClanRepository;
|
||||||
import core.game.system.communication.CommunicationInfo;
|
import core.game.system.communication.CommunicationInfo;
|
||||||
|
import proto.management.JoinClanRequest;
|
||||||
import rs09.game.world.repository.Repository;
|
import rs09.game.world.repository.Repository;
|
||||||
import core.net.amsc.MSPacketRepository;
|
import core.net.amsc.MSPacketRepository;
|
||||||
import core.net.amsc.WorldCommunicator;
|
import core.net.amsc.WorldCommunicator;
|
||||||
import core.net.packet.IncomingPacket;
|
import core.net.packet.IncomingPacket;
|
||||||
import core.net.packet.IoBuffer;
|
import core.net.packet.IoBuffer;
|
||||||
import core.tools.StringUtils;
|
import core.tools.StringUtils;
|
||||||
|
import rs09.worker.ManagementEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles incoming clan packets.
|
* Handles incoming clan packets.
|
||||||
|
|
@ -21,28 +23,20 @@ public class ClanPacketHandler implements IncomingPacket {
|
||||||
public void decode(Player player, int opcode, IoBuffer buffer) {
|
public void decode(Player player, int opcode, IoBuffer buffer) {
|
||||||
switch (buffer.opcode()) {
|
switch (buffer.opcode()) {
|
||||||
case 104:
|
case 104:
|
||||||
long nameLong = buffer.getLong();
|
|
||||||
String name = StringUtils.longToString(nameLong);
|
|
||||||
if (nameLong != 0l) {
|
|
||||||
player.getPacketDispatch().sendMessage("Attempting to join channel...:clan:");
|
|
||||||
}
|
|
||||||
if (WorldCommunicator.isEnabled()) {
|
|
||||||
MSPacketRepository.sendJoinClan(player, name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (player.getCommunication().getClan() != null) {
|
if (player.getCommunication().getClan() != null) {
|
||||||
player.getCommunication().getClan().leave(player, true);
|
player.getCommunication().getClan().leave(player, true);
|
||||||
player.getCommunication().setClan(null);
|
player.getCommunication().setClan(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ClanRepository clan = ClanRepository.get(name);
|
long nameLong = buffer.getLong();
|
||||||
if (clan == null || clan.getName().equals("Chat disabled")) {
|
String name = StringUtils.longToString(nameLong);
|
||||||
player.getPacketDispatch().sendMessage("The channel you tried to join does not exist.");
|
if (nameLong != 0L) {
|
||||||
break;
|
player.getPacketDispatch().sendMessage("Attempting to join channel...:clan:");
|
||||||
}
|
|
||||||
if (clan.enter(player)) {
|
|
||||||
player.getCommunication().setClan(clan);
|
|
||||||
}
|
}
|
||||||
|
JoinClanRequest.Builder builder = JoinClanRequest.newBuilder();
|
||||||
|
builder.setClanName(name);
|
||||||
|
builder.setUsername(player.getName());
|
||||||
|
ManagementEvents.publish(builder.build());
|
||||||
break;
|
break;
|
||||||
case 188:
|
case 188:
|
||||||
int rank = buffer.getA();
|
int rank = buffer.getA();
|
||||||
|
|
@ -59,7 +53,7 @@ public class ClanPacketHandler implements IncomingPacket {
|
||||||
MSPacketRepository.sendClanKick(player.getName(), name);
|
MSPacketRepository.sendClanKick(player.getName(), name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
clan = player.getCommunication().getClan();
|
ClanRepository clan = player.getCommunication().getClan();
|
||||||
Player target = Repository.getPlayerByName(name);
|
Player target = Repository.getPlayerByName(name);
|
||||||
if (clan == null || target == null) {
|
if (clan == null || target == null) {
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public final class ContactPackets implements OutgoingPacket<ContactContext> {
|
||||||
Player player = context.getPlayer();
|
Player player = context.getPlayer();
|
||||||
switch (context.getType()) {
|
switch (context.getType()) {
|
||||||
case ContactContext.UPDATE_STATE_TYPE:
|
case ContactContext.UPDATE_STATE_TYPE:
|
||||||
buffer = new IoBuffer(197).put(WorldCommunicator.getState().value());
|
buffer = new IoBuffer(197).put(2); //always put the AVAILABLE state.
|
||||||
break;
|
break;
|
||||||
case ContactContext.IGNORE_LIST_TYPE:
|
case ContactContext.IGNORE_LIST_TYPE:
|
||||||
buffer = new IoBuffer(126, PacketHeader.SHORT);
|
buffer = new IoBuffer(126, PacketHeader.SHORT);
|
||||||
|
|
|
||||||
971
Server/src/main/java/proto/management/BlockedUpdate.java
Normal file
971
Server/src/main/java/proto/management/BlockedUpdate.java
Normal file
|
|
@ -0,0 +1,971 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.BlockedUpdate}
|
||||||
|
*/
|
||||||
|
public final class BlockedUpdate extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.BlockedUpdate)
|
||||||
|
BlockedUpdateOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use BlockedUpdate.newBuilder() to construct.
|
||||||
|
private BlockedUpdate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private BlockedUpdate() {
|
||||||
|
type_ = 0;
|
||||||
|
username_ = "";
|
||||||
|
friend_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new BlockedUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private BlockedUpdate(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 8: {
|
||||||
|
int rawValue = input.readEnum();
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
proto.management.BlockedUpdate.Type value = proto.management.BlockedUpdate.Type.valueOf(rawValue);
|
||||||
|
if (value == null) {
|
||||||
|
unknownFields.mergeVarintField(1, rawValue);
|
||||||
|
} else {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
type_ = rawValue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 26: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_BlockedUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_BlockedUpdate_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.BlockedUpdate.class, proto.management.BlockedUpdate.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf enum {@code management.BlockedUpdate.Type}
|
||||||
|
*/
|
||||||
|
public enum Type
|
||||||
|
implements com.google.protobuf.ProtocolMessageEnum {
|
||||||
|
/**
|
||||||
|
* <code>ADD = 0;</code>
|
||||||
|
*/
|
||||||
|
ADD(0),
|
||||||
|
/**
|
||||||
|
* <code>REMOVE = 1;</code>
|
||||||
|
*/
|
||||||
|
REMOVE(1),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>ADD = 0;</code>
|
||||||
|
*/
|
||||||
|
public static final int ADD_VALUE = 0;
|
||||||
|
/**
|
||||||
|
* <code>REMOVE = 1;</code>
|
||||||
|
*/
|
||||||
|
public static final int REMOVE_VALUE = 1;
|
||||||
|
|
||||||
|
|
||||||
|
public final int getNumber() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value The numeric wire value of the corresponding enum entry.
|
||||||
|
* @return The enum associated with the given numeric wire value.
|
||||||
|
* @deprecated Use {@link #forNumber(int)} instead.
|
||||||
|
*/
|
||||||
|
@java.lang.Deprecated
|
||||||
|
public static Type valueOf(int value) {
|
||||||
|
return forNumber(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value The numeric wire value of the corresponding enum entry.
|
||||||
|
* @return The enum associated with the given numeric wire value.
|
||||||
|
*/
|
||||||
|
public static Type forNumber(int value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0: return ADD;
|
||||||
|
case 1: return REMOVE;
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static com.google.protobuf.Internal.EnumLiteMap<Type>
|
||||||
|
internalGetValueMap() {
|
||||||
|
return internalValueMap;
|
||||||
|
}
|
||||||
|
private static final com.google.protobuf.Internal.EnumLiteMap<
|
||||||
|
Type> internalValueMap =
|
||||||
|
new com.google.protobuf.Internal.EnumLiteMap<Type>() {
|
||||||
|
public Type findValueByNumber(int number) {
|
||||||
|
return Type.forNumber(number);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||||
|
getValueDescriptor() {
|
||||||
|
return getDescriptor().getValues().get(ordinal());
|
||||||
|
}
|
||||||
|
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return getDescriptor();
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.BlockedUpdate.getDescriptor().getEnumTypes().get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Type[] VALUES = values();
|
||||||
|
|
||||||
|
public static Type valueOf(
|
||||||
|
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||||
|
if (desc.getType() != getDescriptor()) {
|
||||||
|
throw new java.lang.IllegalArgumentException(
|
||||||
|
"EnumValueDescriptor is not for this type.");
|
||||||
|
}
|
||||||
|
return VALUES[desc.getIndex()];
|
||||||
|
}
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
|
||||||
|
private Type(int value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(enum_scope:management.BlockedUpdate.Type)
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int TYPE_FIELD_NUMBER = 1;
|
||||||
|
private int type_;
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return Whether the type field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override public boolean hasType() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return The type.
|
||||||
|
*/
|
||||||
|
@java.lang.Override public proto.management.BlockedUpdate.Type getType() {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
proto.management.BlockedUpdate.Type result = proto.management.BlockedUpdate.Type.valueOf(type_);
|
||||||
|
return result == null ? proto.management.BlockedUpdate.Type.ADD : result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int FRIEND_FIELD_NUMBER = 3;
|
||||||
|
private volatile java.lang.Object friend_;
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return Whether the friend field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasFriend() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The friend.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getFriend() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
friend_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The bytes for friend.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getFriendBytes() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
friend_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasType()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasFriend()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
output.writeEnum(1, type_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, friend_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeEnumSize(1, type_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, friend_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.BlockedUpdate)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.BlockedUpdate other = (proto.management.BlockedUpdate) obj;
|
||||||
|
|
||||||
|
if (hasType() != other.hasType()) return false;
|
||||||
|
if (hasType()) {
|
||||||
|
if (type_ != other.type_) return false;
|
||||||
|
}
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasFriend() != other.hasFriend()) return false;
|
||||||
|
if (hasFriend()) {
|
||||||
|
if (!getFriend()
|
||||||
|
.equals(other.getFriend())) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasType()) {
|
||||||
|
hash = (37 * hash) + TYPE_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + type_;
|
||||||
|
}
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasFriend()) {
|
||||||
|
hash = (37 * hash) + FRIEND_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getFriend().hashCode();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.BlockedUpdate parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.BlockedUpdate prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.BlockedUpdate}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.BlockedUpdate)
|
||||||
|
proto.management.BlockedUpdateOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_BlockedUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_BlockedUpdate_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.BlockedUpdate.class, proto.management.BlockedUpdate.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.BlockedUpdate.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
type_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
friend_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_BlockedUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.BlockedUpdate getDefaultInstanceForType() {
|
||||||
|
return proto.management.BlockedUpdate.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.BlockedUpdate build() {
|
||||||
|
proto.management.BlockedUpdate result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.BlockedUpdate buildPartial() {
|
||||||
|
proto.management.BlockedUpdate result = new proto.management.BlockedUpdate(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.type_ = type_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.friend_ = friend_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.BlockedUpdate) {
|
||||||
|
return mergeFrom((proto.management.BlockedUpdate)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.BlockedUpdate other) {
|
||||||
|
if (other == proto.management.BlockedUpdate.getDefaultInstance()) return this;
|
||||||
|
if (other.hasType()) {
|
||||||
|
setType(other.getType());
|
||||||
|
}
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasFriend()) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = other.friend_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasType()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasFriend()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.BlockedUpdate parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.BlockedUpdate) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private int type_ = 0;
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return Whether the type field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override public boolean hasType() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return The type.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.BlockedUpdate.Type getType() {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
proto.management.BlockedUpdate.Type result = proto.management.BlockedUpdate.Type.valueOf(type_);
|
||||||
|
return result == null ? proto.management.BlockedUpdate.Type.ADD : result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @param value The type to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setType(proto.management.BlockedUpdate.Type value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
type_ = value.getNumber();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearType() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
type_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object friend_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return Whether the friend field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasFriend() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The friend.
|
||||||
|
*/
|
||||||
|
public java.lang.String getFriend() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
friend_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The bytes for friend.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getFriendBytes() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
friend_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @param value The friend to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setFriend(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearFriend() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
friend_ = getDefaultInstance().getFriend();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @param value The bytes for friend to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setFriendBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.BlockedUpdate)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.BlockedUpdate)
|
||||||
|
private static final proto.management.BlockedUpdate DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.BlockedUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.BlockedUpdate getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<BlockedUpdate>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<BlockedUpdate>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public BlockedUpdate parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new BlockedUpdate(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<BlockedUpdate> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<BlockedUpdate> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.BlockedUpdate getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface BlockedUpdateOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.BlockedUpdate)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return Whether the type field is set.
|
||||||
|
*/
|
||||||
|
boolean hasType();
|
||||||
|
/**
|
||||||
|
* <code>required .management.BlockedUpdate.Type type = 1;</code>
|
||||||
|
* @return The type.
|
||||||
|
*/
|
||||||
|
proto.management.BlockedUpdate.Type getType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return Whether the friend field is set.
|
||||||
|
*/
|
||||||
|
boolean hasFriend();
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The friend.
|
||||||
|
*/
|
||||||
|
java.lang.String getFriend();
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The bytes for friend.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getFriendBytes();
|
||||||
|
}
|
||||||
864
Server/src/main/java/proto/management/ClanJoinNotification.java
Normal file
864
Server/src/main/java/proto/management/ClanJoinNotification.java
Normal file
|
|
@ -0,0 +1,864 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.ClanJoinNotification}
|
||||||
|
*/
|
||||||
|
public final class ClanJoinNotification extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.ClanJoinNotification)
|
||||||
|
ClanJoinNotificationOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use ClanJoinNotification.newBuilder() to construct.
|
||||||
|
private ClanJoinNotification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private ClanJoinNotification() {
|
||||||
|
username_ = "";
|
||||||
|
clanName_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new ClanJoinNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private ClanJoinNotification(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
world_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanJoinNotification_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanJoinNotification_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.ClanJoinNotification.class, proto.management.ClanJoinNotification.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 1;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int CLANNAME_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object clanName_;
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int WORLD_FIELD_NUMBER = 3;
|
||||||
|
private int world_;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clanName_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
output.writeInt32(3, world_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clanName_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(3, world_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.ClanJoinNotification)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.ClanJoinNotification other = (proto.management.ClanJoinNotification) obj;
|
||||||
|
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasClanName() != other.hasClanName()) return false;
|
||||||
|
if (hasClanName()) {
|
||||||
|
if (!getClanName()
|
||||||
|
.equals(other.getClanName())) return false;
|
||||||
|
}
|
||||||
|
if (hasWorld() != other.hasWorld()) return false;
|
||||||
|
if (hasWorld()) {
|
||||||
|
if (getWorld()
|
||||||
|
!= other.getWorld()) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasClanName()) {
|
||||||
|
hash = (37 * hash) + CLANNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getClanName().hashCode();
|
||||||
|
}
|
||||||
|
if (hasWorld()) {
|
||||||
|
hash = (37 * hash) + WORLD_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getWorld();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanJoinNotification parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.ClanJoinNotification prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.ClanJoinNotification}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.ClanJoinNotification)
|
||||||
|
proto.management.ClanJoinNotificationOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanJoinNotification_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanJoinNotification_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.ClanJoinNotification.class, proto.management.ClanJoinNotification.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.ClanJoinNotification.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
clanName_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
world_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanJoinNotification_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanJoinNotification getDefaultInstanceForType() {
|
||||||
|
return proto.management.ClanJoinNotification.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanJoinNotification build() {
|
||||||
|
proto.management.ClanJoinNotification result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanJoinNotification buildPartial() {
|
||||||
|
proto.management.ClanJoinNotification result = new proto.management.ClanJoinNotification(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.clanName_ = clanName_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||||
|
result.world_ = world_;
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.ClanJoinNotification) {
|
||||||
|
return mergeFrom((proto.management.ClanJoinNotification)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.ClanJoinNotification other) {
|
||||||
|
if (other == proto.management.ClanJoinNotification.getDefaultInstance()) return this;
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasClanName()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = other.clanName_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasWorld()) {
|
||||||
|
setWorld(other.getWorld());
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.ClanJoinNotification parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.ClanJoinNotification) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object clanName_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanName(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearClanName() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
clanName_ = getDefaultInstance().getClanName();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The bytes for clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanNameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int world_ ;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @param value The world to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setWorld(int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
world_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearWorld() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
world_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.ClanJoinNotification)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.ClanJoinNotification)
|
||||||
|
private static final proto.management.ClanJoinNotification DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.ClanJoinNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.ClanJoinNotification getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<ClanJoinNotification>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<ClanJoinNotification>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public ClanJoinNotification parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new ClanJoinNotification(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<ClanJoinNotification> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<ClanJoinNotification> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanJoinNotification getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface ClanJoinNotificationOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.ClanJoinNotification)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
boolean hasWorld();
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
int getWorld();
|
||||||
|
}
|
||||||
864
Server/src/main/java/proto/management/ClanLeaveNotification.java
Normal file
864
Server/src/main/java/proto/management/ClanLeaveNotification.java
Normal file
|
|
@ -0,0 +1,864 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.ClanLeaveNotification}
|
||||||
|
*/
|
||||||
|
public final class ClanLeaveNotification extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.ClanLeaveNotification)
|
||||||
|
ClanLeaveNotificationOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use ClanLeaveNotification.newBuilder() to construct.
|
||||||
|
private ClanLeaveNotification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private ClanLeaveNotification() {
|
||||||
|
username_ = "";
|
||||||
|
clanName_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new ClanLeaveNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private ClanLeaveNotification(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
world_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanLeaveNotification_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanLeaveNotification_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.ClanLeaveNotification.class, proto.management.ClanLeaveNotification.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 1;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int CLANNAME_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object clanName_;
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int WORLD_FIELD_NUMBER = 3;
|
||||||
|
private int world_;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clanName_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
output.writeInt32(3, world_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clanName_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(3, world_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.ClanLeaveNotification)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.ClanLeaveNotification other = (proto.management.ClanLeaveNotification) obj;
|
||||||
|
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasClanName() != other.hasClanName()) return false;
|
||||||
|
if (hasClanName()) {
|
||||||
|
if (!getClanName()
|
||||||
|
.equals(other.getClanName())) return false;
|
||||||
|
}
|
||||||
|
if (hasWorld() != other.hasWorld()) return false;
|
||||||
|
if (hasWorld()) {
|
||||||
|
if (getWorld()
|
||||||
|
!= other.getWorld()) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasClanName()) {
|
||||||
|
hash = (37 * hash) + CLANNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getClanName().hashCode();
|
||||||
|
}
|
||||||
|
if (hasWorld()) {
|
||||||
|
hash = (37 * hash) + WORLD_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getWorld();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.ClanLeaveNotification parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.ClanLeaveNotification prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.ClanLeaveNotification}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.ClanLeaveNotification)
|
||||||
|
proto.management.ClanLeaveNotificationOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanLeaveNotification_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanLeaveNotification_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.ClanLeaveNotification.class, proto.management.ClanLeaveNotification.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.ClanLeaveNotification.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
clanName_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
world_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_ClanLeaveNotification_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanLeaveNotification getDefaultInstanceForType() {
|
||||||
|
return proto.management.ClanLeaveNotification.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanLeaveNotification build() {
|
||||||
|
proto.management.ClanLeaveNotification result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanLeaveNotification buildPartial() {
|
||||||
|
proto.management.ClanLeaveNotification result = new proto.management.ClanLeaveNotification(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.clanName_ = clanName_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||||
|
result.world_ = world_;
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.ClanLeaveNotification) {
|
||||||
|
return mergeFrom((proto.management.ClanLeaveNotification)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.ClanLeaveNotification other) {
|
||||||
|
if (other == proto.management.ClanLeaveNotification.getDefaultInstance()) return this;
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasClanName()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = other.clanName_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasWorld()) {
|
||||||
|
setWorld(other.getWorld());
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.ClanLeaveNotification parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.ClanLeaveNotification) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object clanName_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanName(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearClanName() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
clanName_ = getDefaultInstance().getClanName();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The bytes for clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanNameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int world_ ;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @param value The world to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setWorld(int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
world_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearWorld() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
world_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.ClanLeaveNotification)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.ClanLeaveNotification)
|
||||||
|
private static final proto.management.ClanLeaveNotification DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.ClanLeaveNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.ClanLeaveNotification getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<ClanLeaveNotification>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<ClanLeaveNotification>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public ClanLeaveNotification parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new ClanLeaveNotification(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<ClanLeaveNotification> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<ClanLeaveNotification> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.ClanLeaveNotification getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface ClanLeaveNotificationOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.ClanLeaveNotification)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
boolean hasWorld();
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 3;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
int getWorld();
|
||||||
|
}
|
||||||
1036
Server/src/main/java/proto/management/ClanMessage.java
Normal file
1036
Server/src/main/java/proto/management/ClanMessage.java
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,71 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface ClanMessageOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.ClanMessage)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string sender = 1;</code>
|
||||||
|
* @return Whether the sender field is set.
|
||||||
|
*/
|
||||||
|
boolean hasSender();
|
||||||
|
/**
|
||||||
|
* <code>required string sender = 1;</code>
|
||||||
|
* @return The sender.
|
||||||
|
*/
|
||||||
|
java.lang.String getSender();
|
||||||
|
/**
|
||||||
|
* <code>required string sender = 1;</code>
|
||||||
|
* @return The bytes for sender.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getSenderBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string message = 3;</code>
|
||||||
|
* @return Whether the message field is set.
|
||||||
|
*/
|
||||||
|
boolean hasMessage();
|
||||||
|
/**
|
||||||
|
* <code>required string message = 3;</code>
|
||||||
|
* @return The message.
|
||||||
|
*/
|
||||||
|
java.lang.String getMessage();
|
||||||
|
/**
|
||||||
|
* <code>required string message = 3;</code>
|
||||||
|
* @return The bytes for message.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getMessageBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 rank = 4;</code>
|
||||||
|
* @return Whether the rank field is set.
|
||||||
|
*/
|
||||||
|
boolean hasRank();
|
||||||
|
/**
|
||||||
|
* <code>required int32 rank = 4;</code>
|
||||||
|
* @return The rank.
|
||||||
|
*/
|
||||||
|
int getRank();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface ClanSettingsUpdateOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.ClanSettingsUpdate)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
}
|
||||||
971
Server/src/main/java/proto/management/FriendUpdate.java
Normal file
971
Server/src/main/java/proto/management/FriendUpdate.java
Normal file
|
|
@ -0,0 +1,971 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.FriendUpdate}
|
||||||
|
*/
|
||||||
|
public final class FriendUpdate extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.FriendUpdate)
|
||||||
|
FriendUpdateOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use FriendUpdate.newBuilder() to construct.
|
||||||
|
private FriendUpdate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private FriendUpdate() {
|
||||||
|
type_ = 0;
|
||||||
|
username_ = "";
|
||||||
|
friend_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new FriendUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private FriendUpdate(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 8: {
|
||||||
|
int rawValue = input.readEnum();
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
proto.management.FriendUpdate.Type value = proto.management.FriendUpdate.Type.valueOf(rawValue);
|
||||||
|
if (value == null) {
|
||||||
|
unknownFields.mergeVarintField(1, rawValue);
|
||||||
|
} else {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
type_ = rawValue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 26: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_FriendUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_FriendUpdate_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.FriendUpdate.class, proto.management.FriendUpdate.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf enum {@code management.FriendUpdate.Type}
|
||||||
|
*/
|
||||||
|
public enum Type
|
||||||
|
implements com.google.protobuf.ProtocolMessageEnum {
|
||||||
|
/**
|
||||||
|
* <code>ADD = 0;</code>
|
||||||
|
*/
|
||||||
|
ADD(0),
|
||||||
|
/**
|
||||||
|
* <code>REMOVE = 1;</code>
|
||||||
|
*/
|
||||||
|
REMOVE(1),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>ADD = 0;</code>
|
||||||
|
*/
|
||||||
|
public static final int ADD_VALUE = 0;
|
||||||
|
/**
|
||||||
|
* <code>REMOVE = 1;</code>
|
||||||
|
*/
|
||||||
|
public static final int REMOVE_VALUE = 1;
|
||||||
|
|
||||||
|
|
||||||
|
public final int getNumber() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value The numeric wire value of the corresponding enum entry.
|
||||||
|
* @return The enum associated with the given numeric wire value.
|
||||||
|
* @deprecated Use {@link #forNumber(int)} instead.
|
||||||
|
*/
|
||||||
|
@java.lang.Deprecated
|
||||||
|
public static Type valueOf(int value) {
|
||||||
|
return forNumber(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value The numeric wire value of the corresponding enum entry.
|
||||||
|
* @return The enum associated with the given numeric wire value.
|
||||||
|
*/
|
||||||
|
public static Type forNumber(int value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0: return ADD;
|
||||||
|
case 1: return REMOVE;
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static com.google.protobuf.Internal.EnumLiteMap<Type>
|
||||||
|
internalGetValueMap() {
|
||||||
|
return internalValueMap;
|
||||||
|
}
|
||||||
|
private static final com.google.protobuf.Internal.EnumLiteMap<
|
||||||
|
Type> internalValueMap =
|
||||||
|
new com.google.protobuf.Internal.EnumLiteMap<Type>() {
|
||||||
|
public Type findValueByNumber(int number) {
|
||||||
|
return Type.forNumber(number);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||||
|
getValueDescriptor() {
|
||||||
|
return getDescriptor().getValues().get(ordinal());
|
||||||
|
}
|
||||||
|
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return getDescriptor();
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.FriendUpdate.getDescriptor().getEnumTypes().get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Type[] VALUES = values();
|
||||||
|
|
||||||
|
public static Type valueOf(
|
||||||
|
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||||
|
if (desc.getType() != getDescriptor()) {
|
||||||
|
throw new java.lang.IllegalArgumentException(
|
||||||
|
"EnumValueDescriptor is not for this type.");
|
||||||
|
}
|
||||||
|
return VALUES[desc.getIndex()];
|
||||||
|
}
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
|
||||||
|
private Type(int value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(enum_scope:management.FriendUpdate.Type)
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int TYPE_FIELD_NUMBER = 1;
|
||||||
|
private int type_;
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return Whether the type field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override public boolean hasType() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return The type.
|
||||||
|
*/
|
||||||
|
@java.lang.Override public proto.management.FriendUpdate.Type getType() {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
proto.management.FriendUpdate.Type result = proto.management.FriendUpdate.Type.valueOf(type_);
|
||||||
|
return result == null ? proto.management.FriendUpdate.Type.ADD : result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int FRIEND_FIELD_NUMBER = 3;
|
||||||
|
private volatile java.lang.Object friend_;
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return Whether the friend field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasFriend() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The friend.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getFriend() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
friend_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The bytes for friend.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getFriendBytes() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
friend_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasType()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasFriend()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
output.writeEnum(1, type_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, friend_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeEnumSize(1, type_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, friend_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.FriendUpdate)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.FriendUpdate other = (proto.management.FriendUpdate) obj;
|
||||||
|
|
||||||
|
if (hasType() != other.hasType()) return false;
|
||||||
|
if (hasType()) {
|
||||||
|
if (type_ != other.type_) return false;
|
||||||
|
}
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasFriend() != other.hasFriend()) return false;
|
||||||
|
if (hasFriend()) {
|
||||||
|
if (!getFriend()
|
||||||
|
.equals(other.getFriend())) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasType()) {
|
||||||
|
hash = (37 * hash) + TYPE_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + type_;
|
||||||
|
}
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasFriend()) {
|
||||||
|
hash = (37 * hash) + FRIEND_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getFriend().hashCode();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.FriendUpdate parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.FriendUpdate prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.FriendUpdate}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.FriendUpdate)
|
||||||
|
proto.management.FriendUpdateOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_FriendUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_FriendUpdate_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.FriendUpdate.class, proto.management.FriendUpdate.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.FriendUpdate.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
type_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
friend_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_FriendUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.FriendUpdate getDefaultInstanceForType() {
|
||||||
|
return proto.management.FriendUpdate.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.FriendUpdate build() {
|
||||||
|
proto.management.FriendUpdate result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.FriendUpdate buildPartial() {
|
||||||
|
proto.management.FriendUpdate result = new proto.management.FriendUpdate(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.type_ = type_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.friend_ = friend_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.FriendUpdate) {
|
||||||
|
return mergeFrom((proto.management.FriendUpdate)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.FriendUpdate other) {
|
||||||
|
if (other == proto.management.FriendUpdate.getDefaultInstance()) return this;
|
||||||
|
if (other.hasType()) {
|
||||||
|
setType(other.getType());
|
||||||
|
}
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasFriend()) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = other.friend_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasType()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasFriend()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.FriendUpdate parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.FriendUpdate) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private int type_ = 0;
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return Whether the type field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override public boolean hasType() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return The type.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.FriendUpdate.Type getType() {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
proto.management.FriendUpdate.Type result = proto.management.FriendUpdate.Type.valueOf(type_);
|
||||||
|
return result == null ? proto.management.FriendUpdate.Type.ADD : result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @param value The type to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setType(proto.management.FriendUpdate.Type value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
type_ = value.getNumber();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearType() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
type_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object friend_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return Whether the friend field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasFriend() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The friend.
|
||||||
|
*/
|
||||||
|
public java.lang.String getFriend() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
friend_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The bytes for friend.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getFriendBytes() {
|
||||||
|
java.lang.Object ref = friend_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
friend_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @param value The friend to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setFriend(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearFriend() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
friend_ = getDefaultInstance().getFriend();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @param value The bytes for friend to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setFriendBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
friend_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.FriendUpdate)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.FriendUpdate)
|
||||||
|
private static final proto.management.FriendUpdate DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.FriendUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.FriendUpdate getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<FriendUpdate>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<FriendUpdate>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public FriendUpdate parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new FriendUpdate(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<FriendUpdate> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<FriendUpdate> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.FriendUpdate getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface FriendUpdateOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.FriendUpdate)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return Whether the type field is set.
|
||||||
|
*/
|
||||||
|
boolean hasType();
|
||||||
|
/**
|
||||||
|
* <code>required .management.FriendUpdate.Type type = 1;</code>
|
||||||
|
* @return The type.
|
||||||
|
*/
|
||||||
|
proto.management.FriendUpdate.Type getType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 2;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return Whether the friend field is set.
|
||||||
|
*/
|
||||||
|
boolean hasFriend();
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The friend.
|
||||||
|
*/
|
||||||
|
java.lang.String getFriend();
|
||||||
|
/**
|
||||||
|
* <code>required string friend = 3;</code>
|
||||||
|
* @return The bytes for friend.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getFriendBytes();
|
||||||
|
}
|
||||||
769
Server/src/main/java/proto/management/JoinClanRequest.java
Normal file
769
Server/src/main/java/proto/management/JoinClanRequest.java
Normal file
|
|
@ -0,0 +1,769 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.JoinClanRequest}
|
||||||
|
*/
|
||||||
|
public final class JoinClanRequest extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.JoinClanRequest)
|
||||||
|
JoinClanRequestOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use JoinClanRequest.newBuilder() to construct.
|
||||||
|
private JoinClanRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private JoinClanRequest() {
|
||||||
|
username_ = "";
|
||||||
|
clanName_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new JoinClanRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private JoinClanRequest(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_JoinClanRequest_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_JoinClanRequest_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.JoinClanRequest.class, proto.management.JoinClanRequest.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 1;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int CLANNAME_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object clanName_;
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clanName_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clanName_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.JoinClanRequest)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.JoinClanRequest other = (proto.management.JoinClanRequest) obj;
|
||||||
|
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasClanName() != other.hasClanName()) return false;
|
||||||
|
if (hasClanName()) {
|
||||||
|
if (!getClanName()
|
||||||
|
.equals(other.getClanName())) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasClanName()) {
|
||||||
|
hash = (37 * hash) + CLANNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getClanName().hashCode();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.JoinClanRequest parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.JoinClanRequest prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.JoinClanRequest}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.JoinClanRequest)
|
||||||
|
proto.management.JoinClanRequestOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_JoinClanRequest_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_JoinClanRequest_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.JoinClanRequest.class, proto.management.JoinClanRequest.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.JoinClanRequest.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
clanName_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_JoinClanRequest_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.JoinClanRequest getDefaultInstanceForType() {
|
||||||
|
return proto.management.JoinClanRequest.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.JoinClanRequest build() {
|
||||||
|
proto.management.JoinClanRequest result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.JoinClanRequest buildPartial() {
|
||||||
|
proto.management.JoinClanRequest result = new proto.management.JoinClanRequest(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.clanName_ = clanName_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.JoinClanRequest) {
|
||||||
|
return mergeFrom((proto.management.JoinClanRequest)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.JoinClanRequest other) {
|
||||||
|
if (other == proto.management.JoinClanRequest.getDefaultInstance()) return this;
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasClanName()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = other.clanName_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.JoinClanRequest parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.JoinClanRequest) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object clanName_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanName(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearClanName() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
clanName_ = getDefaultInstance().getClanName();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The bytes for clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanNameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.JoinClanRequest)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.JoinClanRequest)
|
||||||
|
private static final proto.management.JoinClanRequest DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.JoinClanRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.JoinClanRequest getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<JoinClanRequest>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<JoinClanRequest>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public JoinClanRequest parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new JoinClanRequest(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<JoinClanRequest> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<JoinClanRequest> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.JoinClanRequest getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface JoinClanRequestOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.JoinClanRequest)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes();
|
||||||
|
}
|
||||||
769
Server/src/main/java/proto/management/LeaveClanRequest.java
Normal file
769
Server/src/main/java/proto/management/LeaveClanRequest.java
Normal file
|
|
@ -0,0 +1,769 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.LeaveClanRequest}
|
||||||
|
*/
|
||||||
|
public final class LeaveClanRequest extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.LeaveClanRequest)
|
||||||
|
LeaveClanRequestOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use LeaveClanRequest.newBuilder() to construct.
|
||||||
|
private LeaveClanRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private LeaveClanRequest() {
|
||||||
|
username_ = "";
|
||||||
|
clanName_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new LeaveClanRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private LeaveClanRequest(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_LeaveClanRequest_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_LeaveClanRequest_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.LeaveClanRequest.class, proto.management.LeaveClanRequest.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 1;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int CLANNAME_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object clanName_;
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clanName_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clanName_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.LeaveClanRequest)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.LeaveClanRequest other = (proto.management.LeaveClanRequest) obj;
|
||||||
|
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasClanName() != other.hasClanName()) return false;
|
||||||
|
if (hasClanName()) {
|
||||||
|
if (!getClanName()
|
||||||
|
.equals(other.getClanName())) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasClanName()) {
|
||||||
|
hash = (37 * hash) + CLANNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getClanName().hashCode();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.LeaveClanRequest parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.LeaveClanRequest prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.LeaveClanRequest}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.LeaveClanRequest)
|
||||||
|
proto.management.LeaveClanRequestOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_LeaveClanRequest_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_LeaveClanRequest_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.LeaveClanRequest.class, proto.management.LeaveClanRequest.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.LeaveClanRequest.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
clanName_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_LeaveClanRequest_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.LeaveClanRequest getDefaultInstanceForType() {
|
||||||
|
return proto.management.LeaveClanRequest.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.LeaveClanRequest build() {
|
||||||
|
proto.management.LeaveClanRequest result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.LeaveClanRequest buildPartial() {
|
||||||
|
proto.management.LeaveClanRequest result = new proto.management.LeaveClanRequest(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.clanName_ = clanName_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.LeaveClanRequest) {
|
||||||
|
return mergeFrom((proto.management.LeaveClanRequest)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.LeaveClanRequest other) {
|
||||||
|
if (other == proto.management.LeaveClanRequest.getDefaultInstance()) return this;
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasClanName()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = other.clanName_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanName()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.LeaveClanRequest parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.LeaveClanRequest) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object clanName_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasClanName() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
public java.lang.String getClanName() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanName_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes() {
|
||||||
|
java.lang.Object ref = clanName_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanName_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanName(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearClanName() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
clanName_ = getDefaultInstance().getClanName();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @param value The bytes for clanName to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanNameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanName_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.LeaveClanRequest)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.LeaveClanRequest)
|
||||||
|
private static final proto.management.LeaveClanRequest DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.LeaveClanRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.LeaveClanRequest getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<LeaveClanRequest>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<LeaveClanRequest>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public LeaveClanRequest parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new LeaveClanRequest(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<LeaveClanRequest> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<LeaveClanRequest> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.LeaveClanRequest getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface LeaveClanRequestOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.LeaveClanRequest)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanName();
|
||||||
|
/**
|
||||||
|
* <code>required string clanName = 2;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes();
|
||||||
|
}
|
||||||
234
Server/src/main/java/proto/management/ManagementProtos.java
Normal file
234
Server/src/main/java/proto/management/ManagementProtos.java
Normal file
|
|
@ -0,0 +1,234 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public final class ManagementProtos {
|
||||||
|
private ManagementProtos() {}
|
||||||
|
public static void registerAllExtensions(
|
||||||
|
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerAllExtensions(
|
||||||
|
com.google.protobuf.ExtensionRegistry registry) {
|
||||||
|
registerAllExtensions(
|
||||||
|
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||||
|
}
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_PlayerStatusUpdate_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_PlayerStatusUpdate_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_ClanMessage_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_ClanMessage_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_PrivateMessage_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_PrivateMessage_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_RequestContactInfo_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_RequestContactInfo_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_SendContactInfo_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_SendContactInfo_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_SendContactInfo_Contact_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_SendContactInfo_Contact_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_FriendUpdate_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_FriendUpdate_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_BlockedUpdate_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_BlockedUpdate_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_RequestClanInfo_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_RequestClanInfo_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_SendClanInfo_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_SendClanInfo_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_SendClanInfo_ClanMember_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_SendClanInfo_ClanMember_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_JoinClanRequest_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_JoinClanRequest_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_LeaveClanRequest_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_LeaveClanRequest_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_ClanJoinNotification_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_ClanJoinNotification_fieldAccessorTable;
|
||||||
|
static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_management_ClanLeaveNotification_descriptor;
|
||||||
|
static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_management_ClanLeaveNotification_fieldAccessorTable;
|
||||||
|
|
||||||
|
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return descriptor;
|
||||||
|
}
|
||||||
|
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||||
|
descriptor;
|
||||||
|
static {
|
||||||
|
java.lang.String[] descriptorData = {
|
||||||
|
"\n\020Management.proto\022\nmanagement\"P\n\022Player" +
|
||||||
|
"StatusUpdate\022\020\n\010username\030\001 \002(\t\022\r\n\005world\030" +
|
||||||
|
"\002 \002(\005\022\031\n\021notifyFriendsOnly\030\003 \002(\010\"N\n\013Clan" +
|
||||||
|
"Message\022\016\n\006sender\030\001 \002(\t\022\020\n\010clanName\030\002 \002(" +
|
||||||
|
"\t\022\017\n\007message\030\003 \002(\t\022\014\n\004rank\030\004 \002(\005\"Q\n\016Priv" +
|
||||||
|
"ateMessage\022\016\n\006sender\030\001 \002(\t\022\020\n\010receiver\030\002" +
|
||||||
|
" \002(\t\022\017\n\007message\030\003 \002(\t\022\014\n\004rank\030\004 \002(\005\"5\n\022R" +
|
||||||
|
"equestContactInfo\022\020\n\010username\030\001 \002(\t\022\r\n\005w" +
|
||||||
|
"orld\030\002 \002(\005\"\245\001\n\017SendContactInfo\022\020\n\010userna" +
|
||||||
|
"me\030\001 \002(\t\0225\n\010contacts\030\002 \003(\0132#.management." +
|
||||||
|
"SendContactInfo.Contact\022\017\n\007blocked\030\003 \003(\t" +
|
||||||
|
"\0328\n\007Contact\022\020\n\010username\030\001 \002(\t\022\r\n\005world\030\002" +
|
||||||
|
" \001(\005\022\014\n\004rank\030\003 \001(\005\"z\n\014FriendUpdate\022+\n\004ty" +
|
||||||
|
"pe\030\001 \002(\0162\035.management.FriendUpdate.Type\022" +
|
||||||
|
"\020\n\010username\030\002 \002(\t\022\016\n\006friend\030\003 \002(\t\"\033\n\004Typ" +
|
||||||
|
"e\022\007\n\003ADD\020\000\022\n\n\006REMOVE\020\001\"|\n\rBlockedUpdate\022" +
|
||||||
|
",\n\004type\030\001 \002(\0162\036.management.BlockedUpdate" +
|
||||||
|
".Type\022\020\n\010username\030\002 \002(\t\022\016\n\006friend\030\003 \002(\t\"" +
|
||||||
|
"\033\n\004Type\022\007\n\003ADD\020\000\022\n\n\006REMOVE\020\001\"3\n\017RequestC" +
|
||||||
|
"lanInfo\022\r\n\005world\030\001 \002(\005\022\021\n\tclanOwner\030\002 \002(" +
|
||||||
|
"\t\"\236\002\n\014SendClanInfo\022\021\n\tclanOwner\030\001 \002(\t\022\017\n" +
|
||||||
|
"\007hasInfo\030\002 \002(\010\022\020\n\010clanName\030\003 \001(\t\022\027\n\017join" +
|
||||||
|
"Requirement\030\004 \001(\005\022\027\n\017kickRequirement\030\005 \001" +
|
||||||
|
"(\005\022\032\n\022messageRequirement\030\006 \001(\005\022\027\n\017lootRe" +
|
||||||
|
"quirement\030\007 \001(\005\0224\n\007members\030\010 \003(\0132#.manag" +
|
||||||
|
"ement.SendClanInfo.ClanMember\032;\n\nClanMem" +
|
||||||
|
"ber\022\020\n\010username\030\001 \002(\t\022\r\n\005world\030\002 \002(\005\022\014\n\004" +
|
||||||
|
"rank\030\003 \002(\005\"5\n\017JoinClanRequest\022\020\n\010usernam" +
|
||||||
|
"e\030\001 \002(\t\022\020\n\010clanName\030\002 \002(\t\"6\n\020LeaveClanRe" +
|
||||||
|
"quest\022\020\n\010username\030\001 \002(\t\022\020\n\010clanName\030\002 \002(" +
|
||||||
|
"\t\"I\n\024ClanJoinNotification\022\020\n\010username\030\001 " +
|
||||||
|
"\002(\t\022\020\n\010clanName\030\002 \002(\t\022\r\n\005world\030\003 \002(\005\"J\n\025" +
|
||||||
|
"ClanLeaveNotification\022\020\n\010username\030\001 \002(\t\022" +
|
||||||
|
"\020\n\010clanName\030\002 \002(\t\022\r\n\005world\030\003 \002(\005B&\n\020prot" +
|
||||||
|
"o.managementB\020ManagementProtosP\001"
|
||||||
|
};
|
||||||
|
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||||
|
.internalBuildGeneratedFileFrom(descriptorData,
|
||||||
|
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||||
|
});
|
||||||
|
internal_static_management_PlayerStatusUpdate_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(0);
|
||||||
|
internal_static_management_PlayerStatusUpdate_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_PlayerStatusUpdate_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "World", "NotifyFriendsOnly", });
|
||||||
|
internal_static_management_ClanMessage_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(1);
|
||||||
|
internal_static_management_ClanMessage_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_ClanMessage_descriptor,
|
||||||
|
new java.lang.String[] { "Sender", "ClanName", "Message", "Rank", });
|
||||||
|
internal_static_management_PrivateMessage_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(2);
|
||||||
|
internal_static_management_PrivateMessage_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_PrivateMessage_descriptor,
|
||||||
|
new java.lang.String[] { "Sender", "Receiver", "Message", "Rank", });
|
||||||
|
internal_static_management_RequestContactInfo_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(3);
|
||||||
|
internal_static_management_RequestContactInfo_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_RequestContactInfo_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "World", });
|
||||||
|
internal_static_management_SendContactInfo_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(4);
|
||||||
|
internal_static_management_SendContactInfo_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_SendContactInfo_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "Contacts", "Blocked", });
|
||||||
|
internal_static_management_SendContactInfo_Contact_descriptor =
|
||||||
|
internal_static_management_SendContactInfo_descriptor.getNestedTypes().get(0);
|
||||||
|
internal_static_management_SendContactInfo_Contact_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_SendContactInfo_Contact_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "World", "Rank", });
|
||||||
|
internal_static_management_FriendUpdate_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(5);
|
||||||
|
internal_static_management_FriendUpdate_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_FriendUpdate_descriptor,
|
||||||
|
new java.lang.String[] { "Type", "Username", "Friend", });
|
||||||
|
internal_static_management_BlockedUpdate_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(6);
|
||||||
|
internal_static_management_BlockedUpdate_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_BlockedUpdate_descriptor,
|
||||||
|
new java.lang.String[] { "Type", "Username", "Friend", });
|
||||||
|
internal_static_management_RequestClanInfo_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(7);
|
||||||
|
internal_static_management_RequestClanInfo_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_RequestClanInfo_descriptor,
|
||||||
|
new java.lang.String[] { "World", "ClanOwner", });
|
||||||
|
internal_static_management_SendClanInfo_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(8);
|
||||||
|
internal_static_management_SendClanInfo_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_SendClanInfo_descriptor,
|
||||||
|
new java.lang.String[] { "ClanOwner", "HasInfo", "ClanName", "JoinRequirement", "KickRequirement", "MessageRequirement", "LootRequirement", "Members", });
|
||||||
|
internal_static_management_SendClanInfo_ClanMember_descriptor =
|
||||||
|
internal_static_management_SendClanInfo_descriptor.getNestedTypes().get(0);
|
||||||
|
internal_static_management_SendClanInfo_ClanMember_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_SendClanInfo_ClanMember_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "World", "Rank", });
|
||||||
|
internal_static_management_JoinClanRequest_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(9);
|
||||||
|
internal_static_management_JoinClanRequest_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_JoinClanRequest_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "ClanName", });
|
||||||
|
internal_static_management_LeaveClanRequest_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(10);
|
||||||
|
internal_static_management_LeaveClanRequest_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_LeaveClanRequest_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "ClanName", });
|
||||||
|
internal_static_management_ClanJoinNotification_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(11);
|
||||||
|
internal_static_management_ClanJoinNotification_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_ClanJoinNotification_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "ClanName", "World", });
|
||||||
|
internal_static_management_ClanLeaveNotification_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(12);
|
||||||
|
internal_static_management_ClanLeaveNotification_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_management_ClanLeaveNotification_descriptor,
|
||||||
|
new java.lang.String[] { "Username", "ClanName", "World", });
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(outer_class_scope)
|
||||||
|
}
|
||||||
788
Server/src/main/java/proto/management/PlayerStatusUpdate.java
Normal file
788
Server/src/main/java/proto/management/PlayerStatusUpdate.java
Normal file
|
|
@ -0,0 +1,788 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.PlayerStatusUpdate}
|
||||||
|
*/
|
||||||
|
public final class PlayerStatusUpdate extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.PlayerStatusUpdate)
|
||||||
|
PlayerStatusUpdateOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use PlayerStatusUpdate.newBuilder() to construct.
|
||||||
|
private PlayerStatusUpdate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private PlayerStatusUpdate() {
|
||||||
|
username_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new PlayerStatusUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private PlayerStatusUpdate(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
world_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
notifyFriendsOnly_ = input.readBool();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_PlayerStatusUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_PlayerStatusUpdate_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.PlayerStatusUpdate.class, proto.management.PlayerStatusUpdate.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 1;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int WORLD_FIELD_NUMBER = 2;
|
||||||
|
private int world_;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int NOTIFYFRIENDSONLY_FIELD_NUMBER = 3;
|
||||||
|
private boolean notifyFriendsOnly_;
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return Whether the notifyFriendsOnly field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasNotifyFriendsOnly() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return The notifyFriendsOnly.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean getNotifyFriendsOnly() {
|
||||||
|
return notifyFriendsOnly_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasNotifyFriendsOnly()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
output.writeInt32(2, world_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
output.writeBool(3, notifyFriendsOnly_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(2, world_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeBoolSize(3, notifyFriendsOnly_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.PlayerStatusUpdate)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.PlayerStatusUpdate other = (proto.management.PlayerStatusUpdate) obj;
|
||||||
|
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasWorld() != other.hasWorld()) return false;
|
||||||
|
if (hasWorld()) {
|
||||||
|
if (getWorld()
|
||||||
|
!= other.getWorld()) return false;
|
||||||
|
}
|
||||||
|
if (hasNotifyFriendsOnly() != other.hasNotifyFriendsOnly()) return false;
|
||||||
|
if (hasNotifyFriendsOnly()) {
|
||||||
|
if (getNotifyFriendsOnly()
|
||||||
|
!= other.getNotifyFriendsOnly()) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasWorld()) {
|
||||||
|
hash = (37 * hash) + WORLD_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getWorld();
|
||||||
|
}
|
||||||
|
if (hasNotifyFriendsOnly()) {
|
||||||
|
hash = (37 * hash) + NOTIFYFRIENDSONLY_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
|
||||||
|
getNotifyFriendsOnly());
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.PlayerStatusUpdate parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.PlayerStatusUpdate prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.PlayerStatusUpdate}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.PlayerStatusUpdate)
|
||||||
|
proto.management.PlayerStatusUpdateOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_PlayerStatusUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_PlayerStatusUpdate_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.PlayerStatusUpdate.class, proto.management.PlayerStatusUpdate.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.PlayerStatusUpdate.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
world_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
notifyFriendsOnly_ = false;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_PlayerStatusUpdate_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.PlayerStatusUpdate getDefaultInstanceForType() {
|
||||||
|
return proto.management.PlayerStatusUpdate.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.PlayerStatusUpdate build() {
|
||||||
|
proto.management.PlayerStatusUpdate result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.PlayerStatusUpdate buildPartial() {
|
||||||
|
proto.management.PlayerStatusUpdate result = new proto.management.PlayerStatusUpdate(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
result.world_ = world_;
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||||
|
result.notifyFriendsOnly_ = notifyFriendsOnly_;
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.PlayerStatusUpdate) {
|
||||||
|
return mergeFrom((proto.management.PlayerStatusUpdate)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.PlayerStatusUpdate other) {
|
||||||
|
if (other == proto.management.PlayerStatusUpdate.getDefaultInstance()) return this;
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasWorld()) {
|
||||||
|
setWorld(other.getWorld());
|
||||||
|
}
|
||||||
|
if (other.hasNotifyFriendsOnly()) {
|
||||||
|
setNotifyFriendsOnly(other.getNotifyFriendsOnly());
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasNotifyFriendsOnly()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.PlayerStatusUpdate parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.PlayerStatusUpdate) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int world_ ;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @param value The world to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setWorld(int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
world_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearWorld() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
world_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean notifyFriendsOnly_ ;
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return Whether the notifyFriendsOnly field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasNotifyFriendsOnly() {
|
||||||
|
return ((bitField0_ & 0x00000004) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return The notifyFriendsOnly.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean getNotifyFriendsOnly() {
|
||||||
|
return notifyFriendsOnly_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @param value The notifyFriendsOnly to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setNotifyFriendsOnly(boolean value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
notifyFriendsOnly_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearNotifyFriendsOnly() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
notifyFriendsOnly_ = false;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.PlayerStatusUpdate)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.PlayerStatusUpdate)
|
||||||
|
private static final proto.management.PlayerStatusUpdate DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.PlayerStatusUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.PlayerStatusUpdate getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<PlayerStatusUpdate>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<PlayerStatusUpdate>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public PlayerStatusUpdate parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new PlayerStatusUpdate(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<PlayerStatusUpdate> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<PlayerStatusUpdate> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.PlayerStatusUpdate getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface PlayerStatusUpdateOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.PlayerStatusUpdate)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
boolean hasWorld();
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
int getWorld();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return Whether the notifyFriendsOnly field is set.
|
||||||
|
*/
|
||||||
|
boolean hasNotifyFriendsOnly();
|
||||||
|
/**
|
||||||
|
* <code>required bool notifyFriendsOnly = 3;</code>
|
||||||
|
* @return The notifyFriendsOnly.
|
||||||
|
*/
|
||||||
|
boolean getNotifyFriendsOnly();
|
||||||
|
}
|
||||||
1036
Server/src/main/java/proto/management/PrivateMessage.java
Normal file
1036
Server/src/main/java/proto/management/PrivateMessage.java
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,71 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface PrivateMessageOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.PrivateMessage)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string sender = 1;</code>
|
||||||
|
* @return Whether the sender field is set.
|
||||||
|
*/
|
||||||
|
boolean hasSender();
|
||||||
|
/**
|
||||||
|
* <code>required string sender = 1;</code>
|
||||||
|
* @return The sender.
|
||||||
|
*/
|
||||||
|
java.lang.String getSender();
|
||||||
|
/**
|
||||||
|
* <code>required string sender = 1;</code>
|
||||||
|
* @return The bytes for sender.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getSenderBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string receiver = 2;</code>
|
||||||
|
* @return Whether the receiver field is set.
|
||||||
|
*/
|
||||||
|
boolean hasReceiver();
|
||||||
|
/**
|
||||||
|
* <code>required string receiver = 2;</code>
|
||||||
|
* @return The receiver.
|
||||||
|
*/
|
||||||
|
java.lang.String getReceiver();
|
||||||
|
/**
|
||||||
|
* <code>required string receiver = 2;</code>
|
||||||
|
* @return The bytes for receiver.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getReceiverBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string message = 3;</code>
|
||||||
|
* @return Whether the message field is set.
|
||||||
|
*/
|
||||||
|
boolean hasMessage();
|
||||||
|
/**
|
||||||
|
* <code>required string message = 3;</code>
|
||||||
|
* @return The message.
|
||||||
|
*/
|
||||||
|
java.lang.String getMessage();
|
||||||
|
/**
|
||||||
|
* <code>required string message = 3;</code>
|
||||||
|
* @return The bytes for message.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getMessageBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 rank = 4;</code>
|
||||||
|
* @return Whether the rank field is set.
|
||||||
|
*/
|
||||||
|
boolean hasRank();
|
||||||
|
/**
|
||||||
|
* <code>required int32 rank = 4;</code>
|
||||||
|
* @return The rank.
|
||||||
|
*/
|
||||||
|
int getRank();
|
||||||
|
}
|
||||||
692
Server/src/main/java/proto/management/RequestClanInfo.java
Normal file
692
Server/src/main/java/proto/management/RequestClanInfo.java
Normal file
|
|
@ -0,0 +1,692 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.RequestClanInfo}
|
||||||
|
*/
|
||||||
|
public final class RequestClanInfo extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.RequestClanInfo)
|
||||||
|
RequestClanInfoOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use RequestClanInfo.newBuilder() to construct.
|
||||||
|
private RequestClanInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private RequestClanInfo() {
|
||||||
|
clanOwner_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new RequestClanInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private RequestClanInfo(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 8: {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
world_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanOwner_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestClanInfo_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestClanInfo_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.RequestClanInfo.class, proto.management.RequestClanInfo.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int WORLD_FIELD_NUMBER = 1;
|
||||||
|
private int world_;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int CLANOWNER_FIELD_NUMBER = 2;
|
||||||
|
private volatile java.lang.Object clanOwner_;
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return Whether the clanOwner field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasClanOwner() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return The clanOwner.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getClanOwner() {
|
||||||
|
java.lang.Object ref = clanOwner_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanOwner_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return The bytes for clanOwner.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanOwnerBytes() {
|
||||||
|
java.lang.Object ref = clanOwner_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanOwner_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasWorld()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanOwner()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
output.writeInt32(1, world_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clanOwner_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(1, world_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clanOwner_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.RequestClanInfo)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.RequestClanInfo other = (proto.management.RequestClanInfo) obj;
|
||||||
|
|
||||||
|
if (hasWorld() != other.hasWorld()) return false;
|
||||||
|
if (hasWorld()) {
|
||||||
|
if (getWorld()
|
||||||
|
!= other.getWorld()) return false;
|
||||||
|
}
|
||||||
|
if (hasClanOwner() != other.hasClanOwner()) return false;
|
||||||
|
if (hasClanOwner()) {
|
||||||
|
if (!getClanOwner()
|
||||||
|
.equals(other.getClanOwner())) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasWorld()) {
|
||||||
|
hash = (37 * hash) + WORLD_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getWorld();
|
||||||
|
}
|
||||||
|
if (hasClanOwner()) {
|
||||||
|
hash = (37 * hash) + CLANOWNER_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getClanOwner().hashCode();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestClanInfo parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.RequestClanInfo prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.RequestClanInfo}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.RequestClanInfo)
|
||||||
|
proto.management.RequestClanInfoOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestClanInfo_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestClanInfo_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.RequestClanInfo.class, proto.management.RequestClanInfo.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.RequestClanInfo.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
world_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
clanOwner_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestClanInfo_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestClanInfo getDefaultInstanceForType() {
|
||||||
|
return proto.management.RequestClanInfo.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestClanInfo build() {
|
||||||
|
proto.management.RequestClanInfo result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestClanInfo buildPartial() {
|
||||||
|
proto.management.RequestClanInfo result = new proto.management.RequestClanInfo(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
result.world_ = world_;
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.clanOwner_ = clanOwner_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.RequestClanInfo) {
|
||||||
|
return mergeFrom((proto.management.RequestClanInfo)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.RequestClanInfo other) {
|
||||||
|
if (other == proto.management.RequestClanInfo.getDefaultInstance()) return this;
|
||||||
|
if (other.hasWorld()) {
|
||||||
|
setWorld(other.getWorld());
|
||||||
|
}
|
||||||
|
if (other.hasClanOwner()) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanOwner_ = other.clanOwner_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasClanOwner()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.RequestClanInfo parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.RequestClanInfo) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private int world_ ;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @param value The world to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setWorld(int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
world_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearWorld() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
world_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.lang.Object clanOwner_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return Whether the clanOwner field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasClanOwner() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return The clanOwner.
|
||||||
|
*/
|
||||||
|
public java.lang.String getClanOwner() {
|
||||||
|
java.lang.Object ref = clanOwner_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
clanOwner_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return The bytes for clanOwner.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getClanOwnerBytes() {
|
||||||
|
java.lang.Object ref = clanOwner_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
clanOwner_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @param value The clanOwner to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanOwner(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanOwner_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearClanOwner() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
clanOwner_ = getDefaultInstance().getClanOwner();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @param value The bytes for clanOwner to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setClanOwnerBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
clanOwner_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.RequestClanInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.RequestClanInfo)
|
||||||
|
private static final proto.management.RequestClanInfo DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.RequestClanInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.RequestClanInfo getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<RequestClanInfo>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<RequestClanInfo>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public RequestClanInfo parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new RequestClanInfo(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<RequestClanInfo> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<RequestClanInfo> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestClanInfo getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface RequestClanInfoOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.RequestClanInfo)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
boolean hasWorld();
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 1;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
int getWorld();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return Whether the clanOwner field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanOwner();
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return The clanOwner.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanOwner();
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 2;</code>
|
||||||
|
* @return The bytes for clanOwner.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanOwnerBytes();
|
||||||
|
}
|
||||||
692
Server/src/main/java/proto/management/RequestContactInfo.java
Normal file
692
Server/src/main/java/proto/management/RequestContactInfo.java
Normal file
|
|
@ -0,0 +1,692 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.RequestContactInfo}
|
||||||
|
*/
|
||||||
|
public final class RequestContactInfo extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:management.RequestContactInfo)
|
||||||
|
RequestContactInfoOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use RequestContactInfo.newBuilder() to construct.
|
||||||
|
private RequestContactInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private RequestContactInfo() {
|
||||||
|
username_ = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new RequestContactInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final com.google.protobuf.UnknownFieldSet
|
||||||
|
getUnknownFields() {
|
||||||
|
return this.unknownFields;
|
||||||
|
}
|
||||||
|
private RequestContactInfo(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
this();
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||||
|
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
com.google.protobuf.ByteString bs = input.readBytes();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = bs;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
world_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(
|
||||||
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
|
e).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
this.unknownFields = unknownFields.build();
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestContactInfo_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestContactInfo_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.RequestContactInfo.class, proto.management.RequestContactInfo.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int USERNAME_FIELD_NUMBER = 1;
|
||||||
|
private volatile java.lang.Object username_;
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int WORLD_FIELD_NUMBER = 2;
|
||||||
|
private int world_;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasUsername()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
output.writeInt32(2, world_);
|
||||||
|
}
|
||||||
|
unknownFields.writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) != 0)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) != 0)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(2, world_);
|
||||||
|
}
|
||||||
|
size += unknownFields.getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof proto.management.RequestContactInfo)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
proto.management.RequestContactInfo other = (proto.management.RequestContactInfo) obj;
|
||||||
|
|
||||||
|
if (hasUsername() != other.hasUsername()) return false;
|
||||||
|
if (hasUsername()) {
|
||||||
|
if (!getUsername()
|
||||||
|
.equals(other.getUsername())) return false;
|
||||||
|
}
|
||||||
|
if (hasWorld() != other.hasWorld()) return false;
|
||||||
|
if (hasWorld()) {
|
||||||
|
if (getWorld()
|
||||||
|
!= other.getWorld()) return false;
|
||||||
|
}
|
||||||
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
if (hasUsername()) {
|
||||||
|
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getUsername().hashCode();
|
||||||
|
}
|
||||||
|
if (hasWorld()) {
|
||||||
|
hash = (37 * hash) + WORLD_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getWorld();
|
||||||
|
}
|
||||||
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static proto.management.RequestContactInfo parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(proto.management.RequestContactInfo prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code management.RequestContactInfo}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:management.RequestContactInfo)
|
||||||
|
proto.management.RequestContactInfoOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestContactInfo_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestContactInfo_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
proto.management.RequestContactInfo.class, proto.management.RequestContactInfo.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using proto.management.RequestContactInfo.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
if (com.google.protobuf.GeneratedMessageV3
|
||||||
|
.alwaysUseFieldBuilders) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
username_ = "";
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
world_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return proto.management.ManagementProtos.internal_static_management_RequestContactInfo_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestContactInfo getDefaultInstanceForType() {
|
||||||
|
return proto.management.RequestContactInfo.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestContactInfo build() {
|
||||||
|
proto.management.RequestContactInfo result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestContactInfo buildPartial() {
|
||||||
|
proto.management.RequestContactInfo result = new proto.management.RequestContactInfo(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.username_ = username_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
result.world_ = world_;
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clone() {
|
||||||
|
return super.clone();
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.setField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||||
|
return super.clearField(field);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clearOneof(
|
||||||
|
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||||
|
return super.clearOneof(oneof);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder setRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
int index, java.lang.Object value) {
|
||||||
|
return super.setRepeatedField(field, index, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder addRepeatedField(
|
||||||
|
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||||
|
java.lang.Object value) {
|
||||||
|
return super.addRepeatedField(field, value);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof proto.management.RequestContactInfo) {
|
||||||
|
return mergeFrom((proto.management.RequestContactInfo)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(proto.management.RequestContactInfo other) {
|
||||||
|
if (other == proto.management.RequestContactInfo.getDefaultInstance()) return this;
|
||||||
|
if (other.hasUsername()) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = other.username_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
|
if (other.hasWorld()) {
|
||||||
|
setWorld(other.getWorld());
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasUsername()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasWorld()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
proto.management.RequestContactInfo parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (proto.management.RequestContactInfo) e.getUnfinishedMessage();
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.lang.Object username_ = "";
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
public boolean hasUsername() {
|
||||||
|
return ((bitField0_ & 0x00000001) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
public java.lang.String getUsername() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
if (bs.isValidUtf8()) {
|
||||||
|
username_ = s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes() {
|
||||||
|
java.lang.Object ref = username_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
username_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsername(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearUsername() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
username_ = getDefaultInstance().getUsername();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @param value The bytes for username to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setUsernameBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
username_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int world_ ;
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean hasWorld() {
|
||||||
|
return ((bitField0_ & 0x00000002) != 0);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getWorld() {
|
||||||
|
return world_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @param value The world to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setWorld(int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
world_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearWorld() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
world_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:management.RequestContactInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:management.RequestContactInfo)
|
||||||
|
private static final proto.management.RequestContactInfo DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new proto.management.RequestContactInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static proto.management.RequestContactInfo getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Deprecated public static final com.google.protobuf.Parser<RequestContactInfo>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<RequestContactInfo>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public RequestContactInfo parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new RequestContactInfo(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<RequestContactInfo> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<RequestContactInfo> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public proto.management.RequestContactInfo getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface RequestContactInfoOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.RequestContactInfo)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return Whether the world field is set.
|
||||||
|
*/
|
||||||
|
boolean hasWorld();
|
||||||
|
/**
|
||||||
|
* <code>required int32 world = 2;</code>
|
||||||
|
* @return The world.
|
||||||
|
*/
|
||||||
|
int getWorld();
|
||||||
|
}
|
||||||
2394
Server/src/main/java/proto/management/SendClanInfo.java
Normal file
2394
Server/src/main/java/proto/management/SendClanInfo.java
Normal file
File diff suppressed because it is too large
Load diff
122
Server/src/main/java/proto/management/SendClanInfoOrBuilder.java
Normal file
122
Server/src/main/java/proto/management/SendClanInfoOrBuilder.java
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface SendClanInfoOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.SendClanInfo)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 1;</code>
|
||||||
|
* @return Whether the clanOwner field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanOwner();
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 1;</code>
|
||||||
|
* @return The clanOwner.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanOwner();
|
||||||
|
/**
|
||||||
|
* <code>required string clanOwner = 1;</code>
|
||||||
|
* @return The bytes for clanOwner.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanOwnerBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required bool hasInfo = 2;</code>
|
||||||
|
* @return Whether the hasInfo field is set.
|
||||||
|
*/
|
||||||
|
boolean hasHasInfo();
|
||||||
|
/**
|
||||||
|
* <code>required bool hasInfo = 2;</code>
|
||||||
|
* @return The hasInfo.
|
||||||
|
*/
|
||||||
|
boolean getHasInfo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional string clanName = 3;</code>
|
||||||
|
* @return Whether the clanName field is set.
|
||||||
|
*/
|
||||||
|
boolean hasClanName();
|
||||||
|
/**
|
||||||
|
* <code>optional string clanName = 3;</code>
|
||||||
|
* @return The clanName.
|
||||||
|
*/
|
||||||
|
java.lang.String getClanName();
|
||||||
|
/**
|
||||||
|
* <code>optional string clanName = 3;</code>
|
||||||
|
* @return The bytes for clanName.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getClanNameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int32 joinRequirement = 4;</code>
|
||||||
|
* @return Whether the joinRequirement field is set.
|
||||||
|
*/
|
||||||
|
boolean hasJoinRequirement();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 joinRequirement = 4;</code>
|
||||||
|
* @return The joinRequirement.
|
||||||
|
*/
|
||||||
|
int getJoinRequirement();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int32 kickRequirement = 5;</code>
|
||||||
|
* @return Whether the kickRequirement field is set.
|
||||||
|
*/
|
||||||
|
boolean hasKickRequirement();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 kickRequirement = 5;</code>
|
||||||
|
* @return The kickRequirement.
|
||||||
|
*/
|
||||||
|
int getKickRequirement();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int32 messageRequirement = 6;</code>
|
||||||
|
* @return Whether the messageRequirement field is set.
|
||||||
|
*/
|
||||||
|
boolean hasMessageRequirement();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 messageRequirement = 6;</code>
|
||||||
|
* @return The messageRequirement.
|
||||||
|
*/
|
||||||
|
int getMessageRequirement();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int32 lootRequirement = 7;</code>
|
||||||
|
* @return Whether the lootRequirement field is set.
|
||||||
|
*/
|
||||||
|
boolean hasLootRequirement();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 lootRequirement = 7;</code>
|
||||||
|
* @return The lootRequirement.
|
||||||
|
*/
|
||||||
|
int getLootRequirement();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendClanInfo.ClanMember members = 8;</code>
|
||||||
|
*/
|
||||||
|
java.util.List<proto.management.SendClanInfo.ClanMember>
|
||||||
|
getMembersList();
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendClanInfo.ClanMember members = 8;</code>
|
||||||
|
*/
|
||||||
|
proto.management.SendClanInfo.ClanMember getMembers(int index);
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendClanInfo.ClanMember members = 8;</code>
|
||||||
|
*/
|
||||||
|
int getMembersCount();
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendClanInfo.ClanMember members = 8;</code>
|
||||||
|
*/
|
||||||
|
java.util.List<? extends proto.management.SendClanInfo.ClanMemberOrBuilder>
|
||||||
|
getMembersOrBuilderList();
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendClanInfo.ClanMember members = 8;</code>
|
||||||
|
*/
|
||||||
|
proto.management.SendClanInfo.ClanMemberOrBuilder getMembersOrBuilder(
|
||||||
|
int index);
|
||||||
|
}
|
||||||
1958
Server/src/main/java/proto/management/SendContactInfo.java
Normal file
1958
Server/src/main/java/proto/management/SendContactInfo.java
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,75 @@
|
||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: Management.proto
|
||||||
|
|
||||||
|
package proto.management;
|
||||||
|
|
||||||
|
public interface SendContactInfoOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:management.SendContactInfo)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return Whether the username field is set.
|
||||||
|
*/
|
||||||
|
boolean hasUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The username.
|
||||||
|
*/
|
||||||
|
java.lang.String getUsername();
|
||||||
|
/**
|
||||||
|
* <code>required string username = 1;</code>
|
||||||
|
* @return The bytes for username.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getUsernameBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendContactInfo.Contact contacts = 2;</code>
|
||||||
|
*/
|
||||||
|
java.util.List<proto.management.SendContactInfo.Contact>
|
||||||
|
getContactsList();
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendContactInfo.Contact contacts = 2;</code>
|
||||||
|
*/
|
||||||
|
proto.management.SendContactInfo.Contact getContacts(int index);
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendContactInfo.Contact contacts = 2;</code>
|
||||||
|
*/
|
||||||
|
int getContactsCount();
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendContactInfo.Contact contacts = 2;</code>
|
||||||
|
*/
|
||||||
|
java.util.List<? extends proto.management.SendContactInfo.ContactOrBuilder>
|
||||||
|
getContactsOrBuilderList();
|
||||||
|
/**
|
||||||
|
* <code>repeated .management.SendContactInfo.Contact contacts = 2;</code>
|
||||||
|
*/
|
||||||
|
proto.management.SendContactInfo.ContactOrBuilder getContactsOrBuilder(
|
||||||
|
int index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated string blocked = 3;</code>
|
||||||
|
* @return A list containing the blocked.
|
||||||
|
*/
|
||||||
|
java.util.List<java.lang.String>
|
||||||
|
getBlockedList();
|
||||||
|
/**
|
||||||
|
* <code>repeated string blocked = 3;</code>
|
||||||
|
* @return The count of blocked.
|
||||||
|
*/
|
||||||
|
int getBlockedCount();
|
||||||
|
/**
|
||||||
|
* <code>repeated string blocked = 3;</code>
|
||||||
|
* @param index The index of the element to return.
|
||||||
|
* @return The blocked at the given index.
|
||||||
|
*/
|
||||||
|
java.lang.String getBlocked(int index);
|
||||||
|
/**
|
||||||
|
* <code>repeated string blocked = 3;</code>
|
||||||
|
* @param index The index of the value to return.
|
||||||
|
* @return The bytes of the blocked at the given index.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getBlockedBytes(int index);
|
||||||
|
}
|
||||||
|
|
@ -78,7 +78,7 @@ object Server {
|
||||||
SystemLogger.logErr("Port " + (43594 + GameWorld.settings?.worldId!!) + " is already in use!")
|
SystemLogger.logErr("Port " + (43594 + GameWorld.settings?.worldId!!) + " is already in use!")
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
WorldCommunicator.connect()
|
//WorldCommunicator.connect()
|
||||||
SystemLogger.logInfo(GameWorld.settings?.name + " flags " + GameWorld.settings?.toString())
|
SystemLogger.logInfo(GameWorld.settings?.name + " flags " + GameWorld.settings?.toString())
|
||||||
SystemLogger.logInfo(GameWorld.settings?.name + " started in " + t.duration(false, "") + " milliseconds.")
|
SystemLogger.logInfo(GameWorld.settings?.name + " started in " + t.duration(false, "") + " milliseconds.")
|
||||||
val scanner = Scanner(System.`in`)
|
val scanner = Scanner(System.`in`)
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ class WorkForInteractionListener : InteractionListener, LoginListener {
|
||||||
if(entity !is Player) return
|
if(entity !is Player) return
|
||||||
|
|
||||||
val job = getAttribute(entity, "jobs:id", -1)
|
val job = getAttribute(entity, "jobs:id", -1)
|
||||||
|
if (job !in 0 until SlayingJob.values().size) return
|
||||||
val ids = SlayingJob.values()[job].ids
|
val ids = SlayingJob.values()[job].ids
|
||||||
|
|
||||||
if(event.npc.id in ids){
|
if(event.npc.id in ids){
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,6 @@ class TutorialMagicTutorDialogue(player: Player? = null) : DialoguePlugin(player
|
||||||
"at any time, look for a signpost or use the Lumbridge Home Port Spell."
|
"at any time, look for a signpost or use the Lumbridge Home Port Spell."
|
||||||
)
|
)
|
||||||
stage = 12
|
stage = 12
|
||||||
if(WorldCommunicator.isEnabled())
|
|
||||||
MSPacketRepository.sendInfoUpdate(player)
|
|
||||||
TutorialStage.removeHintIcon(player)
|
TutorialStage.removeHintIcon(player)
|
||||||
|
|
||||||
player.unhook(TutorialKillReceiver)
|
player.unhook(TutorialKillReceiver)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ interface InteractionListener : ContentInterface{
|
||||||
val GROUNDITEM: Int
|
val GROUNDITEM: Int
|
||||||
get() = 3
|
get() = 3
|
||||||
|
|
||||||
fun on(id: Int, type: Int, vararg option: String,handler: (player: Player, node: Node) -> Boolean){
|
fun on(id: Int, type: Int, vararg option: String, handler: (player: Player, node: Node) -> Boolean){
|
||||||
InteractionListeners.add(id,type,option,handler)
|
InteractionListeners.add(id,type,option,handler)
|
||||||
}
|
}
|
||||||
fun on(ids: IntArray, type: Int, vararg option: String, handler: (player: Player, node: Node) -> Boolean){
|
fun on(ids: IntArray, type: Int, vararg option: String, handler: (player: Player, node: Node) -> Boolean){
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,13 @@ import core.game.node.entity.skill.Skills
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import core.game.world.update.flag.context.ChatMessage
|
import core.game.world.update.flag.context.ChatMessage
|
||||||
import core.game.world.update.flag.player.ChatFlag
|
import core.game.world.update.flag.player.ChatFlag
|
||||||
import core.net.amsc.MSPacketRepository
|
import proto.management.ClanMessage
|
||||||
import core.net.amsc.WorldCommunicator
|
|
||||||
import rs09.game.node.entity.skill.slayer.SlayerManager
|
import rs09.game.node.entity.skill.slayer.SlayerManager
|
||||||
import rs09.game.world.GameWorld.Pulser
|
import rs09.game.world.GameWorld.Pulser
|
||||||
import rs09.net.packet.`in`.QCPacketType
|
import rs09.net.packet.`in`.QCPacketType
|
||||||
|
import rs09.worker.ManagementEvents.publish
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,11 +42,11 @@ object QCRepository {
|
||||||
|
|
||||||
|
|
||||||
if(forClan) {
|
if(forClan) {
|
||||||
if (WorldCommunicator.isEnabled()) {
|
val builder = ClanMessage.newBuilder()
|
||||||
MSPacketRepository.sendClanMessage(player, qcString)
|
builder.sender = player!!.name
|
||||||
} else {
|
builder.clanName = player.communication.clan.owner.lowercase(Locale.getDefault()).replace(" ", "_")
|
||||||
player?.communication?.clan?.message(player, qcString)
|
builder.message = qcString
|
||||||
}
|
publish(builder.build())
|
||||||
} else {
|
} else {
|
||||||
val ctx = ChatMessage(player, qcString, 0, qcString.length)
|
val ctx = ChatMessage(player, qcString, 0, qcString.length)
|
||||||
ctx.isQuickChat = true
|
ctx.isQuickChat = true
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ class LoginParser(val details: PlayerDetails, private val type: LoginType) {
|
||||||
Repository.LOGGED_IN_PLAYERS.remove(player.username)
|
Repository.LOGGED_IN_PLAYERS.remove(player.username)
|
||||||
Repository.lobbyPlayers.remove(player)
|
Repository.lobbyPlayers.remove(player)
|
||||||
Repository.playerNames.remove(player.name)
|
Repository.playerNames.remove(player.name)
|
||||||
MSPacketRepository.sendPlayerRemoval(player.name)
|
|
||||||
flag(AuthResponse.ErrorLoadingProfile)
|
flag(AuthResponse.ErrorLoadingProfile)
|
||||||
}
|
}
|
||||||
//Repository.getPlayerNames().put(player.getName(), player);
|
//Repository.getPlayerNames().put(player.getName(), player);
|
||||||
|
|
@ -63,16 +62,6 @@ class LoginParser(val details: PlayerDetails, private val type: LoginType) {
|
||||||
override fun pulse(): Boolean {
|
override fun pulse(): Boolean {
|
||||||
try {
|
try {
|
||||||
if (details.session.isActive) {
|
if (details.session.isActive) {
|
||||||
val p = Repository.getPlayerByName(player.name)
|
|
||||||
if (p != null) {
|
|
||||||
p.clear()
|
|
||||||
Repository.playerNames.remove(p.name)
|
|
||||||
Repository.lobbyPlayers.remove(p)
|
|
||||||
Repository.removePlayer(p)
|
|
||||||
}
|
|
||||||
if (!Repository.players.contains(player)) {
|
|
||||||
Repository.addPlayer(player)
|
|
||||||
}
|
|
||||||
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
||||||
parser.runContentHooks() //Run our saved-content-parsing hooks
|
parser.runContentHooks() //Run our saved-content-parsing hooks
|
||||||
player.details.session.setObject(player)
|
player.details.session.setObject(player)
|
||||||
|
|
@ -83,7 +72,6 @@ class LoginParser(val details: PlayerDetails, private val type: LoginType) {
|
||||||
player.monitor.log(player.details.macAddress, PlayerMonitor.ADDRESS_LOG)
|
player.monitor.log(player.details.macAddress, PlayerMonitor.ADDRESS_LOG)
|
||||||
} else {
|
} else {
|
||||||
Repository.playerNames.remove(player.name)
|
Repository.playerNames.remove(player.name)
|
||||||
MSPacketRepository.sendPlayerRemoval(player.name)
|
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
t.printStackTrace()
|
t.printStackTrace()
|
||||||
|
|
@ -91,7 +79,6 @@ class LoginParser(val details: PlayerDetails, private val type: LoginType) {
|
||||||
Repository.LOGGED_IN_PLAYERS.remove(player.username)
|
Repository.LOGGED_IN_PLAYERS.remove(player.username)
|
||||||
Repository.lobbyPlayers.remove(player)
|
Repository.lobbyPlayers.remove(player)
|
||||||
Repository.playerNames.remove(player.name)
|
Repository.playerNames.remove(player.name)
|
||||||
MSPacketRepository.sendPlayerRemoval(player.name)
|
|
||||||
flag(AuthResponse.ErrorLoadingProfile)
|
flag(AuthResponse.ErrorLoadingProfile)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
@ -112,15 +99,9 @@ class LoginParser(val details: PlayerDetails, private val type: LoginType) {
|
||||||
player.updateSceneGraph(true)
|
player.updateSceneGraph(true)
|
||||||
player.configManager.init()
|
player.configManager.init()
|
||||||
LoginConfiguration.configureGameWorld(player)
|
LoginConfiguration.configureGameWorld(player)
|
||||||
Repository.playerNames[player.name] = player
|
|
||||||
GameWorld.Pulser.submit(object : Pulse(1) {
|
|
||||||
override fun pulse(): Boolean {
|
|
||||||
if (!Repository.players.contains(player)) {
|
if (!Repository.players.contains(player)) {
|
||||||
Repository.addPlayer(player)
|
Repository.addPlayer(player)
|
||||||
}
|
}
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -128,18 +109,12 @@ class LoginParser(val details: PlayerDetails, private val type: LoginType) {
|
||||||
* @return `True` if the request is valid.
|
* @return `True` if the request is valid.
|
||||||
*/
|
*/
|
||||||
private fun validateRequest(): Boolean {
|
private fun validateRequest(): Boolean {
|
||||||
if (WorldCommunicator.getState() == ManagementServerState.CONNECTING) {
|
|
||||||
return flag(AuthResponse.LoginServerOffline)
|
|
||||||
}
|
|
||||||
if (!details.session.isActive) {
|
if (!details.session.isActive) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (SystemManager.isUpdating()) {
|
if (SystemManager.isUpdating()) {
|
||||||
return flag(AuthResponse.Updating)
|
return flag(AuthResponse.Updating)
|
||||||
}
|
}
|
||||||
if (Repository.getPlayerByName(details.username).also { gamePlayer = it } != null && gamePlayer!!.session.isActive) {
|
|
||||||
return flag(AuthResponse.AlreadyOnline)
|
|
||||||
}
|
|
||||||
return if (details.isBanned) {
|
return if (details.isBanned) {
|
||||||
flag(AuthResponse.AccountDisabled)
|
flag(AuthResponse.AccountDisabled)
|
||||||
} else true
|
} else true
|
||||||
|
|
|
||||||
|
|
@ -114,4 +114,8 @@ object SystemLogger {
|
||||||
{
|
{
|
||||||
SystemLogger.logInfo("[SHUTDOWN] $message")
|
SystemLogger.logInfo("[SHUTDOWN] $message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun logMS(s: String) {
|
||||||
|
if(s.isNotBlank()) t.println("${getTime()}: ${TextColors.gray("[ MS] $s")}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -135,12 +135,14 @@ object Repository {
|
||||||
fun addPlayer(player: Player){
|
fun addPlayer(player: Player){
|
||||||
players.add(player)
|
players.add(player)
|
||||||
uid_map[player.details.usernameHashcode] = player
|
uid_map[player.details.usernameHashcode] = player
|
||||||
|
playerNames[player.name] = player
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun removePlayer(player: Player){
|
fun removePlayer(player: Player){
|
||||||
players.remove(player)
|
players.remove(player)
|
||||||
uid_map.remove(player.details.usernameHashcode)
|
uid_map.remove(player.details.usernameHashcode)
|
||||||
|
playerNames.remove(player.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import core.game.system.communication.CommunicationInfo
|
||||||
import core.net.IoReadEvent
|
import core.net.IoReadEvent
|
||||||
import core.net.IoSession
|
import core.net.IoSession
|
||||||
import rs09.auth.AuthResponse
|
import rs09.auth.AuthResponse
|
||||||
|
import rs09.game.system.SystemLogger
|
||||||
import rs09.game.world.GameWorld
|
import rs09.game.world.GameWorld
|
||||||
import rs09.net.packet.`in`.Login
|
import rs09.net.packet.`in`.Login
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
|
|
@ -17,25 +18,21 @@ import java.nio.ByteBuffer
|
||||||
class LoginReadEvent(session: IoSession?, buffer: ByteBuffer?) : IoReadEvent(session, buffer) {
|
class LoginReadEvent(session: IoSession?, buffer: ByteBuffer?) : IoReadEvent(session, buffer) {
|
||||||
override fun read(session: IoSession, buffer: ByteBuffer) {
|
override fun read(session: IoSession, buffer: ByteBuffer) {
|
||||||
val (response, info) = Login.decodeFromBuffer(buffer)
|
val (response, info) = Login.decodeFromBuffer(buffer)
|
||||||
|
|
||||||
if(response != AuthResponse.Success || info == null) {
|
if(response != AuthResponse.Success || info == null) {
|
||||||
session.write(response)
|
session.write(response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val (authResponse, accountInfo) = GameWorld.authenticator.checkLogin(info.username, info.password)
|
val (authResponse, accountInfo) = GameWorld.authenticator.checkLogin(info.username, info.password)
|
||||||
|
|
||||||
if(authResponse != AuthResponse.Success || accountInfo == null) {
|
if(authResponse != AuthResponse.Success || accountInfo == null) {
|
||||||
session.write(authResponse)
|
session.write(authResponse)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val details = PlayerDetails(info.username)
|
val details = PlayerDetails(info.username)
|
||||||
details.accountInfo = accountInfo
|
details.accountInfo = accountInfo
|
||||||
details.communication.parse(accountInfo)
|
details.communication.parse(accountInfo)
|
||||||
session.clientInfo = ClientInfo(info.displayMode, info.windowMode, info.screenWidth, info.screenHeight)
|
session.clientInfo = ClientInfo(info.displayMode, info.windowMode, info.screenWidth, info.screenHeight)
|
||||||
session.isaacPair = info.isaacPair
|
session.isaacPair = info.isaacPair
|
||||||
|
|
||||||
Login.proceedWith(session, details, info.opcode)
|
Login.proceedWith(session, details, info.opcode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,18 +3,24 @@ package rs09.net.packet.`in`
|
||||||
import core.cache.crypto.ISAACCipher
|
import core.cache.crypto.ISAACCipher
|
||||||
import core.cache.crypto.ISAACPair
|
import core.cache.crypto.ISAACPair
|
||||||
import core.cache.misc.buffer.ByteBufferUtils
|
import core.cache.misc.buffer.ByteBufferUtils
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.player.info.PlayerDetails
|
import core.game.node.entity.player.info.PlayerDetails
|
||||||
import core.game.node.entity.player.info.UIDInfo
|
import core.game.node.entity.player.info.UIDInfo
|
||||||
import core.game.node.entity.player.info.login.LoginType
|
import core.game.node.entity.player.info.login.LoginType
|
||||||
import core.net.Constants
|
import core.net.Constants
|
||||||
import core.net.IoSession
|
import core.net.IoSession
|
||||||
import core.net.amsc.WorldCommunicator
|
|
||||||
import core.tools.StringUtils
|
import core.tools.StringUtils
|
||||||
|
import proto.management.JoinClanRequest
|
||||||
|
import proto.management.PlayerStatusUpdate
|
||||||
|
import proto.management.RequestContactInfo
|
||||||
import rs09.ServerConstants
|
import rs09.ServerConstants
|
||||||
import rs09.auth.AuthResponse
|
import rs09.auth.AuthResponse
|
||||||
import rs09.game.node.entity.player.info.login.LoginParser
|
import rs09.game.node.entity.player.info.login.LoginParser
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
|
import rs09.game.world.GameWorld
|
||||||
import rs09.game.world.repository.Repository
|
import rs09.game.world.repository.Repository
|
||||||
|
import rs09.worker.ManagementEvents
|
||||||
|
import rs09.worker.ManagementEvents.publish
|
||||||
import java.math.BigInteger
|
import java.math.BigInteger
|
||||||
import java.nio.BufferUnderflowException
|
import java.nio.BufferUnderflowException
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
|
|
@ -68,6 +74,11 @@ object Login {
|
||||||
info.isaacPair = produceISAACPairFrom(decryptedBuffer)
|
info.isaacPair = produceISAACPairFrom(decryptedBuffer)
|
||||||
info.username = StringUtils.longToString(decryptedBuffer.long)
|
info.username = StringUtils.longToString(decryptedBuffer.long)
|
||||||
info.password = ByteBufferUtils.getString(decryptedBuffer)
|
info.password = ByteBufferUtils.getString(decryptedBuffer)
|
||||||
|
|
||||||
|
if (Repository.getPlayerByName(info.username) != null) {
|
||||||
|
return Pair(AuthResponse.AlreadyOnline, info)
|
||||||
|
}
|
||||||
|
|
||||||
return Pair(AuthResponse.Success, info)
|
return Pair(AuthResponse.Success, info)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
SystemLogger.logErr("Exception encountered during login packet parsing! See stack trace below.")
|
SystemLogger.logErr("Exception encountered during login packet parsing! See stack trace below.")
|
||||||
|
|
@ -109,6 +120,31 @@ object Login {
|
||||||
Repository.LOGGED_IN_PLAYERS.add(details.username)
|
Repository.LOGGED_IN_PLAYERS.add(details.username)
|
||||||
details.session = session
|
details.session = session
|
||||||
details.info.translate(UIDInfo(details.ipAddress, "DEPRECATED", "DEPRECATED", "DEPRECATED"))
|
details.info.translate(UIDInfo(details.ipAddress, "DEPRECATED", "DEPRECATED", "DEPRECATED"))
|
||||||
WorldCommunicator.register(LoginParser(details, LoginType.fromType(opcode)))
|
val player = Player(details)
|
||||||
|
if (!Repository.players.contains(player)) {
|
||||||
|
Repository.addPlayer(player)
|
||||||
|
}
|
||||||
|
LoginParser(details, LoginType.fromType(opcode)).initialize(player, opcode == RECONNECT_LOGIN_OP)
|
||||||
|
sendMSEvents(details)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun sendMSEvents(details: PlayerDetails) {
|
||||||
|
val statusEvent = PlayerStatusUpdate.newBuilder()
|
||||||
|
statusEvent.username = details.username
|
||||||
|
statusEvent.world = GameWorld.settings!!.worldId
|
||||||
|
statusEvent.notifyFriendsOnly = false
|
||||||
|
publish(statusEvent.build())
|
||||||
|
|
||||||
|
val contactEvent = RequestContactInfo.newBuilder()
|
||||||
|
contactEvent.username = details.username
|
||||||
|
contactEvent.world = GameWorld.settings!!.worldId
|
||||||
|
publish(contactEvent.build())
|
||||||
|
|
||||||
|
if (!details.communication.currentClan.isNullOrEmpty() && details.communication.clan == null) {
|
||||||
|
val clanEvent = JoinClanRequest.newBuilder()
|
||||||
|
clanEvent.username = details.username
|
||||||
|
clanEvent.clanName = details.communication.currentClan
|
||||||
|
publish(clanEvent.build())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@ interface AccountStorageProvider {
|
||||||
fun store(info: UserAccountInfo)
|
fun store(info: UserAccountInfo)
|
||||||
fun update(info: UserAccountInfo)
|
fun update(info: UserAccountInfo)
|
||||||
fun remove(info: UserAccountInfo)
|
fun remove(info: UserAccountInfo)
|
||||||
|
fun getOnlineFriends(username: String) : List<String>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,8 @@ class InMemoryStorageProvider : AccountStorageProvider {
|
||||||
override fun remove(info: UserAccountInfo) {
|
override fun remove(info: UserAccountInfo) {
|
||||||
storage.remove(info.username)
|
storage.remove(info.username)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getOnlineFriends(username: String): List<String> {
|
||||||
|
return ArrayList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package rs09.storage
|
package rs09.storage
|
||||||
|
|
||||||
|
import core.game.system.communication.CommunicationInfo
|
||||||
import rs09.auth.UserAccountInfo
|
import rs09.auth.UserAccountInfo
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
|
import rs09.game.world.repository.Repository
|
||||||
import java.lang.Long.max
|
import java.lang.Long.max
|
||||||
import java.sql.*
|
import java.sql.*
|
||||||
|
|
||||||
|
|
@ -155,6 +157,24 @@ class SQLStorageProvider : AccountStorageProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getOnlineFriends(username: String): List<String> {
|
||||||
|
val friends = ArrayList<String>()
|
||||||
|
var fTokens = ""
|
||||||
|
val conn = getConnection()
|
||||||
|
conn.use {
|
||||||
|
val friendsQuery = it.prepareStatement(GET_ALL_FRIENDS_QUERY)
|
||||||
|
friendsQuery.setString(1, username)
|
||||||
|
val f = friendsQuery.executeQuery()
|
||||||
|
if (f.next()) {
|
||||||
|
fTokens = f.getString(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val contacts = CommunicationInfo.parseContacts(fTokens)
|
||||||
|
for ((friendName, _) in contacts) if (Repository.getPlayerByName(friendName) != null) friends.add(friendName)
|
||||||
|
|
||||||
|
return friends
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val usernameQuery = "SELECT username FROM members WHERE username = ?;"
|
private const val usernameQuery = "SELECT username FROM members WHERE username = ?;"
|
||||||
private const val removeInfoQuery = "DELETE FROM members WHERE username = ?;"
|
private const val removeInfoQuery = "DELETE FROM members WHERE username = ?;"
|
||||||
|
|
@ -227,5 +247,7 @@ class SQLStorageProvider : AccountStorageProvider {
|
||||||
15 to "lastLogin",
|
15 to "lastLogin",
|
||||||
16 to "online"
|
16 to "online"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val GET_ALL_FRIENDS_QUERY = "SELECT contacts FROM players WHERE username = ?;"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
336
Server/src/main/kotlin/rs09/worker/ManagementEvents.kt
Normal file
336
Server/src/main/kotlin/rs09/worker/ManagementEvents.kt
Normal file
|
|
@ -0,0 +1,336 @@
|
||||||
|
package rs09.worker
|
||||||
|
|
||||||
|
import api.sendMessage
|
||||||
|
import com.google.protobuf.Message
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.system.communication.ClanEntry
|
||||||
|
import core.game.system.communication.ClanRank
|
||||||
|
import core.game.system.communication.ClanRepository
|
||||||
|
import core.game.system.communication.CommunicationInfo
|
||||||
|
import core.net.packet.PacketRepository
|
||||||
|
import core.net.packet.context.ContactContext
|
||||||
|
import core.net.packet.context.MessageContext
|
||||||
|
import core.net.packet.out.CommunicationMessage
|
||||||
|
import core.net.packet.out.ContactPackets
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.GlobalScope
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.withContext
|
||||||
|
import proto.management.ClanJoinNotification
|
||||||
|
import proto.management.ClanLeaveNotification
|
||||||
|
import proto.management.ClanMessage
|
||||||
|
import proto.management.FriendUpdate
|
||||||
|
import proto.management.JoinClanRequest
|
||||||
|
import proto.management.LeaveClanRequest
|
||||||
|
import proto.management.PlayerStatusUpdate
|
||||||
|
import proto.management.PrivateMessage
|
||||||
|
import proto.management.RequestClanInfo
|
||||||
|
import proto.management.RequestContactInfo
|
||||||
|
import proto.management.SendClanInfo
|
||||||
|
import proto.management.SendClanInfo.ClanMember
|
||||||
|
import proto.management.SendContactInfo
|
||||||
|
import proto.management.SendContactInfo.Contact
|
||||||
|
import rs09.game.system.SystemLogger
|
||||||
|
import rs09.game.world.GameWorld
|
||||||
|
import rs09.game.world.repository.Repository
|
||||||
|
import java.util.Deque
|
||||||
|
import java.util.LinkedList
|
||||||
|
import java.util.concurrent.BlockingDeque
|
||||||
|
import java.util.concurrent.LinkedBlockingDeque
|
||||||
|
import kotlin.reflect.jvm.internal.impl.descriptors.Visibilities.Private
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes management-related events e.g clan messages, etc.
|
||||||
|
*/
|
||||||
|
object ManagementEvents {
|
||||||
|
private var isRunning: Boolean = true
|
||||||
|
private val eventQueue: BlockingDeque<Message> = LinkedBlockingDeque()
|
||||||
|
private val waitingOnClanInfo = HashMap<String, Deque<Message>>()
|
||||||
|
private val hasRequestedClanInfo = HashMap<String, Boolean>()
|
||||||
|
|
||||||
|
val job = GlobalScope.launch {
|
||||||
|
while (isRunning) {
|
||||||
|
val event = withContext(Dispatchers.IO) { eventQueue.take() }
|
||||||
|
try {
|
||||||
|
handleEvent(event)
|
||||||
|
handleLoggingFor(event)
|
||||||
|
} catch (ignored: Exception) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleLoggingFor(event: Message) {
|
||||||
|
when (event) {
|
||||||
|
is PlayerStatusUpdate -> SystemLogger.logMS("${event.username} -(WLD)> ${event.world}")
|
||||||
|
is RequestContactInfo -> SystemLogger.logMS("${event.username} -> RQ CONTACT INFO")
|
||||||
|
is SendContactInfo -> SystemLogger.logMS("${event.username} <- SND CONTACT INFO")
|
||||||
|
is PrivateMessage -> SystemLogger.logMS("[PM] ${event.sender}->${event.receiver}: ${event.message}")
|
||||||
|
is ClanMessage -> SystemLogger.logMS("[CM:${event.clanName}] ${event.sender}: ${event.message}")
|
||||||
|
is JoinClanRequest -> SystemLogger.logMS("${event.username} +CL ${event.clanName}")
|
||||||
|
is LeaveClanRequest -> SystemLogger.logMS("${event.username} -CL ${event.clanName}")
|
||||||
|
is RequestClanInfo -> SystemLogger.logMS("REQUEST CLAN INFO: ${event.clanOwner}")
|
||||||
|
is SendClanInfo -> SystemLogger.logMS("RECEIVE CLAN INFO: ${event.clanOwner}->${event.clanName}")
|
||||||
|
is ClanJoinNotification -> SystemLogger.logMS("${event.username} JOINED CLAN ${event.clanName}")
|
||||||
|
is ClanLeaveNotification -> SystemLogger.logMS("${event.username} LEFT CLAN ${event.clanName}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic fun publish(event: Message) {
|
||||||
|
eventQueue.offer(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleEvent(event: Message) {
|
||||||
|
when (event) {
|
||||||
|
|
||||||
|
is PlayerStatusUpdate -> {
|
||||||
|
val notifiablePlayers = if (event.notifyFriendsOnly) {
|
||||||
|
GameWorld.accountStorage.getOnlineFriends(event.username)
|
||||||
|
} else {
|
||||||
|
Repository.playerNames.keys.toList()
|
||||||
|
}.filter { Repository.getPlayerByName(it)?.communication?.contacts?.containsKey(event.username) == true }
|
||||||
|
|
||||||
|
for (playerName in notifiablePlayers) {
|
||||||
|
val p = Repository.getPlayerByName(playerName) ?: continue
|
||||||
|
p.communication.contacts[event.username]?.worldId = event.world
|
||||||
|
PacketRepository.send(ContactPackets::class.java, ContactContext(p, event.username, event.world))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is RequestContactInfo -> {
|
||||||
|
val response = SendContactInfo.newBuilder()
|
||||||
|
response.username = event.username
|
||||||
|
val info = GameWorld.accountStorage.getAccountInfo(event.username)
|
||||||
|
val contacts = CommunicationInfo.parseContacts(info.contacts)
|
||||||
|
|
||||||
|
for ((username, contact) in contacts) {
|
||||||
|
val online = Repository.getPlayerByName(username) != null
|
||||||
|
val cbuild = Contact.newBuilder()
|
||||||
|
cbuild.username = username
|
||||||
|
cbuild.world = if (online) GameWorld.settings!!.worldId else 0
|
||||||
|
cbuild.rank = contact.rank.ordinal
|
||||||
|
response.addContacts(cbuild)
|
||||||
|
}
|
||||||
|
|
||||||
|
val blocked = info.blocked.split(",")
|
||||||
|
for (user in blocked) response.addBlocked(user)
|
||||||
|
|
||||||
|
publish(response.build())
|
||||||
|
}
|
||||||
|
|
||||||
|
is SendContactInfo -> {
|
||||||
|
val p = Repository.getPlayerByName(event.username) ?: return
|
||||||
|
|
||||||
|
PacketRepository.send(
|
||||||
|
ContactPackets::class.java,
|
||||||
|
ContactContext(p, ContactContext.UPDATE_STATE_TYPE)
|
||||||
|
)
|
||||||
|
|
||||||
|
p.communication.contacts.clear()
|
||||||
|
p.communication.blocked.clear()
|
||||||
|
|
||||||
|
for (contact in event.contactsList) {
|
||||||
|
val c = core.game.system.communication.Contact(contact.username)
|
||||||
|
p.communication.contacts[contact.username] = c
|
||||||
|
c.worldId = contact.world
|
||||||
|
c.rank = ClanRank.values()[contact.rank]
|
||||||
|
PacketRepository.send(
|
||||||
|
ContactPackets::class.java,
|
||||||
|
ContactContext(p, contact.username, contact.world)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
for (blocked in event.blockedList) {
|
||||||
|
p.communication.blocked.add(blocked)
|
||||||
|
}
|
||||||
|
|
||||||
|
PacketRepository.send(
|
||||||
|
ContactPackets::class.java,
|
||||||
|
ContactContext(p, ContactContext.IGNORE_LIST_TYPE)
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
is PrivateMessage -> {
|
||||||
|
val sender = Repository.getPlayerByName(event.sender)
|
||||||
|
val receiver = Repository.getPlayerByName(event.receiver)
|
||||||
|
|
||||||
|
if (sender != null) {
|
||||||
|
PacketRepository.send(
|
||||||
|
CommunicationMessage::class.java,
|
||||||
|
MessageContext(sender, event.receiver, event.rank, MessageContext.SEND_MESSAGE, event.message)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (receiver != null) {
|
||||||
|
PacketRepository.send(
|
||||||
|
CommunicationMessage::class.java,
|
||||||
|
MessageContext(receiver, event.sender, event.rank, MessageContext.RECIEVE_MESSAGE, event.message)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is JoinClanRequest -> {
|
||||||
|
val p = Repository.getPlayerByName(event.username) ?: return
|
||||||
|
|
||||||
|
if (shouldWaitForClanInfo(event.clanName)) {
|
||||||
|
queueUntilClanInfo(event.clanName, event)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val clan = ClanRepository.get(event.clanName)
|
||||||
|
|
||||||
|
if (clan == null) {
|
||||||
|
sendMessage(p, "The channel you tried to join does not exist.:clan:")
|
||||||
|
} else {
|
||||||
|
clan.enter(p)
|
||||||
|
p.communication.clan = clan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is ClanJoinNotification -> {
|
||||||
|
if (event.world == GameWorld.settings!!.worldId) return
|
||||||
|
|
||||||
|
if (shouldWaitForClanInfo(event.clanName)) {
|
||||||
|
queueUntilClanInfo(event.clanName, event)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val clan = ClanRepository.get(event.clanName)
|
||||||
|
val entry = ClanEntry(event.username, event.world)
|
||||||
|
clan.players.add(entry)
|
||||||
|
clan.update()
|
||||||
|
}
|
||||||
|
|
||||||
|
is LeaveClanRequest -> {
|
||||||
|
val p = Repository.getPlayerByName(event.username) ?: return
|
||||||
|
|
||||||
|
if (shouldWaitForClanInfo(event.clanName)) {
|
||||||
|
queueUntilClanInfo(event.clanName, event)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val clan = ClanRepository.get(event.clanName)
|
||||||
|
|
||||||
|
if (clan == null) {
|
||||||
|
sendMessage(p, "Error leaving clan. Please relog.")
|
||||||
|
} else {
|
||||||
|
clan.leave(p, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is ClanLeaveNotification -> {
|
||||||
|
if (shouldWaitForClanInfo(event.clanName)) {
|
||||||
|
queueUntilClanInfo(event.clanName, event)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val clan = ClanRepository.get(event.clanName)
|
||||||
|
val entry = clan.players.firstOrNull { it.name.equals(event.username) } ?: return
|
||||||
|
clan.players.remove(entry)
|
||||||
|
clan.update()
|
||||||
|
}
|
||||||
|
|
||||||
|
is RequestClanInfo -> {
|
||||||
|
val clan = ClanRepository.get(event.clanOwner)
|
||||||
|
val response = SendClanInfo.newBuilder()
|
||||||
|
|
||||||
|
if (clan == null) {
|
||||||
|
response.hasInfo = false
|
||||||
|
response.clanOwner = event.clanOwner
|
||||||
|
} else {
|
||||||
|
response.hasInfo = true
|
||||||
|
response.clanName = clan.name
|
||||||
|
response.clanOwner = event.clanOwner
|
||||||
|
|
||||||
|
for (member in clan.players) {
|
||||||
|
val cmBuilder = ClanMember.newBuilder()
|
||||||
|
cmBuilder.username = member.name
|
||||||
|
cmBuilder.world = member.worldId
|
||||||
|
cmBuilder.rank = (clan.ranks[member.name] ?: ClanRank.NONE).ordinal
|
||||||
|
response.addMembers(cmBuilder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publish(response.build())
|
||||||
|
}
|
||||||
|
|
||||||
|
is SendClanInfo -> {
|
||||||
|
if (event.hasInfo) {
|
||||||
|
val clan = ClanRepository.getClans().getOrPut(event.clanOwner) { ClanRepository(event.clanOwner) }
|
||||||
|
clan.name = event.clanName
|
||||||
|
clan.joinRequirement = ClanRank.values()[event.joinRequirement]
|
||||||
|
clan.kickRequirement = ClanRank.values()[event.kickRequirement]
|
||||||
|
clan.messageRequirement = ClanRank.values()[event.messageRequirement]
|
||||||
|
clan.lootRequirement = ClanRank.values()[event.lootRequirement]
|
||||||
|
|
||||||
|
for (member in event.membersList) {
|
||||||
|
val entry = ClanEntry(member.username, member.world)
|
||||||
|
clan.ranks[member.username] = ClanRank.values()[member.rank]
|
||||||
|
if (member.world == GameWorld.settings!!.worldId) {
|
||||||
|
val p = Repository.getPlayerByName(member.username)
|
||||||
|
entry.player = p
|
||||||
|
p?.communication?.clan = clan
|
||||||
|
}
|
||||||
|
clan.players.add(entry)
|
||||||
|
}
|
||||||
|
|
||||||
|
clan.update()
|
||||||
|
} else {
|
||||||
|
val info = GameWorld.accountStorage.getAccountInfo(event.clanOwner)
|
||||||
|
if (info.clanName.isNotEmpty()) {
|
||||||
|
val reqs = CommunicationInfo.parseClanRequirements(info.clanReqs)
|
||||||
|
val c = ClanRepository(event.clanOwner)
|
||||||
|
val contacts = CommunicationInfo.parseContacts(info.contacts)
|
||||||
|
c.name = info.clanName
|
||||||
|
c.joinRequirement = reqs[0]
|
||||||
|
c.messageRequirement = reqs[1]
|
||||||
|
c.kickRequirement = reqs[2]
|
||||||
|
c.lootRequirement = reqs[3]
|
||||||
|
for ((username, contact) in contacts) {
|
||||||
|
c.ranks[username] = contact.rank
|
||||||
|
}
|
||||||
|
ClanRepository.getClans()[event.clanOwner] = c
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val queuedEvents = waitingOnClanInfo[event.clanOwner] ?: return
|
||||||
|
while (queuedEvents.peek() != null) {
|
||||||
|
publish(queuedEvents.pop())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is ClanMessage -> {
|
||||||
|
if (shouldWaitForClanInfo(event.clanName)) {
|
||||||
|
queueUntilClanInfo(event.clanName, event)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val clan = ClanRepository.get(event.clanName)
|
||||||
|
|
||||||
|
for (member in clan.players.filter { it.player != null }) {
|
||||||
|
PacketRepository.send(
|
||||||
|
CommunicationMessage::class.java,
|
||||||
|
MessageContext(member.player, event.sender, event.rank, MessageContext.CLAN_MESSAGE, event.message)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun queueUntilClanInfo(clanName: String, message: Message) {
|
||||||
|
val queue = waitingOnClanInfo.getOrPut(clanName) {LinkedList()}
|
||||||
|
queue.offer(message)
|
||||||
|
|
||||||
|
if (hasRequestedClanInfo[clanName] == null) {
|
||||||
|
val request = RequestClanInfo.newBuilder()
|
||||||
|
request.clanOwner = clanName
|
||||||
|
request.world = GameWorld.settings!!.worldId
|
||||||
|
publish(request.build())
|
||||||
|
hasRequestedClanInfo[clanName] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun shouldWaitForClanInfo(clanName: String): Boolean {
|
||||||
|
return ClanRepository.get(clanName) == null && hasRequestedClanInfo[clanName] == null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -35,6 +35,6 @@ class LoginTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val validLoginPacket = byteArrayOf(16, 1, 80, 0, 0, 2, 18, 0, 1, 1, 2, 2, -3, 1, -9, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, 75, 109, 111, 107, 51, 107, 74, 113, 79, 101, 78, 54, 68, 51, 109, 68, 100, 105, 104, 99, 111, 51, 111, 80, 101, 89, 78, 50, 75, 70, 121, 54, 87, 53, 45, 45, 118, 90, 85, 98, 78, 65, 0, 0, 0, 0, 0, 1, 89, -73, -29, 0, 0, -47, -49, 34, 92, -124, 110, -97, 46, -33, -18, 122, 8, 76, 93, -82, 16, 53, 23, -113, -73, 101, 126, -93, 125, -65, 115, -59, 19, 90, -54, -102, -76, -99, -5, -68, -51, 95, -20, -27, 10, 60, 60, 108, 5, 76, 9, -63, 97, 106, 74, 116, 0, 58, 0, 75, -111, -128, -34, 12, 64, 47, -92, -33, -120, -109, -7, 23, 124, 122, 40, -107, 56, -34, -93, 64, -82, 58, -90, 7, 127, -15, -85, 125, 43, 15, 0, 112, 60, 4, 75, 72, 55, 18, 83, -119, -39, 32, -113, 21, 104, -49, 66, -102, 104, -13, 32, 117, -106, 94, -30, 37, -56, -67, 21, 77, 70, -128, 113, 86, 84, 83, 115, 3, 55, -106, 127, -14, -15, 6, 42, -92, -56, 114, 24, 83, 32, -127, 78, 14, -98, -30, -38, -115, 9, -106, 120, 101, -117, -50, -40, -64, -50, -106, -98, 5, -86, 28, -127, -5, 109, -107, 49, -107, 63, 81, -81, -109, -21, 25, -68, 63, 102, -5, 8, -96, 126, -128, -116, -32, 26, 76, 54, -63, -37, 41, 57, 65, -53, -22, 83, 61, -128, -17, -21, 87, 76, -8, -95, -45, -80, -60, -62, 96, 49, 26, 49, 94, 80, 11, -12, -95, -58, -116, -54, -107, 91, 104, 58, 33, 20, -93, -68, -83, -116, 63, -18, 36, 30, -98, 77, -107, 122, 79, -27, 67, -94, 125, -81, -21, -75, -71, -45, -39, 112, 40)
|
val validLoginPacket = byteArrayOf(16,1,80,0,0,2,18,0,1,1,2,2,-3,1,-9,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,107,75,109,111,107,51,107,74,113,79,101,78,54,68,51,109,68,100,105,104,99,111,51,111,80,101,89,78,50,75,70,121,54,87,53,45,45,118,90,85,98,78,65,0,0,0,0,0,1,81,-73,-29,0,0,-47,-49,34,92,-124,110,-97,46,-33,-18,122,8,76,93,-82,16,53,23,-113,-73,101,126,-93,125,-65,115,-59,19,90,-54,-102,-76,-99,-5,-68,-51,95,-20,-27,10,60,60,108,5,76,9,-63,97,106,74,116,0,58,0,75,-111,-128,-34,12,64,47,-92,-33,-120,-109,-7,23,124,122,40,-107,56,-34,-93,64,-82,58,-90,7,127,-15,-85,125,43,15,0,112,60,4,75,72,55,18,83,-119,-39,32,-113,21,104,-49,66,-102,104,-13,32,117,-106,94,-30,37,-56,-67,21,77,70,-128,68,112,-78,-49,-58,-48,74,70,31,12,64,84,124,2,-61,71,104,55,73,62,-27,111,122,-56,52,93,1,-52,32,102,73,-21,-46,-79,45,58,88,-36,-113,31,78,77,-56,-126,-103,-33,21,110,47,-81,-70,-15,14,114,51,-41,-49,6,-112,-28,-28,-112,113,120,68,29,-123,-108,24,-58,6,113,54,55,21,-58,32,99,-120,13,8,-94,-83,121,123,20,16,-89,43,-51,-20,74,-114,-126,-86,-12,38,-107,12,25,-40,-79,-116,-18,-85,-83,95,-106,-81,-64,31,110,-65,-128,-74,70,80,-20,11,117,28,39,-102,75,67,98,-121,-28)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue