Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.gmail.idailygaming.idgpack;
- import java.util.Arrays;
- import net.md_5.bungee.api.ChatColor;
- import net.md_5.bungee.api.chat.BaseComponent;
- import net.md_5.bungee.api.chat.ComponentBuilder;
- import net.md_5.bungee.api.connection.ProxiedPlayer;
- import net.md_5.bungee.api.plugin.Event;
- public final class IDGpack
- extends Event
- {
- private final ProxiedPlayer player;
- private boolean isAuthorized;
- private boolean isUpToDate = true;
- private String username;
- private final byte[][] interfaces = null;
- private final byte[] computerUUID = null;
- private String uuid;
- private BaseComponent[] kickMessage = null;
- public static final BaseComponent[] NOT_AUTH = new ComponentBuilder("Blad autoryzacji! Pobierz paczke ze strony: ").color(ChatColor.AQUA).bold(true).append("BlazingPack.pl").color(ChatColor.GOLD).bold(true).create();
- public static final BaseComponent[] NOT_UP_TO_DATE = new ComponentBuilder("Wylacz i wlacz paczke!").color(ChatColor.AQUA).bold(true).create();
- @Deprecated
- public IDGpack(ProxiedPlayer paramProxiedPlayer)
- {
- this.player = paramProxiedPlayer;
- }
- public final ProxiedPlayer getPlayer()
- {
- return this.player;
- }
- public final boolean isAuthorized()
- {
- return this.isAuthorized;
- }
- public final void setAuthorized(boolean paramBoolean)
- {
- this.isAuthorized = paramBoolean;
- }
- public final boolean isUpToDate()
- {
- return this.isUpToDate;
- }
- public final void setUpToDate(boolean paramBoolean)
- {
- this.isUpToDate = paramBoolean;
- }
- public final String getUsername()
- {
- return this.username;
- }
- public final byte[][] getInterfaces()
- {
- return this.interfaces;
- }
- public final byte[] getComputerUUID()
- {
- return this.computerUUID;
- }
- public final String getUuid()
- {
- return this.uuid;
- }
- public final void setUuid(String paramString)
- {
- this.uuid = paramString;
- }
- public final BaseComponent[] getKickMessage()
- {
- if (this.kickMessage == null)
- {
- if ((this.isAuthorized) && (!this.isUpToDate)) {
- return NOT_UP_TO_DATE;
- }
- return NOT_AUTH;
- }
- return this.kickMessage;
- }
- public final void setKickMessage(BaseComponent... paramVarArgs)
- {
- this.kickMessage = paramVarArgs;
- }
- public final int hashCode()
- {
- return (((((((31 + Arrays.hashCode(this.computerUUID)) * 31 + Arrays.deepHashCode(this.interfaces)) * 31 + (this.isAuthorized ? 1231 : 1237)) * 31 + (this.isUpToDate ? 1231 : 1237)) * 31 + Arrays.hashCode(this.kickMessage)) * 31 + (this.player == null ? 0 : this.player.hashCode())) * 31 + (this.username == null ? 0 : this.username.hashCode())) * 31 + (this.uuid == null ? 0 : this.uuid.hashCode());
- }
- public final boolean equals(Object paramObject)
- {
- if (this == paramObject) {
- return true;
- }
- if (paramObject == null) {
- return false;
- }
- if (getClass() != paramObject.getClass()) {
- return false;
- }
- paramObject = (IDGpack)paramObject;
- if (!Arrays.equals(this.computerUUID, ((IDGpack)paramObject).computerUUID)) {
- return false;
- }
- if (!Arrays.deepEquals(this.interfaces, ((IDGpack)paramObject).interfaces)) {
- return false;
- }
- if (this.isAuthorized != ((IDGpack)paramObject).isAuthorized) {
- return false;
- }
- if (this.isUpToDate != ((IDGpack)paramObject).isUpToDate) {
- return false;
- }
- if (!Arrays.equals(this.kickMessage, ((IDGpack)paramObject).kickMessage)) {
- return false;
- }
- if (this.player == null)
- {
- if (((IDGpack)paramObject).player != null) {
- return false;
- }
- }
- else if (!this.player.equals(((IDGpack)paramObject).player)) {
- return false;
- }
- if (this.username == null)
- {
- if (((IDGpack)paramObject).username != null) {
- return false;
- }
- }
- else if (!this.username.equals(((IDGpack)paramObject).username)) {
- return false;
- }
- if (this.uuid == null)
- {
- if (((IDGpack)paramObject).uuid != null) {
- return false;
- }
- }
- else if (!this.uuid.equals(((IDGpack)paramObject).uuid)) {
- return false;
- }
- return true;
- }
- public final String toString()
- {
- return String.format("BlazingPackAuthorizationEvent [player=%s, isAuthorized=%s, isUpToDate=%s, username=%s, interfaces=%s, computerUUID=%s, uuid=%s, kickMessage=%s]", new Object[] { this.player, Boolean.valueOf(this.isAuthorized), Boolean.valueOf(this.isUpToDate), this.username, Arrays.toString(this.interfaces), Arrays.toString(this.computerUUID), this.uuid, Arrays.toString(this.kickMessage) });
- }
- }
Add Comment
Please, Sign In to add comment