Reset PvP status on world change
ChanceSD opened this issue ยท 18 comments
Set a player's pvp status to the default value when he changes to a different world.
Disagree. To reduce the abuse of /pvp my players have to wait two hours before they can change their status again. Also some players don't want to do pvp at all and stay at pvp disabled. The default state is pvp enabled so this would force them every time to disable pvp again when they for example switch to the farming world.
Making this an optional switchable feature might be a good compromise though.
The problem is some owners want players to have access to /pvp only in some worlds, using permissions for that.
However, this can be easily abused by a player changing state in an allowed world and then going to that excluded world. I'm not seeing any other solution right now but maybe someone has suggestions.I can make this config option anyway.
Maybe add an option to force a particular pvp status per world? Always on and always off.
Has this been implemented? If so this becomes a problem for me as players do not keep their pvp status at world change anymore.
Build 178.
Yea, those are the ones, i fixed that in premium version, will merge the changes here soon.
Well I could not test this by myself yet. This is basically what I found out by asking some players.
After the server has been restarted at the first time a player joins, their pvp status is always enabled. If he disables his pvp and relogs the status keeps disabled.
When restarting the server and the player rejoins pvp changes the status to active again.
I think i know what is causing that, can you check if you have any errors in console? (IllegalStateException)
I found these
[11:30:58] [Server thread/WARN]: [PvPManager] Task #879833 for PvPManager v3.0 generated an exception
java.lang.IllegalStateException: Unregistered scoreboard component
at org.bukkit.craftbukkit.v1_8_R3.scoreboard.CraftTeam.checkState(CraftTeam.java:217) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at org.bukkit.craftbukkit.v1_8_R3.scoreboard.CraftTeam.unregister(CraftTeam.java:179) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at me.NoChance.PvPManager.TeamProfile.removeCombatTeam(TeamProfile.java:99) ~[?:?]
at me.NoChance.PvPManager.PvPlayer.removeCombatTeam(PvPlayer.java:234) ~[?:?]
at me.NoChance.PvPManager.Managers.PlayerHandler$1.run(PlayerHandler.java:108) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
[11:38:02] [Server thread/WARN]: [PvPManager] Task #911446 for PvPManager v3.0 generated an exception
java.lang.IllegalStateException: Unregistered scoreboard component
at org.bukkit.craftbukkit.v1_8_R3.scoreboard.CraftTeam.checkState(CraftTeam.java:217) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at org.bukkit.craftbukkit.v1_8_R3.scoreboard.CraftTeam.unregister(CraftTeam.java:179) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at me.NoChance.PvPManager.TeamProfile.removeCombatTeam(TeamProfile.java:99) ~[?:?]
at me.NoChance.PvPManager.PvPlayer.removeCombatTeam(PvPlayer.java:234) ~[?:?]
at me.NoChance.PvPManager.Managers.PlayerHandler$1.run(PlayerHandler.java:108) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-5f38d38-efd6cb0]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]
Aight, the exception disappeared but did not fix the problem.
As described earlier users joining the first them after the server has been restarted their pvp status is always enabled even it was disabled before restarting.
Users have pvpmanager.user
as permission from PvPManager only.
Build 179
Please add the option to clear a users state on changing worlds. Not being able to disable /pvp in some worlds is a problem.
@EvilOlaf This should fix your issue, users.yml will be reset though b49eff2
@LaughNgamez Going to work on that one now.