Skip to content

Commit

Permalink
Fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-MX committed Dec 15, 2024
1 parent a465bb8 commit 36ea520
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/com/mattmx/nametags/NameTagsCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

import java.util.Map;
import java.util.UUID;

public class NameTagsCommand implements CommandExecutor {
Expand All @@ -21,6 +22,14 @@ public NameTagsCommand(@NotNull NameTags plugin) {

@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
for (final Player player : Bukkit.getOnlinePlayers()) {
final NameTagEntity tag = plugin.getEntityManager().getNameTagEntity(player);

if (tag != null) {
tag.getTraits().destroy();
}
}

this.plugin.reloadConfig();

for (final Player player : Bukkit.getOnlinePlayers()) {
Expand Down

0 comments on commit 36ea520

Please sign in to comment.