Skip to content

beanbeanjuice/SimpleProxyChat

Repository files navigation

SimpleProxyChat Logo

A simple plugin to allow global cross-server communication and messaging with support for LuckPerms, LiteBans, and Discord integration.

installation

Without Discord

  1. Simply place the plugin in your plugins folder on BungeeCord/Waterfall/Velocity and restart your proxy!

With Discord

  1. Go to discord.com/developers and select New Application. You can select any name you want.
  2. Go to the OAuth2 section.
  3. Go to the OAuth2 URL Generator and give it the bot scope.
  4. Under bot permissions select;
    • Manage Channels (REQUIRED: General Permissions)
    • Send Messages (REQUIRED: Text Permissions)
    • Manage Messages (REQUIRED: Text Permissions)
    • Read Message History (REQUIRED: Text Permissions)
    • + Any others that you want to add...
  5. Copy the Generated URL at the bottom.
  6. Paste the generated URL into a web browser.
  7. Invite the bot to your server.
  8. Go back to discord.com/developers.
  9. Select your bot.
  10. Click on bot.
  11. Click Reset Token and copy the token somewhere safe.
  12. Scroll down to Privileged Gateway Intents.
  13. Select SERVER MEMBER INTENT and MESSAGE CONTENT INTENT.
  14. Place the plugin in the plugins folder on BungeeCord/Velocity.
  15. Start your server once fully, then stop it. There will be errors, this is normal.
  16. In the generated ProxyChat/config.yml file, paste your Bot Token and choose the appropriate channel you want messages being sent to.
  17. Restart your proxy!

features

  • Global Network Chat
  • LuckPerms Support
  • LiteBans Support
  • NetworkManager Support
  • Discord Support
  • Velocity/Waterfall/BungeeCord Support
  • Colored Chat
  • Cross-Server Communication

configuration

config.yml

# ==========================================================
#                       INFORMATION
#                 HEX Values are Supported
#  Example: <#FFFFFF>Some text</#FFFFFF> this is a message!
#         Supports Mini-Message/Legacy Color Codes
# ==========================================================

# True if you will be using Discord. The reload command does not work with this.
use-discord: false

# Discord Bot Token (IGNORE IF use_discord = false). The reload command does not work with this.
BOT-TOKEN: "TOKEN_HERE"

# Channel to send Discord messages to (IGNORE IF use_discord = false). The reload command does not work with this.
CHANNEL-ID: "GLOBAL_CHANNEL_ID"

bot-activity:
  # Valid Types: PLAYING, STREAMING, LISTENING, WATCHING, COMPETING
  type: "COMPETING"
  text: "SimpleProxyChat by beanbeanjuice"

# The amount of seconds to check if a server is online/offline.
# Smaller numbers can cause errors. Beware.
server-update-interval: 3

# Use this if you want to change the default aliases.
# It MUST be the same name you have in your bungee/velocity config.
# Simply set it to disabled: disabled to disable it.
aliases:
  ServerInConfigExample: ServerAliasExample
  hub: Hub1
  smp: smp1

# Whether to use the permission system.
# simpleproxychat.read.chat - Read chat messages.
# simpleproxychat.read.join - Read join messages.
# simpleproxychat.read.leave - Read leave messages.
# simpleproxychat.read.fake - Read the fake join/leave messages. Players must also have the REAL join/leave permission.
# simpleproxychat.read.switch - Read switch messages.
# simpleproxychat.read.update - ALWAYS active whether use-permissions is false or not.
# simpleproxychat.reload - ALWAYS Active whether use-permissions is false or not.
use-permissions: false

# Only messages that start with this character will be sent through the plugin.
# Set to '' to disable.
# Example: If it is set to '$', then when a player sends $hello, it will be sent through the proxy.
proxy-message-prefix: ''

# Whether to send if the statuses of the servers connected to the proxy when the proxy starts up.
# THIS IS FOR DISCORD MESSAGES ONLY.
use-initial-server-status: true

# Whether to send a fake join/leave message when vanishing/unvanishing.
use-fake-messages: true

# Format: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
# Timezone: https://www.joda.org/joda-time/timezones.html
timestamp:
  # If your server is prone to getting off-sync on the time you can use an API.
  # WARNING: Using the API will make messages somewhat longer to send.
  # Additionally, the maximum accuracy will only be up to 1 minute, rather than seconds.
  use-api: false
  format: "hh:mm a"
  timezone: "America/Los_Angeles"

# DO NOT TOUCH THIS
file-version: 9

messages.yml

# ==========================================================
#                       INFORMATION
#                 HEX Values are Supported
#  Example: <#FFFFFF>Some text</#FFFFFF> this is a message!
#         Supports Mini-Message/Legacy Color Codes
# ==========================================================

# Minecraft Stuff
minecraft:
  join:
    use: true
    message: "&e%player% &ahas joined the network. (%server%)"
  leave:
    use: true
    message: "&e%player% &chas left the network. (%server%)"
  message: "&8[&3%server%&8] &e%player% &9» &7%message%"
  discord:
    message: "**%server%** %player% » %message%"
    embed:
      use: false
      title: "[%server%] %player%"
      message: "%message%"
      color: "#FFC0CB"
      use-timestamp: true
  switch:
    use: true
    default: "&e%player% &7moved from &c%from% &7to &a%to%&7."
    no-from: "&e%player% &7moved &7to &a%to%&7."
  successful-reload: "&aThe plugin has been successfully reloaded!"
  no-permission: "&cSorry, you do not have permission to run this command."

# Discord Stuff
discord:
  join:
    use: true
    message: "%player% has joined the network. (%server%)"
    use-timestamp: true
  leave:
    use: true
    message: "%player% has left the network. (%server%)"
    use-timestamp: true
  switch:
    use: true
    message: "%player% has switched from %from% to %to%."
    use-timestamp: true
  minecraft-message: "&8[&bDiscord&8] %role% &f%user% &9» &7%message%"
  topic:
    online: "There are %online% players online."
    offline: "The proxy is offline."
  proxy-status:
    enabled: "✅ Proxy enabled!"
    disabled: "⛔ Proxy disabled."
    title: "Server Status"
    message: "Status: "
    online: "Online ✅"
    offline: "Offline ⛔"
    use-timestamp: true

# Prefix for the plugin. %plugin-prefix% usable anywhere.
plugin-prefix: "&8[<bold><rainbow>SimpleProxyChat&r&8] "

# The message for any updates that are sent.
# The plugin-prefix is automatically appended to the beginning of this message.
update-message: "&7There is an update! You are on &c%old%. New version is &a%new%&7: &6%link%"

# DO NOT TOUCH THIS
file-version: 5

commands

  • /spc-reload - Reloads the config files.

permissions

  • simpleproxychat.read.chat - Read chat messages.
  • simpleproxychat.read.join - Read join messages.
  • simpleproxychat.read.leave - Read leave messages.
  • simpleproxychat.read.fake - Read fake join/leave messages. Must have the real permission too.
  • simpleproxychat.read.switch - Read switch messages.
  • simpleproxychat.read.update - Read update notifications.
  • simpleproxychat.reload - Reload the config.

placeholders

  • %plugin-prefix% - The plugin's designated prefix.
  • %server% - The current connected server. Uses the alias if one is specified.
  • %original_server% - Same as %server%, but does not use the alias.
  • %to% - The current connected server. Uses the alias if one is specified.
  • %original_to% - Same as %to%, but does not use the alias.
  • %from% - The server the player just disconnected from. Uses the alias if one is specified.
  • %original_from% - Same as %from%, but does not use the alias.
  • %player% - The player's Minecraft username.
  • %user% - The player's Discord username.
  • %role% - The player's Discord role.
  • %prefix% - The player's prefix. LuckPerms Only
  • %suffix% - The player's suffix. LuckPerms Only
  • %message% - The player's message.
  • %epoch% - This get's the current time (in milliseconds). Formats can be used like this. An example would be <t:%epoch%>. Discord Only
  • %time% - Similar to %epoch%, but uses a special formatting and timezone found in config.yml. Discord and Minecraft

caveats

  1. As of right now, vanish support is only available on BungeeCord/Waterfall. The plugin will still function as normal, but if you go into vanish then it won't send a fake join/leave message.
  2. In order for prefixes and suffixes to work, you must have LuckPerms installed on the proxy. Then, you can use %prefix% and %suffix%.
  3. %epoch% and the timestamps only work in certain places on Discord. As an alternative, you can select some of the embeds to have use-timestamp: true. This is out of my control sadly... 😔

statistics

Velocity Statistics

velocity statistics

BungeeCord/Waterfall Statistics

bungeecord/waterfall statistics