File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
src/com/leontg77/biomeparanoia/listeners Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 2020public class MoveListener implements Listener {
2121
2222 @ EventHandler (ignoreCancelled = true )
23- public void on (final PlayerMoveEvent event ) {
24- final Location from = event .getFrom ();
25- final Location to = event .getTo ();
23+ public void on (PlayerMoveEvent event ) {
24+ Location from = event .getFrom ();
25+ Location to = event .getTo ();
2626
2727 // if they move their head or pixels on the block I don't care, I only care if its a new block.
28- if (from .getBlockX () == to .getBlockX () || from .getBlockZ () == to .getBlockZ ()) {
28+ if (from .getBlockX () == to .getBlockX () && from .getBlockZ () == to .getBlockZ ()) {
2929 return ;
3030 }
3131
32- final Player player = event .getPlayer ();
33- final Biome biome = to .getBlock ().getBiome ();
32+ Player player = event .getPlayer ();
33+ Biome biome = to .getBlock ().getBiome ();
3434
3535 // no need to set it if its the same biome, that would just lag.
36- if (from .getBlock ().getBiome ().equals (biome )) {
36+ if (from .getBlock ().getBiome ().name (). equals (biome . name () )) {
3737 return ;
3838 }
3939
40- final String biomeColor = Utils .getBiomeColor (biome );
41- final String name = player .getName ();
40+ String biomeColor = Utils .getBiomeColor (biome );
41+ String name = player .getName ();
4242
4343 try {
4444 // if their gamemode is spectator mode, we don't want to set a color.
You can’t perform that action at this time.
0 commit comments