Lazy load Economy reference in MoneyThingParser.
The eager loading results in nothing but nulls because ThingManager (and, by proxy, MoneyThingParser) is instantiated on load, while the Economy provider from Vault is fetched on enable.
The bug was introduced with 4c34a183c7.
This fixes #451
This commit is contained in:
@@ -22,7 +22,7 @@ public class MoneyThingParserTest {
|
||||
@Before
|
||||
public void setup() {
|
||||
Economy economy = mock(Economy.class);
|
||||
subject = new MoneyThingParser(economy);
|
||||
subject = new MoneyThingParser(() -> economy);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user