Wolfieheart / ArmorStandEditor

Spigot/Paper etc. plugin to allow players to edit armorstands without commands.
GNU General Public License v3.0
25 stars 19 forks source link

Fix the sending of the message Twice in this Statement #496

Closed github-actions[bot] closed 2 months ago

github-actions[bot] commented 2 months ago

https://github.com/Wolfieheart/ArmorStandEditor/blob/f9ba0fec8e921c008f697e5462aff26adc0c6846/src/main/java/io/github/rypofalem/armorstandeditor/PlayerEditorManager.java#L270


            getPlayerEditor(player.getUniqueId()).setTarget(as);
        } else if (itemF != null && !itemF.isEmpty()) {
            getPlayerEditor(player.getUniqueId()).setFrameTarget(itemF);
        } else { //TODO: Fix the sending of the message Twice in this Statement
            getPlayerEditor(player.getUniqueId()).setTarget(null);
            getPlayerEditor(player.getUniqueId()).setFrameTarget(null);
        }
    }

    private ArrayList<ArmorStand> getTargets(Player player) {
        Location eyeLaser = player.getEyeLocation();
        Vector direction = player.getLocation().getDirection();