Coder Social home page Coder Social logo

bat's Introduction

bat

Basic, awesome TAB plugin.

Installation

Requirements

  • Java 17+
  • The latest development version of Velocity (This plugin does not work on the Stable version!)
  • Git (This is only required if you intend on cloning the repository through your Terminal)

Compilation

  • Clone this repository to a directory of your choice through running git clone https://github.com/NearVanilla/bat.git in your terminal. Alternatively, you can download this repository as a ZIP at the top of this page.
  • Change your directory to the bat folder through running cd bat
  • Run gradlew build to compile the project (Ensure you have the correct version of Java).
  • Navigate to the libs folder inside of the newly created build folder in your File Explorer.
  • Drag the bat-velocity.jar file into the plugins folder of your Velocity Server.
  • If you do not have a plugins/bat folder, then start your Velocity server to generate the default configuration.
  • Configure bat to your liking!

Placeholders

By default, bat provides a set of placeholders using MiniMessage's template system.

<date>, <time>, and <datetime> are parsed using Java's SimpleDateFormat, meaning that the players will be seeing the server's local time, not their own local time.

Template Tag Description Example Value
<proxycount> The amount of players on the proxy. 10: int
<proxymax> The maximum amount of players allowed on the proxy. This is the same as the value of 'show-max-players' in Velocity's configuration. 100: int
<proxymotd> The proxy's MOTD component. A Proxy Server: Component
<servercount> The amount of players on the local server. 10: int
<servermax> The maximum amount of players allowed on the local server. 100: int
<servermotd> The local server's MOTD component. A Minecraft Server: Component
<playerserver> The local server's name that was registered with Velocity.
<playerping> The player's ping to the proxy. Will just return the number without 'ms' or anything. 150: int
<playeruuid> The player's UUID, in the dash-separated format. b4dc78cf-6aeb-439f-8c68-4b5b2a4e340c: String
<playername> The player's username. Bluely_: String
<playerip> The player's ip. 127.0.0.1: String
<date> The date. (yyyy/MM/dd) 2021/09/25: String
<time> The time. (HH:mm a) 5:24 PM: String
<datetime> The datetime. 2021/09/25 5:24 PM: String

bat's People

Contributors

105hua avatar adde0109 avatar clrxbl avatar el-s avatar powercasgamer avatar prof-bloodstone avatar webcrawls 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

Watchers

 avatar  avatar  avatar  avatar

bat's Issues

add a switch to modify or not the player list

The plugin nametags collides with another nametag plugin installed in the backend server, making prefixes and suffixes to not work at all something like format-player-names: true/false as the plugin just breaks the

Also a switch to show only the players on the proxy or show the players in the whole server only-in-proxy-players: true/false
I'm saying this 'cause i have different proxies and before the plugin, the players in the backend server was complete but after installing on a test proxy that connects to the backend server too, found out that it was only me who was showing up in the player list knowing everyone else was there

Investigate tablist flickering

At some combination of player amount and player names, the player head icons flicker.
Investigate why it might be happening.

It is possible that it is due to Header/Footer update being sent despite there being no changes.
The header/footer code doesn't check if something changed: https://github.com/NearVanilla/bat/blob/master/velocity/src/main/java/com/nearvanilla/bat/velocity/tab/TablistService.java#L173-L210
as opposed to tablist entry code which does: https://github.com/NearVanilla/bat/blob/master/velocity/src/main/java/com/nearvanilla/bat/velocity/tab/TablistService.java#L312-L334

Video:
https://user-images.githubusercontent.com/46570876/198721717-759f8f80-b79e-4f87-b5b9-0997b5807b2f.mp4

Getting kicked from gamemode spectator

After tablist update, every admin in gamemode spectator automatically go to "broken" gamemode spectator

In this "broken" mode, admins can speed up using scroll wheel, but cant noclip (phase) through blocks, and cant use spectator tp menu (numbers)

The player display in the tab also changes from gray (when someone in spectator mode) to white (when someone in any other mode)

Console spam Determine Gamemode

29.03 02:55:57 [Server] [WARN] [com.nearvanilla.bat.velocity.tab.TablistService]: Failed to determine GameMode for d4967fff-f48f-4bd0-8013-d580011c3b0a! Returning: 0

Thought this issue was fixed back in 2022, but doesn't seem like it?

Velocity 3.2.0-SNAPSHOT
Bat [1.1.0](https://github.com/NearVanilla/bat/suites/10504605580/artifacts/521318974)
Java 17

Group-sorting like TAB

Feature request to sort groups in the tablist like the TAB plugin has:

Sort groups like this:

Owner
Moderator
Member
Guests

Reason for request: Because currently it's very messy, and it's sorted randomly instead of putting the power-ranks at the top.

<servername> placeholder appears to be missing

I attempted to display the Velocity servers name but it appears that the implementation is not finished? A quick search of the code and it appears that a stub method has been commented out, but I didn't look too deep.

image
image

Incompatibility with Spark

With Spark on a Paper server and BAT on a Velocity proxy, the gamemode state gets confused.

You can change your gamemode to Spectator from Survival, and the client will still think it is in Survival mode. Although the HUD will update, and your model will disappear, your player's collision will not change.

The opposite will also happen. Spectator to Creative, Survival, or Adventure modes will try to let you phase through blocks even though you are in a gamemode that doesn't let you do that.

This one is quite difficult to explain. This could very well be a Spark issue.

Software used in testing.
Minecraft 1.19.3 (Vanilla and Modded)
Spark-Bukkit v1.10.30
bat (a9b045a)
PaperMC 1.19.3 Build 431
Velocity 3.2.0 Snapshot Build 231

Bat crash

The tab started to stop working. I have about 250 players and I have a lot of change of servers because I am a Network with my data, chats, tab linked

PlaceholderAPI

I can't figure out how to put placeholders in the tab using PlaceholderAPI, for example player balance.
Our old plugin could do it, but it didn't support velocity.

random error in the console?

[21:47:18 WARN] [com.nearvanilla.bat.velocity.tab.TablistService]: Failed to determine GameMode for cefd27b0-52b3-492f-a0ba-93e6ce91507d! Returning: 0

ERROR: Couldn't pass ProxyInitializeEvent to bat

Hey I build you Nice Plugin and when I drag and drop it in Velocity 3.2.1SNAPSHOT Build 184

I get that Error: https://pastebin.com/7MERXwQ7
See the Titel.

I use:

[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
Pulling from pterodactyl/yolks 
Status: Image is up to date for ghcr.io/pterodactyl/yolks:java_17 
Digest: sha256:
[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
container@pterodactyl~ java -Xms128M -Xmx2000M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -Duser.timezone=Europe/Berlin -jar velocity.jar
[10:24:24 INFO]: Booting up Velocity 3.1.2-SNAPSHOT (git-7d77bfb5-b184)...
[10:24:24 INFO]: Loading localizations...
[10:24:24 INFO]: Connections will use epoll channels, libdeflate (Linux x86_64) compression, OpenSSL 1.1.x (Linux x86_64) ciphers

problem (no work)

I built the plugin for the first time. Outputs an error, can you help?

Unable to load plugin plugins/1234567.jar
com.velocitypowered.api.plugin.InvalidPluginException: The plugin file 1234567.jar appears to be a Bukkit or BungeeCord plugin. Velocity does not support Bukkit or BungeeCord plugins.
at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.getSerializedPluginInfo(JavaPluginLoader.java:151) ~[bungeecord.jar:3.1.2-SNAPSHOT (git-7d77bfb5-b184)]
at com.velocitypowered.proxy.plugin.loader.java.JavaPluginLoader.loadCandidate(JavaPluginLoader.java:61) ~[bungeecord.jar:3.1.2-SNAPSHOT (git-7d77bfb5-b184)]
at com.velocitypowered.proxy.plugin.VelocityPluginManager.loadPlugins(VelocityPluginManager.java:92) ~[bungeecord.jar:3.1.2-SNAPSHOT (git-7d77bfb5-b184)]
at com.velocitypowered.proxy.VelocityServer.loadPlugins(VelocityServer.java:343) ~[bungeecord.jar:3.1.2-SNAPSHOT (git-7d77bfb5-b184)]
at com.velocitypowered.proxy.VelocityServer.start(VelocityServer.java:224) ~[bungeecord.jar:3.1.2-SNAPSHOT (git-7d77bfb5-b184)]
at com.velocitypowered.proxy.Velocity.main(Velocity.java:64) ~[bungeecord.jar:3.1.2-SNAPSHOT (git-7d77bfb5-b184)]

  I will be very grateful for your help or if you release the build yourself

server version - velocity 1.18.2

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.