Skip to content

Commit

Permalink
fix scoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Faithcaio committed Dec 7, 2023
1 parent a79bfb0 commit 6b16774
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ public abstract class ServerScoreboardMixin extends Scoreboard implements Server
}
}

@Override
public void removeObjective(final net.minecraft.world.scores.Objective objective) {
this.bridge$removeAPIObjective(((ObjectiveBridge) objective).bridge$getSpongeObjective());
}

@Override
public void removePlayerTeam(final PlayerTeam team) {
super.removePlayerTeam(team);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void registerCommands(final RegisterCommandEvent<Command.Parameterized>
public CommandResult doScoreboardStuff(CommandContext ctx) {
try {
ctx.cause().first(ServerPlayer.class).ifPresent(player -> {
final Scoreboard scoreboard = Scoreboard.builder().build();
final Scoreboard scoreboard = player.scoreboard();
scoreboard.objective("testObjective").ifPresentOrElse(o -> {
scoreboard.removeObjective(o);
ctx.sendMessage(Component.text("Objective removed"));
Expand Down

0 comments on commit 6b16774

Please sign in to comment.