2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-22 20:28:00 +00:00
Commit Graph

67 Commits

Author SHA1 Message Date
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
fa6bcf7cb8 update to 3.3.0-SNAPSHOT velocity 2024-04-12 19:34:20 +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
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
9050264b4d
make velocity ping event execute as Last to prevent motd plugins changing online players 2023-04-10 01:48:20 +04:00
mohammed Alteniji
47127c8520
Javadocs links update (#67) 2023-03-25 19:46:22 +04:00
mohammed Alteniji
b857bdb771
update to gradle (#66) 2023-03-23 15:42:59 +04:00
0f0f707ef7
bump version 2023-03-17 12:23:46 +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
冰砚炽
0534970368
Fix PlayerList not returning server name when it is not ALL (#62) 2023-01-31 12:40:06 +04:00
20f9143ea5
bump version 2022-12-31 07:26:05 +04:00
1a2459b64e
deprecated NameFetcher api 2022-12-31 07:23:35 +04:00
c8362a44ec
add config option to restore old kick behavior pre 0.9.0 2022-11-27 12:29:13 +04:00
ae6961ef24
bump version 2022-11-16 08:22:57 +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
92bb0030de
move PlayerUtils code from platforms to the api 2022-11-02 08:38:25 +04:00
d8c21edc7a
Bump version to 0.8.1 2022-11-02 07:58:13 +04:00
8dc42d071a
Add copyright header to source code 2022-10-30 00:02:09 +04:00
28419b3168
remove git versions 2022-10-25 08:18:30 +04:00
74ed18e9b3
Make sure to run LoginEvent Last fixes #48 2022-09-14 08:09:43 +04:00
80a4791d12 api changes in events, move Listener serialization into Util class 2022-07-30 22:36:29 +04:00
fdd537b276 fix javadocs again, add getServerFor in velocity 2022-07-27 19:06:57 +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
ee76fa0b3d Change Jedis -> JedisPooled, and make tasks use UnifiedJedis
since JedisCluster, JedisPooled are Childern of UnifiedJedis
2022-07-26 17:48:00 +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
6910c96f67 fix mess up in API 2022-07-25 19:13:25 +04:00
2c4fc00ec3 single class for loading config 2022-07-25 16:49:57 +04:00
11e867730c this has to be false, if absent 2022-07-23 10:31:12 +04:00
9ceccb6dd2 fix #38
somehow pull request #39 forgotten to add thrid Legacy channel
2022-07-22 23:52:15 +04:00
dea384a203 change wrong default max connection from 8 to 10 2022-07-22 17:08:51 +04:00
2c8c5fc1cf as new config, check if ye wana load legacy commands 2022-07-22 16:10:06 +04:00
5c6cf405fa config changes 2022-07-22 15:12:32 +04:00
5d1167c20f change original author name, and include it in velocity version 2022-07-21 16:37:32 +04:00
f274301036 add firePayload for cleanup as its used in integerty check 2022-07-21 09:36:10 +04:00
c787c76eca fix null being passed into jedis on ServerConnectedEvent 2022-07-20 13:25:26 +04:00
9da5845da3 move Heartbeat task into its own class 2022-07-20 13:21:24 +04:00
4d3f1a551e General improvements, remove player cleanup from RedisUtils class and bug fixes
fixed bug where PlayerNetoworkJoin is not fireing, and also fixed wrong arguments being passed on server change network event, Moved Payload creation to it own Util class, Remove player creation from RedisUtils class and move it to GenericPlayerUtils, and also renamed Bungeecord/Velocity Player Util classes to <PLATFORM>PlayerUtils.java, removed the use of reflection to create event instances
2022-07-20 12:39:10 +04:00
c207b4a0a2 oops, removed leftover debug stuff 2022-07-19 15:36:42 +04:00
c848126aa7 Implement network kick 2022-07-19 15:30:45 +04:00
f722b8c9d3 fix glist command when UUID to name translation fails by returning the uuid 2022-07-19 07:41:21 +04:00
d806bc2d41 reduce integrity check to run from 1 min to 30 seconds 2022-07-19 07:21:17 +04:00
2e8342f5c3 serverToPlayers was getting injected with null values as a server 2022-07-19 07:19:32 +04:00
aff185a85b last bug was caused by confusion due Proxy Called server in some cases Which resulted in new API methods and some refactor 2022-07-17 15:38:00 +04:00
482dfc5141 oops, fixed bug where player servers would return the proxy than server 2022-07-17 15:14:46 +04:00
6a6e303334 updated config, added supported for velocity 2022-07-17 09:51:24 +04:00
38de948c6b updated bungeecord to support Redis cluster 2022-07-17 07:41:18 +04:00