Giter VIP home page Giter VIP logo

gchat's Introduction

A fork of gChat

A simple global chat plugin for Velocity, based on lucko/gChat forked from N3FS/gChat.

Features

  • Global chat channel throughout your network
  • Placeholders to customize chat formatting
  • Multiple formats selected using weight
  • API for adding additional placeholders, or listening to chat events

Placeholders

Standard Placeholders

These placeholders are provided by gChat.

  • {username} or {name} - the players username
  • {server_name} - the name of the players current server
  • {uuid} - the players unique id
  • {display_name} - the players display name
  • {message} - the chat message being sent by the player.

Plugin Hooks

gChat also provides hooks for the following plugins.

  • LuckPerms - gChat will hook with LuckPerms if it's installed on the proxy, and allows you to use any of the placeholders listed here.

Configuration

# gChat Configuration

# If a player doesn't have permission for any of the formats, should the chat message be passed through to the
# backend server or just ignored.
passthrough: true

# if permissions are required to send/receive chat messages
require-permission:
  # if true, players will need to have the "gchat.send" permission to send messages
  send: false

  # the message to send if a player doesn't have permission to chat
  # will only be sent if the 'passthrough' option below is false
  send-fail: "&cYou do not have permission to use the chat!"

  # if true, players will need to have the "gchat.receive" permission to receive messages
  receive: false

  # if a player doesn't have permission to send a message, should it be passed through to the backend server?
  passthrough: true

# Defines the formats to be used.
formats:

  # a default format for everyone on the server
  everyone:

    # the priority of the format. higher number = higher priority.
    # if a user has permission for multiple formats, the one with the highest priority will be used.
    priority: 100

    # if this format requires a permission.
    # permissions are in the format: "gchat.format.<format name>"
    # for example: "gchat.format.everyone"
    check-permission: true

    # the actual format for the chat message
    format: "{luckperms_prefix}{name}{luckperms_suffix}{message}"

    format-extra:

      # the format for the message tooltip
      hover: ""

      # what should happen when the message is clicked?
      click:

        # type: can be either "none", "suggest_command", "run_command" or "open_url"
        type: "none"

        # the value to suggest or run.
        value: ""

  # another format without all the comments!
  staff:
    priority: 150
    check-permission: true
    format: "* {luckperms_prefix}{name}{luckperms_suffix}&c: &b&l{message}"
    format-extra:
      hover: |-
        &e{name} is a staff member!

        &6Feel free to message them any time, by
        &6clicking this message!
      click:
        type: suggest_command
        value: "/msg {name} "

gchat's People

Contributors

jackmawer avatar koxsosen avatar lucko avatar mdcfe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

erik1000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.