Clear the sign lines before reloading

Wasn't reported yet, but if someone removed a line from the sign the old
one would still show up as we didn't clear the lines before reloading.
This commit is contained in:
graywolf336 2015-06-03 10:40:42 -05:00
parent b91b54a9fc
commit 82487805b4

View File

@ -33,7 +33,7 @@ public class CellSignListener implements Listener {
if(lines.size() >= 4) lineFour = lines.get(3);
}
@EventHandler(ignoreCancelled=true, priority = EventPriority.MONITOR)
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void changeTheCellSigns(final PrisonerTimeChangeEvent event) {
pl.getServer().getScheduler().scheduleSyncDelayedTask(pl, new Runnable() {
public void run() {
@ -160,6 +160,12 @@ public class CellSignListener implements Listener {
public void handleSignLineUpdates(JailPluginReloadedEvent event) {
List<String> lines = pl.getConfig().getStringList(Settings.CELLSIGNLINES.getPath());
//Reset the lines to nothing
lineOne = "";
lineTwo = "";
lineThree = "";
lineFour = "";
if(lines.size() >= 1) lineOne = lines.get(0);
if(lines.size() >= 2) lineTwo = lines.get(1);
if(lines.size() >= 3) lineThree = lines.get(2);