mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 22:54:43 +02:00
Compare commits
1 Commits
7.0.0-rc.3
...
fix/add-mi
Author | SHA1 | Date | |
---|---|---|---|
c90e681aab |
@ -1167,7 +1167,7 @@ public class PlayerEventListener implements Listener {
|
||||
}
|
||||
}
|
||||
if (type.isEdible()) {
|
||||
//Allow all players to eat while also allowing the block place event to be fired
|
||||
//Allow all players to eat while also allowing the block place event ot be fired
|
||||
return;
|
||||
}
|
||||
if (type == Material.ARMOR_STAND) {
|
||||
|
@ -562,7 +562,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
||||
* Get the y value where the plot schematic should be pasted from.
|
||||
*
|
||||
* @return plot schematic y start value
|
||||
* @since 7.0.0
|
||||
* @since TODO
|
||||
*/
|
||||
public int getPlotYStart() {
|
||||
return SCHEM_Y + plotY;
|
||||
@ -572,7 +572,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
||||
* Get the y value where the road schematic should be pasted from.
|
||||
*
|
||||
* @return road schematic y start value
|
||||
* @since 7.0.0
|
||||
* @since TODO
|
||||
*/
|
||||
public int getRoadYStart() {
|
||||
return SCHEM_Y + roadY;
|
||||
|
@ -180,7 +180,8 @@ public abstract class PlotArea implements ComponentLike {
|
||||
this.worldConfiguration = worldConfiguration;
|
||||
}
|
||||
|
||||
private static void parseFlags(FlagContainer flagContainer, List<String> flagStrings) {
|
||||
private static Collection<PlotFlag<?, ?>> parseFlags(List<String> flagStrings) {
|
||||
final Collection<PlotFlag<?, ?>> flags = new ArrayList<>();
|
||||
for (final String key : flagStrings) {
|
||||
final String[] split;
|
||||
if (key.contains(";")) {
|
||||
@ -192,7 +193,7 @@ public abstract class PlotArea implements ComponentLike {
|
||||
GlobalFlagContainer.getInstance().getFlagFromString(split[0]);
|
||||
if (flagInstance != null) {
|
||||
try {
|
||||
flagContainer.addFlag(flagInstance.parse(split[1]));
|
||||
flags.add(flagInstance.parse(split[1]));
|
||||
} catch (final FlagParseException e) {
|
||||
LOGGER.warn(
|
||||
"Failed to parse default flag with key '{}' and value '{}'. "
|
||||
@ -203,10 +204,9 @@ public abstract class PlotArea implements ComponentLike {
|
||||
);
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
flagContainer.addUnknownFlag(split[0], split[1]);
|
||||
}
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@ -405,7 +405,7 @@ public abstract class PlotArea implements ComponentLike {
|
||||
}
|
||||
}
|
||||
}
|
||||
parseFlags(this.getFlagContainer(), flags);
|
||||
this.getFlagContainer().addAll(parseFlags(flags));
|
||||
ConsolePlayer.getConsole().sendMessage(
|
||||
TranslatableCaption.of("flags.area_flags"),
|
||||
TagResolver.resolver("flags", Tag.inserting(Component.text(flags.toString())))
|
||||
@ -427,7 +427,7 @@ public abstract class PlotArea implements ComponentLike {
|
||||
}
|
||||
}
|
||||
this.roadFlags = roadflags.size() > 0;
|
||||
parseFlags(this.getRoadFlagContainer(), roadflags);
|
||||
this.getRoadFlagContainer().addAll(parseFlags(roadflags));
|
||||
ConsolePlayer.getConsole().sendMessage(
|
||||
TranslatableCaption.of("flags.road_flags"),
|
||||
TagResolver.resolver("flags", Tag.inserting(Component.text(roadflags.toString())))
|
||||
|
Reference in New Issue
Block a user