@@ -57,59 +57,59 @@ public class OneBlockIslands implements DataObject {
5757 */
5858 @ NonNull
5959 public String getPhaseName () {
60- return phaseName == null ? "" : phaseName ;
60+ return phaseName == null ? "" : phaseName ;
6161 }
6262
6363 /**
6464 * @param phaseName the phaseName to set
6565 */
6666 public void setPhaseName (String phaseName ) {
67- this .phaseName = phaseName ;
67+ this .phaseName = phaseName ;
6868 }
6969
7070 public OneBlockIslands (String uniqueId ) {
71- this .uniqueId = uniqueId ;
71+ this .uniqueId = uniqueId ;
7272 }
7373
7474 /**
7575 * @return the blockNumber
7676 */
7777 public int getBlockNumber () {
78- return blockNumber ;
78+ return blockNumber ;
7979 }
8080
8181 /**
8282 * @param blockNumber the blockNumber to set
8383 */
8484 public void setBlockNumber (int blockNumber ) {
85- this .blockNumber = blockNumber ;
85+ this .blockNumber = blockNumber ;
8686 }
8787
8888 /**
8989 * Increments the block number
9090 */
9191 public void incrementBlockNumber () {
92- // Ensure that lifetime is always at least blockNumber
93- if (this .lifetime < this .blockNumber ) {
94- this .lifetime = this .blockNumber ;
95- }
96- this .blockNumber ++;
97- this .lifetime ++;
92+ // Ensure that lifetime is always at least blockNumber
93+ if (this .lifetime < this .blockNumber ) {
94+ this .lifetime = this .blockNumber ;
95+ }
96+ this .blockNumber ++;
97+ this .lifetime ++;
9898 }
9999
100100 /**
101101 * @return the hologram Line
102102 */
103103 @ NonNull
104104 public String getHologram () {
105- return hologram == null ? "" : hologram ;
105+ return hologram == null ? "" : hologram ;
106106 }
107107
108108 /**
109109 * @param hologramLine Hologram line
110110 */
111111 public void setHologram (String hologramLine ) {
112- this .hologram = hologramLine ;
112+ this .hologram = hologramLine ;
113113 }
114114
115115 /*
@@ -119,7 +119,7 @@ public void setHologram(String hologramLine) {
119119 */
120120 @ Override
121121 public String getUniqueId () {
122- return uniqueId ;
122+ return uniqueId ;
123123 }
124124
125125 /*
@@ -131,16 +131,16 @@ public String getUniqueId() {
131131 */
132132 @ Override
133133 public void setUniqueId (String uniqueId ) {
134- this .uniqueId = uniqueId ;
134+ this .uniqueId = uniqueId ;
135135 }
136136
137137 /**
138138 * @return the queue
139139 */
140140 public Queue <OneBlockObject > getQueue () {
141- if (queue == null )
142- queue = new LinkedList <>();
143- return queue ;
141+ if (queue == null )
142+ queue = new LinkedList <>();
143+ return queue ;
144144 }
145145
146146 /**
@@ -150,16 +150,16 @@ public Queue<OneBlockObject> getQueue() {
150150 * @return list of upcoming mobs
151151 */
152152 public List <EntityType > getNearestMob (int i ) {
153- return getQueue ().stream ().limit (i ).filter (obo ->
154- // Include OneBlockObjects that are Entity, or custom block of type
155- // MobCustomBlock
156- obo .isEntity () || (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock )).map (obo -> {
157- if (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock mb ) {
158- return mb .getMob ();
159- }
153+ return getQueue ().stream ().limit (i ).filter (obo ->
154+ // Include OneBlockObjects that are Entity, or custom block of type
155+ // MobCustomBlock
156+ obo .isEntity () || (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock )).map (obo -> {
157+ if (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock mb ) {
158+ return mb .getMob ();
159+ }
160160
161- return obo .getEntityType ();
162- }).toList ();
161+ return obo .getEntityType ();
162+ }).toList ();
163163 }
164164
165165 /**
@@ -168,7 +168,7 @@ public List<EntityType> getNearestMob(int i) {
168168 * @param nextBlock the OneBlockObject to be added
169169 */
170170 public void add (OneBlockObject nextBlock ) {
171- getQueue ().add (nextBlock );
171+ getQueue ().add (nextBlock );
172172 }
173173
174174 /**
@@ -182,49 +182,49 @@ public void add(OneBlockObject nextBlock) {
182182 * empty.
183183 */
184184 public OneBlockObject pollAndAdd (OneBlockObject toAdd ) {
185- getQueue ();
186- OneBlockObject b = queue .poll ();
187- queue .add (toAdd );
188- return b ;
185+ getQueue ();
186+ OneBlockObject b = queue .poll ();
187+ queue .add (toAdd );
188+ return b ;
189189 }
190190
191191 /**
192192 * Clear the look ahead queue
193193 */
194194 public void clearQueue () {
195- getQueue ().clear ();
195+ getQueue ().clear ();
196196 }
197197
198198 /**
199199 * @return the lifetime number of blocks broken not including the current block
200200 * count
201201 */
202202 public long getLifetime () {
203- // Ensure that lifetime is always at least blockNumber
204- if (this .lifetime < this .blockNumber ) {
205- this .lifetime = this .blockNumber ;
206- }
207- return lifetime ;
203+ // Ensure that lifetime is always at least blockNumber
204+ if (this .lifetime < this .blockNumber ) {
205+ this .lifetime = this .blockNumber ;
206+ }
207+ return lifetime ;
208208 }
209209
210210 /**
211211 * @param lifetime lifetime number of blocks broken to set
212212 */
213213 public void setLifetime (long lifetime ) {
214- this .lifetime = lifetime ;
214+ this .lifetime = lifetime ;
215215 }
216216
217217 /**
218218 * @return Timestamp of last phase change
219219 */
220220 public long getLastPhaseChangeTime () {
221- return this .lastPhaseChangeTime ;
221+ return this .lastPhaseChangeTime ;
222222 }
223223
224224 /**
225225 * @param lastPhaseChangeTime Timestamp of last phase change
226226 */
227227 public void setLastPhaseChangeTime (long lastPhaseChangeTime ) {
228- this .lastPhaseChangeTime = lastPhaseChangeTime ;
228+ this .lastPhaseChangeTime = lastPhaseChangeTime ;
229229 }
230230}
0 commit comments