Add String#strip invocations to SpigotListener to remove trailing newline

This commit is contained in:
solo authored and GitHub committed 2021-09-27 10:56:10 -04:00
1 parent 10f62b75b6
commit 764f93f40f
1 file changed
+2 -2
@@ -64,7 +64,7 @@ public class SpigotListener implements Listener {
| that fixes this issue at the source, and doesn't require us to do | | that fixes this issue at the source, and doesn't require us to do |
| stupid band-aids. | | stupid band-aids. |
|------------------------------------------------------------------------| |------------------------------------------------------------------------|
"""); """.strip());
e.setCancelled(true); // Cancel leveling if the villager is a Cartographer, to prevent crashing server. e.setCancelled(true); // Cancel leveling if the villager is a Cartographer, to prevent crashing server.
} }
} }
@@ -79,7 +79,7 @@ public class SpigotListener implements Listener {
| fixes this issue at the source, and doesn't require us to do stupid | | fixes this issue at the source, and doesn't require us to do stupid |
| band-aids. | | band-aids. |
|------------------------------------------------------------------------| |------------------------------------------------------------------------|
"""); """.strip());
e.getEntity().setProfession(Villager.Profession.NITWIT); // Give villager new profession to prevent server crash. e.getEntity().setProfession(Villager.Profession.NITWIT); // Give villager new profession to prevent server crash.
e.setCancelled(true); e.setCancelled(true);
} }