Coder Social home page Coder Social logo

smuddgge / leaf Goto Github PK

View Code? Open in Web Editor NEW
39.0 2.0 8.0 1.42 MB

Velocity Proxy Plugin | Friends | StaffChat | StaffList | ServerList | Report | Send | Alert | And more!

Home Page: https://smuddgge.gitbook.io/leaf-3.0.1/

License: Apache License 2.0

Java 100.00%
minecraft velocity-plugin velocity velocitypowered

leaf's Introduction

CodeFactor Github All Releases GitHub issues GitHub pulls GitHub version

#  __         ______     ______     ______
# /\ \       /\  ___\   /\  __ \   /\  ___\
# \ \ \____  \ \  __\   \ \  __ \  \ \  __\
#  \ \_____\  \ \_____\  \ \_\ \_\  \ \_\
#   \/_____/   \/_____/   \/_/\/_/   \/_/
#
# Velocity Proxy Server Plugin
# Author : Smudge

BStats

leaf's People

Contributors

4drian3d avatar itsnicecraft avatar lorddorkious avatar oakloaf avatar santiomc avatar smuddgge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

leaf's Issues

Ping Command

/ping command to check on your or other people's ping would be cool, would save me 1 plugin :)

Friend mutes

Currently players can still used friend messaging when muted in servers.

Tasks

  • Add option to mute a player.

Friend Gift Command Type

Look into adding a gift command.
Letting players give other players gifts.

  • Friend gift command type.

Discord Link

Tasks

  • Reports
  • Alerts
  • Staff chat
  • Event logging

Friends System

Commands

  • /friends request <player> [optional message] Request someone to be your friend.
  • /friends list Opens a GUI of all your lovely friends.
  • /friends list [optional player for mods] Opens a GUI of all your lovely friends.
  • /friends unfriend <player> Remove a friend.
  • /friends requests Opens a GUI to veiw friend requests. Click to accept.
  • /friends settings Opens a GUI to change settings.

Friend Settings

  • Toggle notifications when a friend joins the proxy
  • Toggle notifications when a friend joins a server
  • Toggle friend requests

Friend messaging

  • /friends message [player] [message] message subcommand type
  • /friends reply [message] reply subcommand type

Sound options for commands

  • When a command is executed a sound is played.

For example players could get a ping when a report is made.

Various Feature Requests [Makes the core feel more whole]

All of these requests are optional and to your discretion; however, I find Leaf incredibly useful for my production networks and would like to be rid of some baselevel proxy plugins that could be better implemented into Leaf.

/hub (or /lobby command with customized aliases)
This feature would also support multiple assigned lobbies, rather than simply one.
For instance:

  • Hub-1
  • Hub-2
    Instead of simply sending that given user to the same lobby until it's full, load balance users and determine which lobby has the lowest number of players for sending.
    Ex.: Hub-1 has 1 player, Hub-2 has 0 players: send {player} to Hub-2.
    Implement command disabling for this feature, so they cannot run /hub (and aliases) in that given hub.

Load balancing feature on user join
Similar to the feature above, allow for a feature that automatically sends users to the lobby with the lowest amount of players. Multiple lobbies once again can be specified.

Ping/server brand feature [This is possible; VelocityTools contains this, as an example]
Customization of the server brand would be the perfect tool for networks wishing to hide away their software or just would be a nice bonus feature for users wanting to make things look a bit more "appetizing."
Allow for branding to contain placeholders that pulls the brand from the server, in which can be removed and put into hard text; allow for HEX + base color configuration.

Messages logging in database

Add messages to the database.

  • Add messages to the database.
  • Add option to disable.
  • Add limit to the amount of messages saved.
  • Add command type to find a conversation.

Default StaffChat Formatting Breaks on 1.8

Leaf Version:
3.7.0

Description of the Bug
The formatting of staffchat behaves wrongly on 1.8 and breaks, still sends the message but with "&#c0fce6" before
image

Console Errors

Paste your error here if you get any errors.

Join command enhancement

  • Add an option for multiple servers.
  • Add an option for load balancing based on the lowest player count.

Branching from #26

Info - Missing Character

Leaf Version: 3.3.0

Description of the Bug

  • Last character of strings in info type is removed when sending message

Console Errors
none

Join command type

Example : Allows you to replace /server <name> with /<name>
The command connects you to a server.

  • Join command type

Struggling to detect online players

Leaf Version: 3.3.0

Description of the Bug
When doing /msg it often doesn't show a player and when you run the commands says "Player is not online", you also cannot see that person on /friends online I am not sure if this is just for single users or for a larger number of players as am just testing with myself and one other person

Console Errors

none

Friends System and Messaging System

Planned Feature Set - Friends & Cross Server Messaging

  • Simple friending system
    -> PremiumVanish/VelocityVanish/Vanish compatibility
    -> Server filter (servers friends can actually been seen on) and status system (you can hide yourself as offline)
    -> Toggling friend requests
    -> Configurable join / leave messages
    -> VelocityGUI API used for GUI???
    -> Future Partying???
  • Modular cross-server messaging system (/msg, /msgtoggle, /r)
    -> Configurable along with friending
    -> Message toggling, settings for friend-only messagings

Future partying plan set?

Smudge Edit

From your request, i have narrowed it down to the following :3

Cross Server Messaging

  • Message command
  • Reply command

Let me know if there are any more you would like to be added

Require command type option

Example

command:
  type: "info"
  enabled: true
  name: "hello"
  message: "world"
  # Require command type option.
  require:
    # Requires this permission if in the servers listed.
    permission_bypass: 
    - ServerName1
    - ServerName2

This command type option will allow operators to require different permissions on servers.
An example of this could be stopping players from running /hub in the hub. You would do this by requiring permission.

require:
  bypass_permission:
  - hub
  • Require command type option.

Branching from #26

MongoDB custom database name doesn't work

Using latest version on Velocity, configured custom database name, but actually in MongoDB all collections are stored in Default database. My config:

#  __         ______     ______     ______
# /\ \       /\  ___\   /\  __ \   /\  ___\
# \ \ \____  \ \  __\   \ \  __ \  \ \  __\
#  \ \_____\  \ \_____\  \ \_\ \_\  \ \_\
#   \/_____/   \/_____/   \/_/\/_/   \/_/
#
# Author : Smudge

# --- Changing these values requires a proxy restart. ---
enabled: true
debugmode: false

# SQLITE DATABASE
type: MONGO

# # MONGO DATABASE
connection_string: "mongodb://localhost:27017/Velocity_Leaf?retryWrites=true&w=majority&uuidRepresentation=javaLegacy"
database_same: "Velocity_Leaf"

# The maximum amount of history that will
# be saved in the database per player.
player_history_limit: 10

# The maximum number of messages that will
# be saved in the database per player.
message_limit: 50

I was tried to don't specify database name Velocity_Leaf in connection_string, but result is the same

Disconnection event spam when servers are not set

[03:36:47 ERROR]: Couldn't pass DisconnectEvent to leaf
java.lang.NullPointerException: Cannot invoke "com.velocitypowered.api.proxy.server.RegisteredServer.getServerInfo()" because "server" is null
        at com.github.smuddgge.leaf.datatype.User.addHistory(User.java:191) ~[?:?]
        at com.github.smuddgge.leaf.events.EventManager.onPlayerLeave(EventManager.java:56) ~[?:?]
        at com.github.smuddgge.leaf.Leaf.onPlayerLeave(Leaf.java:108) ~[?:?]
        at com.github.smuddgge.leaf.Lmbda$14.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[server.jar:3.1.2-SNAPSHOT (git-8deb0ff7-b198)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[server.jar:3.1.2-SNAPSHOT (git-8deb0ff7-b198)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[server.jar:3.1.2-SNAPSHOT (git-8deb0ff7-b198)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

This error is sent whenever a server isn't specified when someone disconnects (unconfigured server)

[BUG] Protocolize Error

Leaf Version: 3.0.0

Description of the Bug
No request to download protocolize when it's missing for the GUIs

Console Errors

Caused by: java.lang.RuntimeException: Unable to invoke command adminmenu for [connected player] SkipTurn (/69.118.50.65:65024)
        at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:226) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:251) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 3 more
Caused by: java.lang.NoClassDefFoundError: dev/simplix/protocolize/api/inventory/Inventory
        at com.github.smuddgge.leaf.inventorys.InventoryInterface.open(InventoryInterface.java:39) ~[?:?]
        at com.github.smuddgge.leaf.commands.types.Inventory.onPlayerRun(Inventory.java:51) ~[?:?]
        at com.github.smuddgge.leaf.commands.Command.onPlayerRun(Command.java:123) ~[?:?]
        at com.github.smuddgge.leaf.commands.Command.execute(Command.java:221) ~[?:?]
        at com.github.smuddgge.leaf.commands.Command.execute(Command.java:26) ~[?:?]
        at com.velocitypowered.proxy.command.registrar.InvocableCommandRegistrar.lambda$createLiteral$1(InvocableCommandRegistrar.java:81) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:213) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:251) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 3 more
Caused by: java.lang.ClassNotFoundException: dev.simplix.protocolize.api.inventory.Inventory
        at com.github.smuddgge.leaf.inventorys.InventoryInterface.open(InventoryInterface.java:39) ~[?:?]
        at com.github.smuddgge.leaf.commands.types.Inventory.onPlayerRun(Inventory.java:51) ~[?:?]
        at com.github.smuddgge.leaf.commands.Command.onPlayerRun(Command.java:123) ~[?:?]
        at com.github.smuddgge.leaf.commands.Command.execute(Command.java:221) ~[?:?]
        at com.github.smuddgge.leaf.commands.Command.execute(Command.java:26) ~[?:?]
        at com.velocitypowered.proxy.command.registrar.InvocableCommandRegistrar.lambda$createLiteral$1(InvocableCommandRegistrar.java:81) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:213) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:251) ~[velocity.jar:3.2.0-SNAPSHOT (git-01f1e1a9-b243)]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 3 more

Teleport Command Type

Adds a /go [ign] command which simply allows someone to go to the server of the player provided! Rather than having to do /find [ign] then using the /server [server name] command

Change commands file to directory to sort commands.

Server operators can still choose for all the commands to be one file.
However, it provides more opportunities for organisations when there are more commands.

Optional Tasks

  • Switch commands to a directory.

Ping/Server brand feature

[This is possible; VelocityTools contains this, as an example]
Customization of the server brand would be the perfect tool for networks wishing to hide away their software or just would be a nice bonus feature for users wanting to make things look a bit more "appetizing."
Allow for branding to contain placeholders that pulls the brand from the server, in which can be removed and put into hard text; allow for HEX + base color configuration.

Branching from #26

History command

  • History command type

Used to show what servers a player has been on at what times.

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.