Changed to use easier way.

This commit is contained in:
darbyjack 2019-05-08 15:05:30 -05:00
parent 9a2fb89e43
commit 5aaa9720c8
No known key found for this signature in database
GPG Key ID: 392E68B2FE0ED3E5

View File

@ -21,9 +21,7 @@ public class ServerLoadEventListener implements Listener {
final Map<String, PlaceholderHook> alreadyRegistered = PlaceholderAPI.getPlaceholders();
plugin.getExpansionManager().registerAllExpansions();
if (alreadyRegistered != null && !alreadyRegistered.isEmpty()) {
alreadyRegistered.entrySet().stream().forEach(hook -> {
PlaceholderAPI.registerPlaceholderHook(hook.getKey(), hook.getValue());
});
alreadyRegistered.forEach(PlaceholderAPI::registerPlaceholderHook);
}
}
}