44![ badge] ( https://img.shields.io/github/downloads/ForestTechMC/ForestRedisAPI/total )
55![ badge] ( https://img.shields.io/github/last-commit/ForestTechMC/ForestRedisAPI )
66![ badge] ( https://img.shields.io/badge/platform-spigot%20%7C%20bungeecord-lightgrey )
7- ![ badge] ( https://img.shields.io/discord/896466173166747650?label=discord )
7+ [ ![ badge] ( https://img.shields.io/discord/896466173166747650?label=discord )] ( https://discord.gg/2PpdrfxhD4 )
8+ [ ![ badge] ( https://img.shields.io/github/license/ForestTechMC/ForestRedisAPI )] ( https://github.com/ForestTechMC/ForestRedisAPI/blob/master/LICENSE.txt )
89
910Simple Spigot&Bungee Redis API based on Jedis library. ForestRedisAPI allows developers to comfortably maintain
1011communication between servers using simple API calls and Events. ** Supports both BungeeCord and Spigot servers.**
1112
13+ ## Table of contents
14+
15+ * [ Getting started] ( #getting-started )
16+ * [ Subscribing the channel] ( #subscribing-the-channel )
17+ * [ Publishing messages / objects] ( #publishing-messages--objects )
18+ * [ Events & incoming messages] ( #events--incoming-messages )
19+ * [ Standalone usage] ( #standalone-usage )
20+ * [ License] ( #license )
21+
1222## Getting started
1323
14- Make sure the server has ForestRedisAPI plugin installed. Otherwise, look at ** [ Standalone Usage] ( https://github.com/ForestTechMC/ForestRedisAPI #standalone-usage-without-forestredisapi-installed ) ** .
24+ Make sure the server has ForestRedisAPI plugin installed. Otherwise, look at ** [ Standalone Usage] ( #standalone-usage ) ** .
1525
1626### Add ForestRedisAPI to your project
1727
1828[ ![ badge] ( https://jitpack.io/v/ForestTechMC/ForestRedisAPI.svg )] ( https://jitpack.io/#ForestTechMC/ForestRedisAPI )
1929
2030First, you need to setup the dependency on the ForestRedisAPI. Replace ** VERSION** with the version of the release.
2131
22- #### Maven
32+ <details >
33+ <summary>Maven</summary>
2334
2435``` xml
2536<repositories >
@@ -38,8 +49,10 @@ First, you need to setup the dependency on the ForestRedisAPI. Replace **VERSION
3849 </dependency >
3950</dependencies >
4051```
52+ </details >
4153
42- #### Gradle
54+ <details >
55+ <summary>Gradle</summary>
4356
4457``` gradle
4558allprojects {
@@ -53,19 +66,40 @@ dependencies {
5366 implementation 'com.github.ForestTechMC:ForestRedisAPI:VERSION'
5467}
5568```
69+ </details >
5670
5771### Plugin configuration
5872
5973You need to (soft)depend on ForestRedisAPI in order to work properly. Choose depend(s) for mandatory usage of the
6074ForestRedisAPI or softdepend(s) for optional usage.
6175
62- for ** plugin.yml** : ` depend: [ForestRedisAPI] ` or ` softdepend: [ForestRedisAPI] `
76+ <details >
77+ <summary>plugin.yml (Spigot)</summary>
6378
64- for ** bungee.yml** : ` depends: [ForestRedisAPI] ` or ` softDepends: [ForestRedisAPI] `
79+ ``` yaml
80+ # Required dependency
81+ depend : [ForestRedisAPI]
82+ # Optional dependency
83+ softdepend : [ForestRedisAPI]
84+ ` ` `
6585
66- ## Subscribing to channel
86+ </details>
6787
68- To receive data from Redis server, you need to subscribe to selected channels. You can do it simply just by calling:
88+ <details>
89+ <summary>bungee.yml (BungeeCord)</summary>
90+
91+ ` ` ` yaml
92+ # Required dependency
93+ depends : [ForestRedisAPI]
94+ # Optional dependency
95+ softDepends : [ForestRedisAPI]
96+ ` ` `
97+
98+ </details>
99+
100+ ## Subscribing the channel
101+
102+ To receive data from Redis server, you need to subscribe selected channels. You can do it simply just by calling:
69103
70104` ` ` java
71105// You can check if the channel is subscribed or not
@@ -136,6 +170,9 @@ required data.
136170
137171This approach however ** IS NOT RECOMMENDED** unless you know what you're doing!
138172
173+ <details >
174+ <summary>Example plugin main class</summary>
175+
139176``` java
140177import cz.foresttech.forestredis.shared.IForestRedisPlugin ;
141178import org.bukkit.plugin.java.JavaPlugin ;
@@ -203,6 +240,7 @@ public class MyExamplePlugin extends JavaPlugin implements IForestRedisPlugin {
203240 }
204241}
205242```
243+ </details >
206244
207245## License
208246ForestRedisAPI is licensed under the permissive MIT license. Please see [ ` LICENSE.txt ` ] ( https://github.com/ForestTechMC/ForestRedisAPI/blob/master/LICENSE.txt ) for more information.
0 commit comments