From 83920b7f45c79aab5558f45f14698255ca339d60 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Tue, 1 Dec 2015 11:42:59 +0100 Subject: [PATCH] SignUtil now filter out empty lines. --- .../massivecraft/massivecore/util/SignUtil.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/massivecore/util/SignUtil.java b/src/com/massivecraft/massivecore/util/SignUtil.java index 09b02d60..96b1b314 100644 --- a/src/com/massivecraft/massivecore/util/SignUtil.java +++ b/src/com/massivecraft/massivecore/util/SignUtil.java @@ -2,7 +2,6 @@ package com.massivecraft.massivecore.util; import java.security.InvalidParameterException; import java.util.ArrayList; -import java.util.Arrays; import java.util.EnumSet; import java.util.List; import java.util.Set; @@ -305,7 +304,19 @@ public class SignUtil { if (sign == null) throw new NullPointerException("sign"); - return new ArrayList(Arrays.asList(sign.getLines())); + // Create + List ret = new ArrayList(); + + // Fill + for (String line : sign.getLines()) + { + if (line == null) continue; + if (line.trim().isEmpty()) continue; + ret.add(line); + } + + // Return + return ret; } }