Skip to content

Commit

Permalink
Merge pull request #33 from diademiemi/diademiemi/issue30
Browse files Browse the repository at this point in the history
  • Loading branch information
x86-39 authored Jan 15, 2022
2 parents 8a5e281 + 61bded4 commit e3c401c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
case "remove":
if (sender.hasPermission("lineation.line.remove")) {
if (args.length > 2 && Line.getLines().get(args[2]) != null) {
if (Line.getLines().get(args[2]).getLinkedLine() != "") {
Line.getLines().remove(Line.getLines().get(args[2]).getLinkedLine());
Line line = Line.getLines().get(args[2]);
LineTools.stopLine(line);
if (line.getLinkedLine() != "") {
Line.getLines().remove(line.getLinkedLine());
}
Line.getLines().remove(args[2]);
sender.sendMessage(Message.SUCCESS_LINE_REMOVED
Expand Down

0 comments on commit e3c401c

Please sign in to comment.