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