SPIGOT-6917: Use main scoreboard for /trigger

Restores pre-1.13 behaviour. See linked ticket for further discussion.
This commit is contained in:
md_5 2022-02-02 08:59:18 +11:00
parent a672a53151
commit e5f8a7672e
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -0,0 +1,11 @@
--- a/net/minecraft/server/commands/CommandTrigger.java
+++ b/net/minecraft/server/commands/CommandTrigger.java
@@ -90,7 +90,7 @@
if (scoreboardobjective.getCriteria() != IScoreboardCriteria.TRIGGER) {
throw CommandTrigger.ERROR_INVALID_OBJECTIVE.create();
} else {
- Scoreboard scoreboard = entityplayer.getScoreboard();
+ Scoreboard scoreboard = entityplayer.getServer().getScoreboard(); // CraftBukkit - SPIGOT-6917: use main scoreboard
String s = entityplayer.getScoreboardName();
if (!scoreboard.hasPlayerScore(s, scoreboardobjective)) {