Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit b6572c7

Browse files
authored
Create README.md
1 parent a141c4c commit b6572c7

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Bungee Addon for LuaLink
2+
3+
The Bungee addon provides functionality to send players from one server to another using LuaLink. This functionality is particularly useful for networked Minecraft servers running on platforms like Bungeecord, Waterfall, or Velocity.
4+
5+
## Usage
6+
7+
1. **Importing the Addon:**
8+
9+
To use the Bungee addon, first obtain the addon instance:
10+
11+
```lua
12+
local Bungee = addons.get("Bungee")
13+
```
14+
15+
2. **Sending a Player to Another Server:**
16+
17+
Use the `sendPlayer` function to teleport a player to another server:
18+
19+
```lua
20+
Bungee.sendPlayer(playerObject, "SERVER_NAME")
21+
```
22+
23+
Replace `"SERVER_NAME"` with the target server's name where you want to send the player.
24+
25+
## Compatibility
26+
27+
- **Velocity:**
28+
For Velocity support, ensure that Bungee messaging channels are enabled in the Velocity configuration.
29+
30+
## Example
31+
32+
Here's a simple example demonstrating how to send a player to another server:
33+
34+
```lua
35+
-- Import the Bungee addon
36+
local Bungee = addons.get("Bungee")
37+
38+
script.registerSimpleCommand(function(sender, args)
39+
if not utils.instanceOf(sender, "org.bukkit.entity.Player") then
40+
sender:sendRichMessage("<red>This command can only be ran by a player!")
41+
end
42+
Bungee.sendPlayer(sender, "Hub") -- Sends the sender to a server with the name "Hub"
43+
end, {
44+
name = "hub"
45+
})

0 commit comments

Comments
 (0)