Set permission for /reloadredis, so it doesn't appear in /? for players

This commit is contained in:
Govindas 2021-12-13 12:00:27 +02:00
parent b466d27dc1
commit b9d74c14dd
3 changed files with 33 additions and 17 deletions

View File

@ -17,7 +17,7 @@ Redis Message:
on redis message: on redis message:
if redis channel is "world": if redis channel is "world":
broadcast "%redis message% %redis channel% %redis message date%" broadcast "%redis message% %redis channel% %redis message date%"
command /sendredis <text> <text>: command /sendredis <text> <text>:
usage: /sendredis <message> <channel> usage: /sendredis <message> <channel>
trigger: trigger:
@ -41,7 +41,7 @@ Syntax:
variable[s] %strings% in [redis] [channel] %string% variable[s] %strings% in [redis] [channel] %string%
``` ```
There is only one command: /reloadredis it fully reloads the configuration, you can reload IP, password, channels and everything else. There is only one command: **/reloadredis** it fully reloads the configuration, you can reload IP, password, channels and everything else.
You only need to have matching configuration in every server for communication and a Redis server to connect to. I recommend using VPS for hosting redis server, I personally use VPS from humbleservers.com. You only need to have matching configuration in every server for communication and a Redis server to connect to. I recommend using VPS for hosting redis server, I personally use VPS from humbleservers.com.
@ -51,33 +51,48 @@ Redis:
#a secure password that cannot be cracked, please change it! #a secure password that cannot be cracked, please change it!
#it is also recommended to firewall your redis server with iptables so it can only be accessed by specific IP addresses #it is also recommended to firewall your redis server with iptables so it can only be accessed by specific IP addresses
Password: "yHy0d2zdBlRmaSPj3CiBwEv5V3XxBTLTrCsGW7ntBnzhfxPxXJS6Q1aTtR6DSfAtCZr2VxWnsungXHTcF94a4bsWEpGAvjL9XMU" Password: "yHy0d2zdBlRmaSPj3CiBwEv5V3XxBTLTrCsGW7ntBnzhfxPxXJS6Q1aTtR6DSfAtCZr2VxWnsungXHTcF94a4bsWEpGAvjL9XMU"
#hostname of your redis server, you can use free redis hosting (search for it online) if you do not have the ability to host your own redis server
#redis server is very lightweight, takes under 30 MB of RAM usually
Host: "127.0.0.1" Host: "127.0.0.1"
#must be 2 or higher, if you set to lower, the addon will automatically use 2 as a minimum #must be 2 or higher, if you set to lower, the addon will automatically use 2 as a minimum
#do not edit MaxConnections if you do not know what you're doing
#it is only useful to increase this number to account for PING between distant servers and when you are sending a lot of messages constantly
MaxConnections: 2 MaxConnections: 2
#the default Redis port #the default Redis port
Port: 6379 Port: 6379
#time out in milliseconds, how long it should take before it decides that it is unable to connect when sending a message #time out in milliseconds, how long it should take before it decides that it is unable to connect when sending a message
#90000 = 90 seconds #9000 = 9 seconds
TimeOut: 90000 TimeOut: 9000
#also known as SSL, only use this if you're running Redis 6.0.6 or higher, older versions will not work correctly #also known as SSL, only use this if you're running Redis 6.0.6 or higher, older versions will not work correctly
#it encrypts your traffic and makes data exchange between distant servers completely secure #it encrypts your traffic and makes data exchange between distant servers secure
useTLS: false useTLS: false
#may be useful if you cannot use TLS due to use of older version of Redis #EncryptMessages may be useful if you cannot use TLS due to use of older version of Redis or if you're paranoid about privacy and want to double encrypt your messages
#however this will not encrypt the initial authentication password, only the messages sent #however this will not encrypt the initial authentication password, only the messages sent (use TLS for initial authentication password encryption)
#it uses AES-128 SIV encryption which is secure enough for this
#the encryption configuration must be the same across all servers in order to communicate
#use 16 characters long key for AES-128 encryption
#32 characters long key for AES-256 encryption
#AES-128 is faster, but less secure (but it is not crackable by today's technology as of 2020, may be crackable by quantum computers)
#the AES implementation used in RediSkript uses SIV mode, which makes the same key resistant to cracking for a big count of messages without the need of changing the key very often
EncryptMessages: true EncryptMessages: true
#EncryptionKey and MacKey must be different
EncryptionKey: "16CHARACTERS KEY" EncryptionKey: "16CHARACTERS KEY"
MacKey: "16CHARACTERS KEY" MacKey: "16CHARACTERS KEY"
#the channels from which this server can receive messages #the channels from which this server can receive messages
#you can always send messages to all channels! #you can always send messages to all channels!
#you can add as many channels as you wish! #you can add as many channels as you wish!
#ideal setup is having one global channel and having one channel that represents server name, so you know who to send messages to
#then a few other utility channels up to your needs
Channels: Channels:
- "Channel1" - "global"
- "Channel2" - "servername"
- "Channel3" - "Channel3"
``` ```
## YourKit ## YourKit
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/) and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/). YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/) and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).

View File

@ -67,16 +67,16 @@
</exclusions> </exclusions>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.destroystokyo.paper</groupId> <groupId>org.spigotmc</groupId>
<artifactId>paper-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version> <version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>redis.clients</groupId> <groupId>redis.clients</groupId>
<artifactId>jedis</artifactId> <artifactId>jedis</artifactId>
<version>3.6.1</version> <version>3.7.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.limework</groupId> <groupId>net.limework</groupId>
@ -85,4 +85,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -6,4 +6,5 @@ api-version: 1.13
depend: [Skript] depend: [Skript]
commands: commands:
reloadredis: reloadredis:
description: "Reload redis configuration & restart the connection." description: "Reload redis configuration & restart the connection."
permission: reload.redis