mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-05-03 11:40:29 +00:00
Compare commits
3 Commits
0.12.3-SNA
...
0.12.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
2485150ddc
|
|||
|
32735466d6
|
|||
|
e8715e5399
|
@@ -224,7 +224,7 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @since 0.2.5
|
* @since 0.2.5
|
||||||
* @deprecated to avoid confusion between A server and A proxy see #getProxyId()
|
* @deprecated to avoid confusion between A server and A proxy see #getProxyId()
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
public final String getServerId() {
|
public final String getServerId() {
|
||||||
return getProxyId();
|
return getProxyId();
|
||||||
}
|
}
|
||||||
@@ -248,7 +248,7 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @since 0.2.5
|
* @since 0.2.5
|
||||||
* @deprecated to avoid confusion between A server and A proxy see see {@link #getAllProxies()}
|
* @deprecated to avoid confusion between A server and A proxy see see {@link #getAllProxies()}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
public final List<String> getAllServers() {
|
public final List<String> getAllServers() {
|
||||||
return getAllProxies();
|
return getAllProxies();
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @since 0.3
|
* @since 0.3
|
||||||
* @deprecated No longer required
|
* @deprecated No longer required
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
public final void registerPubSubChannels(String... channels) {
|
public final void registerPubSubChannels(String... channels) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @since 0.3
|
* @since 0.3
|
||||||
* @deprecated No longer required
|
* @deprecated No longer required
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
public final void unregisterPubSubChannels(String... channels) {
|
public final void unregisterPubSubChannels(String... channels) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @since 0.8.0
|
* @since 0.8.0
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
public void kickPlayer(String playerName, String message) {
|
public void kickPlayer(String playerName, String message) {
|
||||||
kickPlayer(getUuidFromName(playerName), message);
|
kickPlayer(getUuidFromName(playerName), message);
|
||||||
}
|
}
|
||||||
@@ -365,7 +365,7 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @since 0.8.0
|
* @since 0.8.0
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
public void kickPlayer(UUID playerUUID, String message) {
|
public void kickPlayer(UUID playerUUID, String message) {
|
||||||
kickPlayer(playerUUID, Component.text(message));
|
kickPlayer(playerUUID, Component.text(message));
|
||||||
}
|
}
|
||||||
@@ -402,7 +402,9 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @throws IllegalStateException if the {@link #getMode()} is not equal to {@link RedisBungeeMode#SINGLE}
|
* @throws IllegalStateException if the {@link #getMode()} is not equal to {@link RedisBungeeMode#SINGLE}
|
||||||
* @see #getJedisPool()
|
* @see #getJedisPool()
|
||||||
* @since 0.7.0
|
* @since 0.7.0
|
||||||
|
* @deprecated use {@link #getSummoner() }
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public Jedis requestJedis() {
|
public Jedis requestJedis() {
|
||||||
if (getMode() == RedisBungeeMode.SINGLE) {
|
if (getMode() == RedisBungeeMode.SINGLE) {
|
||||||
return getJedisPool().getResource();
|
return getJedisPool().getResource();
|
||||||
@@ -438,7 +440,9 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @return {@link redis.clients.jedis.JedisCluster}
|
* @return {@link redis.clients.jedis.JedisCluster}
|
||||||
* @throws IllegalStateException if the {@link #getMode()} is not equal to {@link RedisBungeeMode#CLUSTER}
|
* @throws IllegalStateException if the {@link #getMode()} is not equal to {@link RedisBungeeMode#CLUSTER}
|
||||||
* @since 0.8.0
|
* @since 0.8.0
|
||||||
|
* @deprecated use {@link #getSummoner()}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public JedisCluster requestClusterJedis() {
|
public JedisCluster requestClusterJedis() {
|
||||||
if (getMode() == RedisBungeeMode.CLUSTER) {
|
if (getMode() == RedisBungeeMode.CLUSTER) {
|
||||||
return ((JedisClusterSummoner) this.plugin.getSummoner()).obtainResource();
|
return ((JedisClusterSummoner) this.plugin.getSummoner()).obtainResource();
|
||||||
@@ -454,7 +458,9 @@ public abstract class AbstractRedisBungeeAPI {
|
|||||||
* @return {@link redis.clients.jedis.JedisPooled}
|
* @return {@link redis.clients.jedis.JedisPooled}
|
||||||
* @throws IllegalStateException if the {@link #getMode()} is not equal to {@link RedisBungeeMode#SINGLE}
|
* @throws IllegalStateException if the {@link #getMode()} is not equal to {@link RedisBungeeMode#SINGLE}
|
||||||
* @since 0.8.0
|
* @since 0.8.0
|
||||||
|
* @deprecated use {@link #getSummoner()}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public JedisPooled requestJedisPooled() {
|
public JedisPooled requestJedisPooled() {
|
||||||
if (getMode() == RedisBungeeMode.SINGLE) {
|
if (getMode() == RedisBungeeMode.SINGLE) {
|
||||||
return ((JedisPooledSummoner) this.plugin.getSummoner()).obtainResource();
|
return ((JedisPooledSummoner) this.plugin.getSummoner()).obtainResource();
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
group=com.imaginarycode.minecraft
|
group=com.imaginarycode.minecraft
|
||||||
version=0.12.3-SNAPSHOT
|
version=0.12.3
|
||||||
@@ -26,7 +26,6 @@ import com.velocitypowered.api.proxy.Player;
|
|||||||
import com.velocitypowered.api.proxy.ServerConnection;
|
import com.velocitypowered.api.proxy.ServerConnection;
|
||||||
import com.velocitypowered.api.proxy.server.RegisteredServer;
|
import com.velocitypowered.api.proxy.server.RegisteredServer;
|
||||||
import com.velocitypowered.api.proxy.server.ServerPing;
|
import com.velocitypowered.api.proxy.server.ServerPing;
|
||||||
import net.kyori.adventure.text.Component;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -146,8 +145,11 @@ public class RedisBungeeListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
// ServerConnection throws IllegalStateException when connection dies somehow so just ignore :/
|
||||||
((ServerConnection) event.getSource()).sendPluginMessage(event.getIdentifier(), out.toByteArray());
|
((ServerConnection) event.getSource()).sendPluginMessage(event.getIdentifier(), out.toByteArray());
|
||||||
|
} catch (IllegalStateException ignored) {
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user