mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix plot list add
This commit is contained in:
parent
eed8cbec5a
commit
9bd3f2cbfd
@ -225,7 +225,6 @@ public class FlagCmd extends SubCommand {
|
|||||||
MainUtil.sendMessage(player, C.FLAG_NOT_ADDED);
|
MainUtil.sendMessage(player, C.FLAG_NOT_ADDED);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DBFunc.setFlags(plot, plot.getFlags().values());
|
|
||||||
MainUtil.sendMessage(player, C.FLAG_ADDED);
|
MainUtil.sendMessage(player, C.FLAG_ADDED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ public class Flag<T> implements Cloneable {
|
|||||||
}
|
}
|
||||||
return new Flag(this.key, method.invoke(this.value));
|
return new Flag(this.key, method.invoke(this.value));
|
||||||
}
|
}
|
||||||
return new Flag(this.key, this.key.parseValueRaw(this.value.toString()));
|
return new Flag(this.key, this.key.parseValueRaw(this.key.toString(this.value)));
|
||||||
} catch (CloneNotSupportedException | IllegalAccessException | IllegalArgumentException | NoSuchMethodException | SecurityException | InvocationTargetException e) {
|
} catch (CloneNotSupportedException | IllegalAccessException | IllegalArgumentException | NoSuchMethodException | SecurityException | InvocationTargetException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.intellectualcrafters.plot.flag;
|
package com.intellectualcrafters.plot.flag;
|
||||||
|
|
||||||
|
import com.intellectualcrafters.plot.PS;
|
||||||
import com.intellectualcrafters.plot.object.PlotBlock;
|
import com.intellectualcrafters.plot.object.PlotBlock;
|
||||||
import com.intellectualcrafters.plot.util.StringComparison;
|
import com.intellectualcrafters.plot.util.StringComparison;
|
||||||
import com.intellectualcrafters.plot.util.StringMan;
|
import com.intellectualcrafters.plot.util.StringMan;
|
||||||
@ -441,7 +442,9 @@ public abstract class FlagValue<T> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> parse(final String t) {
|
public List<String> parse(final String t) {
|
||||||
return Arrays.asList(t.split(","));
|
System.out.println("PARSE: " + t);
|
||||||
|
PS.stacktrace();
|
||||||
|
return new ArrayList<>(Arrays.asList(t.split(",")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -454,6 +457,7 @@ public abstract class FlagValue<T> {
|
|||||||
try {
|
try {
|
||||||
((List<String>) t).addAll(parse(value));
|
((List<String>) t).addAll(parse(value));
|
||||||
} catch (final Exception ignored) {
|
} catch (final Exception ignored) {
|
||||||
|
ignored.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,7 +467,8 @@ public abstract class FlagValue<T> {
|
|||||||
for (final String item : parse(value)) {
|
for (final String item : parse(value)) {
|
||||||
((List<String>) t).remove(item);
|
((List<String>) t).remove(item);
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception ignored) {
|
||||||
|
ignored.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user