From 7f35b64d9303b5960ac8b7a3612df3d1066a4ab8 Mon Sep 17 00:00:00 2001 From: mohammed jasem alaajel Date: Mon, 13 May 2024 02:00:31 +0400 Subject: [PATCH] stupid git --- .../minecraft/redisbungee/RedisBungeeAPI.java | 63 ------------------- .../PlayerChangedServerNetworkEvent.java | 52 --------------- .../events/PlayerJoinedNetworkEvent.java | 38 ----------- .../events/PlayerLeftNetworkEvent.java | 38 ----------- .../events/PubSubMessageEvent.java | 42 ------------- 5 files changed, 233 deletions(-) delete mode 100644 proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeAPI.java delete mode 100644 proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerChangedServerNetworkEvent.java delete mode 100644 proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerJoinedNetworkEvent.java delete mode 100644 proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerLeftNetworkEvent.java delete mode 100644 proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PubSubMessageEvent.java diff --git a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeAPI.java b/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeAPI.java deleted file mode 100644 index 5140fdb..0000000 --- a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeAPI.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2013-present RedisBungee contributors - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * - * http://www.eclipse.org/legal/epl-v10.html - */ - -package com.imaginarycode.minecraft.redisbungee; - -import com.imaginarycode.minecraft.redisbungee.api.RedisBungeePlugin; -import net.md_5.bungee.api.config.ServerInfo; -import net.md_5.bungee.api.plugin.Plugin; -import org.checkerframework.checker.nullness.qual.NonNull; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.UUID; - -/** - * This platform class exposes some internal RedisBungee functions. You obtain an instance of this object by invoking {@link RedisBungeeAPI#getRedisBungeeApi()} - * or somehow you got the Plugin instance by you can call the api using {@link RedisBungeePlugin#getAbstractRedisBungeeApi()}. - * - * @author tuxed - * @since 0.2.3 | updated 0.8.0 - */ -public class RedisBungeeAPI extends AbstractRedisBungeeAPI { - - private static RedisBungeeAPI redisBungeeApi; - - public RedisBungeeAPI(RedisBungeePlugin plugin) { - super(plugin); - if (redisBungeeApi == null) { - redisBungeeApi = this; - } - } - - /** - * Get the server where the specified player is playing. This function also deals with the case of local players - * as well, and will return local information on them. - * - * @param player a player uuid - * @return {@link ServerInfo} Can be null if proxy can't find it. - * @see #getServerNameFor(UUID) - */ - @Nullable - public final ServerInfo getServerFor(@NonNull UUID player) { - String serverName = this.getServerNameFor(player); - if (serverName == null) return null; - return ((Plugin) this.plugin).getProxy().getServerInfo(serverName); - } - - /** - * Api instance - * - * @return the API instance. - * @since 0.6.5 - */ - public static RedisBungeeAPI getRedisBungeeApi() { - return redisBungeeApi; - } -} diff --git a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerChangedServerNetworkEvent.java b/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerChangedServerNetworkEvent.java deleted file mode 100644 index a6b33f9..0000000 --- a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerChangedServerNetworkEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2013-present RedisBungee contributors - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * - * http://www.eclipse.org/legal/epl-v10.html - */ - -package com.imaginarycode.minecraft.redisbungee.events; - -import com.imaginarycode.minecraft.redisbungee.api.events.IPlayerChangedServerNetworkEvent; -import net.md_5.bungee.api.plugin.Event; - -import java.util.UUID; - -/** - * This event is sent when a player connects to a new server. RedisBungee sends the event only when - * the proxy the player has been connected to is different than the local proxy. - *

- * This event corresponds to {@link net.md_5.bungee.api.event.ServerConnectedEvent}, and is fired - * asynchronously. - * - * @since 0.3.4 - */ -public class PlayerChangedServerNetworkEvent extends Event implements IPlayerChangedServerNetworkEvent { - private final UUID uuid; - private final String previousServer; - private final String server; - - public PlayerChangedServerNetworkEvent(UUID uuid, String previousServer, String server) { - this.uuid = uuid; - this.previousServer = previousServer; - this.server = server; - } - - @Override - public UUID getUuid() { - return uuid; - } - - @Override - public String getServer() { - return server; - } - - @Override - public String getPreviousServer() { - return previousServer; - } -} diff --git a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerJoinedNetworkEvent.java b/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerJoinedNetworkEvent.java deleted file mode 100644 index 51ff842..0000000 --- a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerJoinedNetworkEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2013-present RedisBungee contributors - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * - * http://www.eclipse.org/legal/epl-v10.html - */ - -package com.imaginarycode.minecraft.redisbungee.events; - -import com.imaginarycode.minecraft.redisbungee.api.events.IPlayerJoinedNetworkEvent; -import net.md_5.bungee.api.plugin.Event; - -import java.util.UUID; - -/** - * This event is sent when a player joins the network. RedisBungee sends the event only when - * the proxy the player has been connected to is different than the local proxy. - *

- * This event corresponds to {@link net.md_5.bungee.api.event.PostLoginEvent}, and is fired - * asynchronously. - * - * @since 0.3.4 - */ -public class PlayerJoinedNetworkEvent extends Event implements IPlayerJoinedNetworkEvent { - private final UUID uuid; - - public PlayerJoinedNetworkEvent(UUID uuid) { - this.uuid = uuid; - } - - @Override - public UUID getUuid() { - return uuid; - } -} diff --git a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerLeftNetworkEvent.java b/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerLeftNetworkEvent.java deleted file mode 100644 index 3edf2bb..0000000 --- a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PlayerLeftNetworkEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2013-present RedisBungee contributors - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * - * http://www.eclipse.org/legal/epl-v10.html - */ - -package com.imaginarycode.minecraft.redisbungee.events; - -import com.imaginarycode.minecraft.redisbungee.api.events.IPlayerLeftNetworkEvent; -import net.md_5.bungee.api.plugin.Event; - -import java.util.UUID; - -/** - * This event is sent when a player disconnects. RedisBungee sends the event only when - * the proxy the player has been connected to is different than the local proxy. - *

- * This event corresponds to {@link net.md_5.bungee.api.event.PlayerDisconnectEvent}, and is fired - * asynchronously. - * - * @since 0.3.4 - */ -public class PlayerLeftNetworkEvent extends Event implements IPlayerLeftNetworkEvent { - private final UUID uuid; - - public PlayerLeftNetworkEvent(UUID uuid) { - this.uuid = uuid; - } - - @Override - public UUID getUuid() { - return uuid; - } -} diff --git a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PubSubMessageEvent.java b/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PubSubMessageEvent.java deleted file mode 100644 index b328c40..0000000 --- a/proxies/bungeecord/src/main/java/com/imaginarycode/minecraft/redisbungee/events/PubSubMessageEvent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2013-present RedisBungee contributors - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * - * http://www.eclipse.org/legal/epl-v10.html - */ - -package com.imaginarycode.minecraft.redisbungee.events; - -import com.imaginarycode.minecraft.redisbungee.api.events.IPubSubMessageEvent; -import net.md_5.bungee.api.plugin.Event; - -/** - * This event is posted when a PubSub message is received. - *

- * Warning: This event is fired in a separate thread! - * - * @since 0.2.6 - */ - -public class PubSubMessageEvent extends Event implements IPubSubMessageEvent { - private final String channel; - private final String message; - - public PubSubMessageEvent(String channel, String message) { - this.channel = channel; - this.message = message; - } - - @Override - public String getChannel() { - return channel; - } - - @Override - public String getMessage() { - return message; - } -}