From 9523f87f1cd726331bfc7ea2a30d2dba2b56f1e7 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 2 Feb 2022 08:59:18 +1100 Subject: [PATCH] SPIGOT-6917: Use main scoreboard for /trigger Restores pre-1.13 behaviour. See linked ticket for further discussion. By: md_5 --- .../minecraft/server/commands/CommandTrigger.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/nms-patches/net/minecraft/server/commands/CommandTrigger.patch diff --git a/paper-server/nms-patches/net/minecraft/server/commands/CommandTrigger.patch b/paper-server/nms-patches/net/minecraft/server/commands/CommandTrigger.patch new file mode 100644 index 0000000000..82f7e7615a --- /dev/null +++ b/paper-server/nms-patches/net/minecraft/server/commands/CommandTrigger.patch @@ -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)) {