Eredrim / pvparena

Controlled violence since 2011
https://www.spigotmc.org/resources/pvp-arena.16584/
GNU General Public License v3.0
23 stars 36 forks source link

Team color influence range error #159

Closed tsingyayin closed 1 year ago

tsingyayin commented 1 year ago

When a player ends a game in PVPArena, if the game is team oriented, the player will still be colored in team color by the system after the match ends. For example, if a player joined the team "red" at the beginning of the match, the prompt message displayed by the server will also be colored red when the player leaves the server after the match ends. And this behavior is not just about coloring, when the server uses prefixes and suffixes in the player display name, the coloring behavior will also cause the prefixes and suffixes to become invalid for these players.

What is currently known is that this issue is temporary and not too severe, as it will disappear after a certain period of time (uncertain exact time, possibly more than 5 minutes) after a match ends. If you has the time and energy, you can try to fix this problem

tsingyayin commented 1 year ago

By the way, this plugin seems to be unable to save player game modes. As a creative mode OP, my gamemode will become survival mode after a match. Although it is not serious, it will affect the user experience

Eredrim commented 1 year ago

Hello, What are your server version (and flavour) and your PVPArena version?

Without more information, it seems to be a conflict with another plugin or with the server version. Currently, every players stats are saved before they join the arena and restored immediately after the end of the match.

tsingyayin commented 1 year ago

Server: Purpur-1.19.3-1924 Plugin: PVPArena-1.15.3 If the plugin is indeed immediately restored from the archive, then this issue may be due to the EssentialX plugin. As far as I know, there may be a lag in the style when the EssentialX plugin intervenes in the display of player names on the server. For example, I have previously observed that when I try to use the LuckPerm plugin to set a new value for a player's Prefix, the player's display name will not immediately update in places like the Tab plugin where the name can be displayed.

tsingyayin commented 1 year ago

I met this today. When my test account and I entered the game, I encountered this issue.The name of my arena is ice. I don't know why, but before I discovered the coloring error yesterday, I also encountered this error. I'm not sure what caused it.

I started three battles today. For the first time, I debugged the flag information required by Domination. Before starting the second battle, I manually modified the flag information saved in the configuration file. I am sure I did not introduce any syntax error. At the same time, I made modifications to some parameters of Domination, such as dlives , claimrange , etc. These modifications did not introduce any errors. So I launched the second battle. In the second battle, I first asked one account to complete all the "join" - "select class" - "ready" steps, and then asked another account to complete this process. I noticed that when I finished preparing my first account, the plugin would prompt me that there was only one person in the game. So I speculated whether the error reported after the second account being ready was related to this "alone" prompt. Then I launched the third battle and still encountered this error. The following exception information is from this launch. But when the second person was ready, this anomaly occurred again. I have no clue about this.

Exception

[17:25:06 INFO]: Server_Test1 issued server command: /pa ice [17:25:10 INFO]: TsingYayin issued server command: /pa ice [17:25:12 INFO]: TsingYayin issued server command: /pa arenaclass Ranger [17:25:14 INFO]: TsingYayin issued server command: /pa ready [17:25:19 INFO]: Server_Test1 issued server command: /pa arenaclass Ranger [17:25:21 INFO]: Server_Test1 issued server command: /pa ready

org.bukkit.command.CommandException: Unhandled exception executing command 'pa' in plugin pvparena v1.15.3 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R2.CraftServer.dispatchCommand(CraftServer.java:926) ~[purpur-1.19.3.jar:git-Purpur-1924] at org.bukkit.craftbukkit.v1_19R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.19.3.jar:git-Purpur-1924] at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[purpur-1.19.3.jar:?] at net.minecraft.commands.Commands.performCommand(Commands.java:324) ~[?:?] at net.minecraft.commands.Commands.performCommand(Commands.java:308) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2379) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2339) ~[?:?] at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1368) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1345) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1338) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1316) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1204) ~[purpur-1.19.3.jar:git-Purpur-1924] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1924] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.WHITE at java.lang.Enum.valueOf(Enum.java:273) ~[?:?] at org.bukkit.Material.valueOf(Material.java:115) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?] at net.slipcor.pvparena.core.ColorUtils.getColoredMaterial(ColorUtils.java:102) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.core.ColorUtils.getColoredMaterialFromChatColor(ColorUtils.java:45) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.core.ColorUtils.setNewFlagColor(ColorUtils.java:139) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.goals.GoalDomination.takeFlag(GoalDomination.java:745) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.goals.GoalDomination.parseStart(GoalDomination.java:678) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.classes.PACheck.handleStart(PACheck.java:803) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.arena.Arena.start(Arena.java:1859) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.arena.Arena.start(Arena.java:1813) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.commands.PAI_Ready.commit(PAI_Ready.java:91) ~[pvparena-1.15.3.jar:?] at net.slipcor.pvparena.PVPArena.onCommand(PVPArena.java:287) ~[pvparena-1.15.3.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]

Eredrim commented 1 year ago

Assuming your error message is the root cause of your issue, this message happens because you changed the material of your flags in your domination arena. All of you flags MUST be colorable materials (like wool, colored glass, etc). Neither other kind of block nor air. I agree, a double check to avoid this before starting the arena would be better.

tsingyayin commented 1 year ago

Thank you, I will try to repair my configuration file today. I'm sorry for the delay.