public class BlockedMobOrSpawnPointError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends SquareValidationError<G,A,R> implements CorrectableError
| Constructor and Description |
|---|
BlockedMobOrSpawnPointError(@NotNull MapSquare<G,A,R> mapSquare,
@NotNull java.util.Collection<G> blockers,
@NotNull java.util.Collection<G> mobsOrSpawnPoints)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
correct(@NotNull java.awt.Component parentComponent)
Try to correct this error.
|
@NotNull java.util.Collection<G> |
getBlockers()
Returns the blocking
game objects. |
@NotNull java.util.Collection<G> |
getMobsOrSpawnPoints()
Returns the mob or spawn point
game objects. |
@Nullable java.lang.String |
getParameter(int id)
Returns a parameter string to be used in the error message.
|
addGameObject, addMapSquare, getGameObjects, getMapModel, getMapSquares, getMessage, toStringpublic BlockedMobOrSpawnPointError(@NotNull
@NotNull MapSquare<G,A,R> mapSquare,
@NotNull
@NotNull java.util.Collection<G> blockers,
@NotNull
@NotNull java.util.Collection<G> mobsOrSpawnPoints)
mapSquare - the square on which the error occurredblockers - the blocking game objectsmobsOrSpawnPoints - mob or spawn game objects@NotNull public @NotNull java.util.Collection<G> getBlockers()
game objects.@NotNull public @NotNull java.util.Collection<G> getMobsOrSpawnPoints()
game objects.public void correct(@NotNull
@NotNull java.awt.Component parentComponent)
CorrectableErrorcorrect in interface CorrectableErrorparentComponent - parent component to display a dialog upon in case
this error needs to query information from the user for correction@Nullable public @Nullable java.lang.String getParameter(int id)
ValidationErrorid}.getParameter in class ValidationError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>id - the error id