Add String#strip invocations to SpigotListener to remove trailing newline

This commit is contained in:
solo 2021-09-27 10:56:10 -04:00 committed by GitHub
parent 10f62b75b6
commit 764f93f40f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
} }