Coder Social home page Coder Social logo

xitee1 / powerboard Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 8.0 437 KB

Minecraft plugin for Scoreboard, Tablist, Prefixes, Suffixes, Chat | Animated

License: GNU General Public License v3.0

Java 100.00%
minecraft spigot bukkit prefixes scoreboard tablist

powerboard's Introduction

👋 Hi, I’m @Xitee1

Donate


My Repos

My Repos

AppDaemon (HomeAssistant)

Diy

Minecraft

Other cool projects

Other cool projects

powerboard's People

Contributors

itslaivy avatar itstyrion avatar xitee1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

powerboard's Issues

"/pb reload" without effect

After typing /pb reload, it seems like it does nothing and I got this error

Related error logs:
Powerboard v3.5.13 installed

Paper - git-Paper-60 (MC: 1.19)
Error: ExpansionRegisterEvent may only be triggered synchronously
Line: ExternalPlugins.java:37
https://pastebin.com/A83hymiB

[Planned Feature] Multiple Tablists

Add multiple tablists in version 3.6.
Some things are already prepared for this.
The multiple tablists will work like the multiple scoreboards do.

Prefixes/suffixes of player tablist name don't seem to update with LuckPerms.

The tablist name for any player doesn't seem to update with the new LuckPerms parent group.

So when I run /lp user parent set , it doesn't update in tablist.

I have to manually run /pb reload to apply the changes to the tablist.

Not sure if I configured something incorrectly, or if the plugin doesn't support this.

ConcurrentModificationException

Reported by @Nytedemon12 on Discord

It looks like there are still sometimes Concurrent Modification Exceptions.

The error:

[Server] Craft Scheduler Thread - 1122/[WARN] [PowerBoard] Plugin PowerBoard v3.5.15 generated an exception while executing task 2818341
02.10 18:24:48 [Server] [INFO] java.util.ConcurrentModificationException: null
02.10 18:24:48 [Server] [INFO] at java.util.HashMap.computeIfAbsent(HashMap.java:1134) ~[?:?]
02.10 18:24:48 [Server] [INFO] at net.minecraft.scoreboard.Scoreboard.func_96529_a(SourceFile:82) ~[?:?]
02.10 18:24:48 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScore.setScore(CraftScore.java:58) ~[forge:?]
02.10 18:24:48 [Server] [INFO] at de.xite.scoreboard.modules.board.ScoreTitleUtils.setScore(ScoreTitleUtils.java:90) ~[?:?]
02.10 18:24:48 [Server] [INFO] at de.xite.scoreboard.modules.board.ScoreboardManager$2.run(ScoreboardManager.java:207) ~[?:?]
02.10 18:24:48 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[forge:?]
02.10 18:24:48 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [forge:?]
02.10 18:24:48 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
02.10 18:24:48 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
02.10 18:24:48 [Server] [INFO] at java.lang.Thread.run(Thread.java:829) [?:?]
02.10 18:24:48 [Server] Craft Scheduler Thread - 1167/[WARN] [PowerBoard] Plugin PowerBoard v3.5.15 generated an exception while executing task 2818349
02.10 18:24:48 [Server] [INFO] java.util.ConcurrentModificationException: null
02.10 18:24:48 [Server] [INFO] at java.util.HashMap.computeIfAbsent(HashMap.java:1134) ~[?:?]
02.10 18:24:48 [Server] [INFO] at net.minecraft.scoreboard.Scoreboard.func_96529_a(SourceFile:82) ~[?:?]
02.10 18:24:48 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScore.setScore(CraftScore.java:58) ~[forge:?]
02.10 18:24:48 [Server] [INFO] at de.xite.scoreboard.modules.board.ScoreTitleUtils.setScore(ScoreTitleUtils.java:90) ~[?:?]
02.10 18:24:48 [Server] [INFO] at de.xite.scoreboard.modules.board.ScoreboardManager$2.run(ScoreboardManager.java:207) ~[?:?]
02.10 18:24:48 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[forge:?]
02.10 18:24:48 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [forge:?]
02.10 18:24:48 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
02.10 18:24:48 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
02.10 18:24:52 [Server] [INFO] at java.lang.Thread.run(Thread.java:829) [?:?]

Getting kicked from the server sometimes

Reported by @CrazyDev22 on Discord:

Ich werde immer wieder mit dem folgenden Fehler gekickt:

java.lang.IllegalArgumentException: Team name 'pb-sc7' is already in use
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:218) ~[guava-32.1.2-jre.jar:?]
    at org.bukkit.craftbukkit.v1_20_R3.scoreboard.CraftScoreboard.registerNewTeam(CraftScoreboard.java:209) ~[purpur-1.20.4.jar:git-Purpur-2141]
    at de.xite.scoreboard.modules.board.ScoreTitleUtils.setScore(ScoreTitleUtils.java:89) ~[PowerBoard.jar:?]
    at de.xite.scoreboard.modules.board.ScoreTitleUtils.setScores(ScoreTitleUtils.java:62) ~[PowerBoard.jar:?]
    at de.xite.scoreboard.modules.board.ScoreboardPlayer.setScoreboard(ScoreboardPlayer.java:75) ~[PowerBoard.jar:?]
    at de.xite.scoreboard.listeners.JoinQuitListener.lambda$onJoin$1(JoinQuitListener.java:51) ~[PowerBoard.jar:?]
    at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2141]
    at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.4.jar:git-Purpur-2141]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.4.jar:?]
    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:840) ~[?:?]

ArrayIndexOutOfBoundsException: Index -1

Reported by @lukriq on Discord:

[20:18:51 WARN]: [PowerBoard] Plugin PowerBoard v3.5.15 generated an exception while executing task 1421
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10
        at java.util.ArrayList.add(ArrayList.java:455) ~[?:?]
        at java.util.ArrayList.add(ArrayList.java:467) ~[?:?]
        at de.xite.scoreboard.modules.ranks.RankManager.delay(RankManager.java:246) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.ranks.RankManager.setTablistRanks(RankManager.java:106) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.ranks.RankManager.register(RankManager.java:28) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.ranks.RankManager.updateTablistRanks(RankManager.java:169) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.depend.LuckPermsListener$1.run(LuckPermsListener.java:33) ~[PowerBoard.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.2.jar:git-Paper-225]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.2.jar:git-Paper-225]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.2.jar:?]
        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) ~[?:?]
[20:18:51 WARN]: [PowerBoard] Plugin PowerBoard v3.5.15 generated an exception while executing task 1422
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10
        at java.util.ArrayList.fastRemove(ArrayList.java:642) ~[?:?]
        at java.util.ArrayList.remove(ArrayList.java:629) ~[?:?]
        at de.xite.scoreboard.modules.ranks.RankManager.delay(RankManager.java:245) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.ranks.RankManager.setTablistRanks(RankManager.java:106) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.ranks.RankManager.register(RankManager.java:28) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.ranks.RankManager.updateTablistRanks(RankManager.java:169) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.depend.LuckPermsListener$1.run(LuckPermsListener.java:33) ~[PowerBoard.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.2.jar:git-Paper-225]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.2.jar:git-Paper-225]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.2.jar:?]
        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) ~[?:?]

[Planned Feature] Actionbars

Add actionbars.
I'm not 100% sure if I will implement it, but it is planned.
There hasn't been any work done yet.
If you know how to do it, feel free to implement this feature and send a PR.

Money placeholder

I can't find a way to get the placeholder to show the players money on the scoreboard.

IllegalArgumentException: A team with the name '998team-68' already exists!

Reported by @Nytedemon12 on Discord

Sometimes this error occurs although there is already a check if the team exists (but maybe the wrong way)?

The code:

Team t = all.getScoreboard().getTeam(teams.getTeamName());
if(t == null)
t = all.getScoreboard().registerNewTeam(teams.getTeamName());

The error:

[INFO] java.lang.IllegalArgumentException: A team with the name '998team-68' already exists!
07.10 01:19:36 [Server] [INFO] at net.minecraft.scoreboard.Scoreboard.func_96527_f(SourceFile:188) ~[?:?]
07.10 01:19:36 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewTeam(CraftScoreboard.java:192) ~[forge:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.modules.ranks.RankManager.setTablistRanks(RankManager.java:138) ~[?:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.modules.ranks.RankManager.register(RankManager.java:28) ~[?:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.modules.ranks.RankManager.updateTablistRanks(RankManager.java:169) ~[?:?]
07.10 01:19:36 [Server] [INFO] at de.xite.scoreboard.depend.LuckPermsListener$1.run(LuckPermsListener.java:33) ~[?:?]
07.10 01:19:36 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[forge:?]
07.10 01:19:36 [Server] [INFO] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [forge:?]
07.10 01:19:36 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
07.10 01:19:36 [Server] [INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
07.10 01:19:36 [Server] [INFO] at java.lang.Thread.run(Thread.java:829) [?:?]
07.10 01:19:36 [Server] Craft Scheduler Thread - 230/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:36 [Server] Craft Scheduler Thread - 249/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:36 [Server] Craft Scheduler Thread - 246/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:36 [Server] Craft Scheduler Thread - 239/[INFO] [PowerBoard] Updating SilverBodyGuard's rank has been delayed to prevent lags and performance issues. The rank will automatically update in a few seconds.
07.10 01:19:40 [Server] luckperms-worker-13/[INFO] [LuckPerms] User Housekeeper: unloading user data for 7e6ba872-1ded-4e56-8fb2-c8ef46930296
07.10 01:19:41 [Server] Server thread/[INFO] [PowerBoard] Updating SilverBodyGuard's rank..
07.10 01:19:41 [Server] Server thread/[INFO] [PowerBoard] The player SilverBodyGuard has the rank (luckperms-api): Group: default; Prefix: &7[Adventurer] ; Suffix: ; NamColor: §7; Displayname: ; Chatprefix: &7[Adventurer]  %player_name% &7»

[Planned Feature] Negative weights

Make it possible to use negative weights. Currently only weights in the range of 0 - 999 are supported. The negative weights will probably go from 0 to -99.

[Bug?] Lag on Gamemode change.

When I change the gamemode from creative to spectator Powerboard seems to cause a lot of lag and also sometimes show this warning in the log:

[02:00:39 WARN]: [PowerBoard] Plugin PowerBoard v3.5.10 generated an exception while executing task 66
java.lang.IllegalStateException: Unregistered scoreboard component
        at org.bukkit.craftbukkit.v1_18_R2.scoreboard.CraftObjective.checkState(CraftObjective.java:159) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at org.bukkit.craftbukkit.v1_18_R2.scoreboard.CraftObjective.setDisplayName(CraftObjective.java:59) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at de.xite.scoreboard.modules.board.ScoreTitleUtils.setTitle(ScoreTitleUtils.java:26) ~[PowerBoard.jar:?]
        at de.xite.scoreboard.modules.board.ScoreboardManager$1.run(ScoreboardManager.java:146) ~[PowerBoard.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.2.jar:git-Purpur-1632]
        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) ~[?:?]

To check what caused the lag I run the timings command. The results can be found here:
https://timings.aikar.co/?id=8f7406c8cc5e4564b01c351fe1776f9e

Player Suffix not updating properly

When I set a player suffix to contain a placeholder, for example XP level, it doesn't update for anyone unless they disconnect and rejoin the server. It updates within chat, but not within the tab menu and their username, that is above the player.

Is this intentional behaviour, or is this something that can be resolved?
Thanks!

The plugin reports errors in the console every once in a while.

Describe the bug
Every once in a while, the console will pop up with a bunch of errors like the one in the picture. This may not affect normal use, but the console is filled with meaningless symbols.
I think this is caused by the plug-in trying to check for updates but failing to obtain them, and the config.yml only provides two options of whether to notify players of updates or automatically update the plug-in, without the option of whether to allow the plug-in to check for updates. I hope this option will be added in 3.6.2.
Moreover, in some countries or regions, because some networks are blocked, updates cannot be obtained normally, and you can only be forced to accept meaningless symbols.

To Reproduce
Steps to reproduce the behavior:

  1. Launch the server.
  2. Every once in a while this bunch of messages will appear.
    ...

Screenshots
image

Please complete the following information:

  • Server version: Spigot 1.12.2
  • Plugin version 3.6.1

Additional information
Add more information that might help to solve the problem, e.g. your config.yml

Mixed scoreboards bug

The scoreboard shows an error, firstly you can't put a scoreboard for all the general worlds, I had to create a scoreboard for each world, everything is fine while a player is connected but if 2 or more enter the scoreboard it begins to change between mine or the another user, then it shows me mine and quickly switches to the other user

This is how it shows me, it changes every time:

image

image

any way to solve this? I don't know if it has to do with some configuration but I have seen it and everything is ok, or permission issues or simply the plugin the scoreboard part is failing.

pex question

Is PermissionsEX Permissions-System still available? Or is it deleted from code? How do I turn it on? I understand that no support will be given and blablabla (I am afraid of LuckPerms)

Tablist placeholder refreshing

The tablist will always update with the speed of the lowest speed number of any line.
If for example a placeholder in a tablist line has a speed of 100, it will update every 5 seconds. But if there is another line with a placeholder that has a speed of 5 which updates 4 times in a second, the first placeholder will also update 4 times a second instead all 5 seconds.

[Issue] %player_rank% does not update itself

So, if I give someone a new rank, their old rank is still in TAB and Scoreboard (they should relog to see their new rank, that's bad), I tried changing speed value, but no result, I use 'none' perm. system.

Error: "Could not find 'defaultsc' scoreboard"

So, basically, when I load up my server, an error message from PowerBoard shows up in the logs. It tells me that it could not find defaultsc.yml even though there is literally a defaultsc.yml. The tab-list and ranking system is working perfectly fine though. Why is this? Please help me ASAP.

[Planned Feature] Chat nickname hover

With this it is planned to implement a better chat system into Powerboard that can do more than just settings prefixes.
With that it is planned to setup a nickname hover which will display more informations about the player (with placeholders) when you hover about a player's name in the chat with the mouse.
There hasn't been any work done yet.
If you know how to implement this feature, feel free to send a RP.

Tablist missing lines sometimes after /pb reload

Sometimes after /pb reload, one of the two empty default lines (above and below the player list) just disappear, sometimes even both. Another PB reload will fix it most of the time until another "bad" reload.

HEX color scoreboard char limit

HEX colors in the scoreboard do count as 14 chars each which brings it pretty quickly to MC's limit.
For some reason it has worked once, but in the last versions it no longer does.
I think this can be fixed by sending the scoreboard with packets. I don't know how to do that (yet). If I have time for it I might look into it.

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.