2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-09-19 15:18:01 +00:00
Commit Graph

93 Commits

Author SHA1 Message Date
27358d2f5f
change big uuid cache message to include the '/rb clean' 2024-04-28 23:16:18 +04:00
1593c2d628
0.12.0 (#86)
## NOTES
data system shouldn't effect anybody, unless you do any direct query to
Redis query data, you should adapt the changes, by viewing classes
`ProxyDataManager` and `PlayerDataManager`

# Changes 
* RedisBungee is compiled with `java 17` now, Due java 11 support is
ending at end of September
* config version is now `2` which will reset your config if older
version
* Adventure API is included inside RedisBungee API
* new Language infrastructure for RedisBungee built-in messages #85
*commands not included yet*
* New data system which replaces Redis PubSub with Redis Streams *see
below*
* Ability to connect player to last server they where on using an config
option #84
* new environment variable `REDISBUNGEE_PROXY_ID` which can be set
before launch
* new environment variable `REDISBUNGEE_NETWORK_ID` which can be set
before launch
* RedisBungee requires redis version 6.2 or above  #88 
* Better command system
https://github.com/ProxioDev/RedisBungee/issues/93

## New data system
Due limitation of Redis PubSub in Cluster environment, Internals of
RedisBungee were changed to support Redis Streams
- Network Ids
  - networks ids used to group network proxies
    - example having 'test' network and 'main' network
- Networks in the same redis server / cluster share the same UUID cache
- Heartbeat system:
- RedisBungee old heartbeat system used hastset on redisbungee to store
the current unix time of the proxy to check what every proxy died or
not, now instead we publish the heartbeat using unix time, and online
count to proxy which proxy store it in their memory, which allow the
`get number of online players` to be faster than pooling whole list in
old data system.

- PubSub
- since redisbungee was initially designed with pubsub in mind,
registration no longer required now for event to fire, see the api
changes below.

## Commands System
* rewritten using [acf lib](https://github.com/aikar/commands) to be
platform independent
* new command `/rb` or `/redisbungee` with sub commands `help`, `info`,
'clean', 'show'.

* 'rb'
  * '/rb' and '/rb info'

![image](https://github.com/ProxioDev/RedisBungee/assets/34905970/70796ab0-b5fd-4578-8c93-c976e517df95)

  * '/rb show'
  

![image](https://github.com/ProxioDev/RedisBungee/assets/34905970/56332c37-701f-43e0-946b-6894b845fab3)

* configuration to disable or override each command from legacy to new
introduced one `/rb`
```yaml

# For redis bungee legacy commands
# either can be run using '/rbl glist' for example
# or if 'install' is set to true '/glist' can be used.
# 'install' also overrides the proxy installed commands
#
# In legacy commands each command got it own permissions since they had it own permission pre new command system,
# so it's also applied to subcommands in '/rbl'.
commands:
  # Permission redisbungee.legacy.use
  redisbungee-legacy:
    enabled: false
    subcommands:
        # Permission redisbungee.command.glist
        glist:
          enabled: false
          install: false
        # Permission redisbungee.command.find
        find:
          enabled: false
          install: false
        # Permission redisbungee.command.lastseen
        lastseen:
          enabled: false
          install: false
        # Permission redisbungee.command.ip
        ip:
          enabled: false
          install: false
        # Permission redisbungee.command.pproxy
        pproxy:
          enabled: false
          install: false
        # Permission redisbungee.command.sendtoall
        sendtoall:
          enabled: false
          install: false
        # Permission redisbungee.command.serverid
        serverid:
          enabled: false
          install: false
        # Permission redisbungee.command.serverids
        serverids:
          enabled: false
          install: false
       # Permission redisbungee.command.plist
        plist:
          enabled: false
          install: false
  # Permission redisbungee.command.use
  redisbungee:
    enabled: true
```

## API changes
- Kick api Deprecated: 
  - `kickPlayer(String playerName, String message) `
  - `kickPlayer(UUID playerUUID, String message) `

- newer where added using adventure api:
  - `kickPlayer(String playerName, Component message) `
  - `kickPlayer(UUID playerUUID, Component message) `

-  PubSub registration api Deprecated:
```java
/**
     * Register (a) PubSub channel(s), so that you may handle PubSubMessageEvent for it.
     *
     * @param channels the channels to register
     * @since 0.3
     * @deprecated No longer required
     */
    @Deprecated
    public final void registerPubSubChannels(String... channels) {
    }

    /**
     * Unregister (a) PubSub channel(s).
     *
     * @param channels the channels to unregister
     * @since 0.3
     * @deprecated No longer required
     */
    @Deprecated
    public final void unregisterPubSubChannels(String... channels) {
    }

```
# Contributors

* `summoncraft.us` for running this branch in production
* @SrBedrock for providing [Brazilian
Portuguese](https://en.wikipedia.org/wiki/Brazilian_Portuguese)
translation #87
 
# issues
closes #84 
closes #88 
closes #92 
closes #81
closes #93

---------

Signed-off-by: mohammed jasem alaajel <xrambad@gmail.com>
Co-authored-by: ThiagoROX <51332006+SrBedrock@users.noreply.github.com>
2024-04-28 15:29:53 +04:00
Daniël Voort
99941c733f
Use PlayerDB.co for name lookups (#82)
I noticed that currently name lookups for UUIDs that are not cached, are
not supported in RedisBungee due to Mojang removing name history.

When looking at the usages, RedisBungee internally only uses the current
name (So no need for full name history), so I moved name lookups to
[PlayerDB](https://playerdb.co/), which does not have API rate limits
unlike Mojang's API.

closes #59
2023-07-18 04:48:20 +04:00
7fb9c4689e
0.11.2 (#77)
- update gradle wrapper

- include a copy of RedisBungee LICENSE inside API resources folder.

- Fix depends issues on Older versions of Bungeecord proxy *travertine*

- Bump version 0.11.2
2023-06-03 15:30:48 +04:00
5066a18dd7
uncomment disable-kick-when-online in the config and make it false by default (#75)
closes #74
2023-05-02 20:14:58 +04:00
265933f36e
fix Velocity plugin startup / shutdown issues, java docs notes for some classes and logs for shutdown / startup (#73)
closes #71
2023-04-25 11:09:45 +04:00
mohammed Alteniji
4f43c98c87
reorder config.yml of redisbungee 2023-04-15 21:29:06 +04:00
26b58252eb
oops remove password warn from the username 2023-04-13 03:06:16 +04:00
mohammed Alteniji
73879640e5
add ability to use redisbungee with acl username (#69) 2023-04-12 22:40:01 +04:00
mohammed Alteniji
b857bdb771
update to gradle (#66) 2023-03-23 15:42:59 +04:00
441a12bb36
fix error being thrown getServerFor in Bungeecord/Velocity in the api closes #64
when plugins messing around with proxy internals (eg: limboapi) the field server in redis data of the player set to null which can become problematic for velocity due checking of null in velocity but i applied the same stuff to the bungeecord version aswell and document it in the javadocs
2023-03-17 12:15:10 +04:00
1a2459b64e
deprecated NameFetcher api 2022-12-31 07:23:35 +04:00
AlessioDP
c3888c8f65
Fix NullPointerException due plugin instance for jedis tasks in UUIDTranslator/AbstractDataManager (#57) 2022-12-25 06:26:53 +04:00
c8362a44ec
add config option to restore old kick behavior pre 0.9.0 2022-11-27 12:29:13 +04:00
31e461a11c
change url of big uuid cache 2022-11-27 12:10:29 +04:00
a9ea04c2c0
missed location were it wasn't using the constant 2022-11-24 01:41:47 +04:00
ddfc689c2d
expose CachedUUIDEntry Class 2022-11-16 11:32:20 +04:00
8318bcd1bf
update some logs in configloader 2022-11-16 08:22:30 +04:00
0b9fd6d7ff
Make sure server field is withen map than calling redis seperatly 2022-11-14 08:45:55 +04:00
a526298d1c
change one of the comments in PlayerUtils 2022-11-14 08:42:54 +04:00
c69b1e214e
add missing final keyword to PROXY_TIMEOUT var 2022-11-14 08:40:46 +04:00
e5f0075a58
add messages config, change some jedis/redis depercated apis, bump to 0.9.0, new logging from another locations handling. 2022-11-11 20:30:16 +04:00
748bc13568
Fix ssl connections on PooledConnections
useSSL in configloader wasn't passing it to the ConnectionProvider
2022-11-05 15:44:51 +04:00
5e3ce725de
Include some changes to ssl notes
and little change for compatiblity pool
2022-11-05 15:43:23 +04:00
92bb0030de
move PlayerUtils code from platforms to the api 2022-11-02 08:38:25 +04:00
0f5d5b2440
Fixed Typos caused JedisPooled to be JedisCluster withen the abstract api 2022-11-01 09:59:08 +04:00
bc266ae1fa
Update javadocs for Jedis Cluster/Pooled instances 2022-10-30 00:10:56 +04:00
8dc42d071a
Add copyright header to source code 2022-10-30 00:02:09 +04:00
71b959936e
Move cluster summoner to Provider cluster 2022-10-25 15:52:50 +04:00
a382a298a1
Make summoner create customized JedisPooled that can't be closed 2022-10-25 08:04:48 +04:00
4d58ee1742
add todo list for later into config loader 2022-10-19 07:46:59 +04:00
af4e180b2c
fix nullpointer in JedisPooledSummoner
Jedis pool when null it calls shutdown so added an check to check if its null
2022-10-17 08:27:55 +04:00
80a4791d12 api changes in events, move Listener serialization into Util class 2022-07-30 22:36:29 +04:00
17897bc112 make RedisBungeeAPI class platform dependant and make Abstract version of it 2022-07-27 17:43:51 +04:00
64af12044e Change Plugin instance of Bungeecord to RedisBungee to maintain old plugin compatibility 2022-07-26 18:42:29 +04:00
2ae9b5d480 add log option, check connection for JedisPooled 2022-07-26 17:55:16 +04:00
d77e909e7d block when exhausted, new config options for the compatibility pool max connections 2022-07-26 17:52:00 +04:00
ee76fa0b3d Change Jedis -> JedisPooled, and make tasks use UnifiedJedis
since JedisCluster, JedisPooled are Childern of UnifiedJedis
2022-07-26 17:48:00 +04:00
5a7001a68c remove else when checking if password is null 2022-07-26 15:14:14 +04:00
81a8fd218e move PlayerUtils and change the name 2022-07-26 12:49:44 +04:00
92f5e04edf change method naming of updateProxiesIds 2022-07-26 12:42:42 +04:00
e7b241edd6 git rid of lua system 2022-07-26 12:40:14 +04:00
86c6e9464d internal changes 2022-07-26 10:58:00 +04:00
1828cd854c add config option for later use 2022-07-25 20:04:21 +04:00
6910c96f67 fix mess up in API 2022-07-25 19:13:25 +04:00
8f602407b5 fix java docs again 2022-07-25 18:49:49 +04:00
2c4fc00ec3 single class for loading config 2022-07-25 16:49:57 +04:00
830077282d fix java docs 2022-07-23 08:24:03 +04:00
2b2ae88587 change RuntimeException to IllegalStateException 2022-07-23 08:21:36 +04:00
e4012a8d7b change config in readme, move config-version below 2022-07-22 16:12:56 +04:00