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:
parent
b91b54a9fc
commit
82487805b4
@ -33,7 +33,7 @@ public class CellSignListener implements Listener {
|
|||||||
if(lines.size() >= 4) lineFour = lines.get(3);
|
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) {
|
public void changeTheCellSigns(final PrisonerTimeChangeEvent event) {
|
||||||
pl.getServer().getScheduler().scheduleSyncDelayedTask(pl, new Runnable() {
|
pl.getServer().getScheduler().scheduleSyncDelayedTask(pl, new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -160,6 +160,12 @@ public class CellSignListener implements Listener {
|
|||||||
public void handleSignLineUpdates(JailPluginReloadedEvent event) {
|
public void handleSignLineUpdates(JailPluginReloadedEvent event) {
|
||||||
List<String> lines = pl.getConfig().getStringList(Settings.CELLSIGNLINES.getPath());
|
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() >= 1) lineOne = lines.get(0);
|
||||||
if(lines.size() >= 2) lineTwo = lines.get(1);
|
if(lines.size() >= 2) lineTwo = lines.get(1);
|
||||||
if(lines.size() >= 3) lineThree = lines.get(2);
|
if(lines.size() >= 3) lineThree = lines.get(2);
|
||||||
|
Loading…
Reference in New Issue
Block a user