Agility plugin small code cleanup
- Do not use 1 line ifs - Mark fields final properly - Remove confusing comments Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -165,11 +165,13 @@ public class AgilityPlugin extends Plugin
|
|||||||
public void onItemLayerChanged(ItemLayerChanged event)
|
public void onItemLayerChanged(ItemLayerChanged event)
|
||||||
{
|
{
|
||||||
if (obstacles.isEmpty())
|
if (obstacles.isEmpty())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Tile tile = event.getTile();
|
final Tile tile = event.getTile();
|
||||||
ItemLayer itemLayer = tile.getItemLayer();
|
final ItemLayer itemLayer = tile.getItemLayer();
|
||||||
boolean hasMark = tileHasMark(itemLayer);
|
final boolean hasMark = tileHasMark(itemLayer);
|
||||||
|
|
||||||
if (markOfGrace != null && tile.getWorldLocation().equals(markOfGrace.getWorldLocation()) && !hasMark)
|
if (markOfGrace != null && tile.getWorldLocation().equals(markOfGrace.getWorldLocation()) && !hasMark)
|
||||||
{
|
{
|
||||||
@@ -203,8 +205,6 @@ public class AgilityPlugin extends Plugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This code, brought to you, in part, by the letters C and V
|
|
||||||
// ... and the words "search" and "replace"
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameObjectSpawned(GameObjectSpawned event)
|
public void onGameObjectSpawned(GameObjectSpawned event)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user