From bf1d487508efa07b96bccbde9518b207b08a55d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20L=C3=BCpges/MisterErwin?= Date: Mon, 12 Sep 2016 17:05:13 +0200 Subject: [PATCH] A (possible) fix to #1351 --- .../com/intellectualcrafters/plot/flag/Flags.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java b/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java index ec59d4e9e..e528b01be 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java @@ -6,6 +6,7 @@ import com.intellectualcrafters.plot.object.PlotArea; import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.MathMan; +import com.intellectualcrafters.plot.util.StringMan; import java.lang.reflect.Field; import java.util.Collection; import java.util.Collections; @@ -161,7 +162,10 @@ public final class Flags { Object remove; if (value.DEFAULT_FLAGS.containsKey(duplicate)) { remove = value.DEFAULT_FLAGS.remove(duplicate); - value.DEFAULT_FLAGS.put(flag,flag.parseValue("" + remove)); + if (remove instanceof Collection) + value.DEFAULT_FLAGS.put(flag, flag.parseValue(StringMan.join((Collection) remove, ','))); + else + value.DEFAULT_FLAGS.put(flag,flag.parseValue("" + remove)); } } }); @@ -169,7 +173,10 @@ public final class Flags { @Override public void run(Plot value) { if (value.getFlags().containsKey(duplicate)) { Object remove = value.getFlags().remove(duplicate); - value.getFlags().put(flag,flag.parseValue("" + remove)); + if (remove instanceof Collection) + value.getFlags().put(flag, flag.parseValue(StringMan.join((Collection) remove, ','))); + else + value.getFlags().put(flag,flag.parseValue("" + remove)); } } });