forked from Upstream/mmocore
!Changed MMOLib instance generator
Updated lib
This commit is contained in:
parent
fcaaecd441
commit
5eb88a912f
BIN
lib/MMOLib.jar
BIN
lib/MMOLib.jar
Binary file not shown.
@ -89,6 +89,7 @@ import net.Indyuce.mmocore.manager.social.PartyManager;
|
|||||||
import net.Indyuce.mmocore.manager.social.RequestManager;
|
import net.Indyuce.mmocore.manager.social.RequestManager;
|
||||||
import net.mmogroup.mmolib.api.stat.StatMap;
|
import net.mmogroup.mmolib.api.stat.StatMap;
|
||||||
import net.mmogroup.mmolib.api.stat.instance.MMOCoreStatInstance;
|
import net.mmogroup.mmolib.api.stat.instance.MMOCoreStatInstance;
|
||||||
|
import net.mmogroup.mmolib.api.stat.instance.SimpleStatInstance;
|
||||||
import net.mmogroup.mmolib.comp.Metrics;
|
import net.mmogroup.mmolib.comp.Metrics;
|
||||||
|
|
||||||
public class MMOCore extends JavaPlugin {
|
public class MMOCore extends JavaPlugin {
|
||||||
@ -161,7 +162,13 @@ public class MMOCore extends JavaPlugin {
|
|||||||
* specific stat instances let MMOLib calculate stats with set base
|
* specific stat instances let MMOLib calculate stats with set base
|
||||||
* value
|
* value
|
||||||
*/
|
*/
|
||||||
StatMap.setInstanceGenerator((map, stat) -> new MMOCoreStatInstance(map, stat));
|
StatMap.setInstanceGenerator((map, stat) -> {
|
||||||
|
try {
|
||||||
|
return new MMOCoreStatInstance(map, StatType.valueOf(stat));
|
||||||
|
} catch (IllegalArgumentException notMMOCoreStat) {
|
||||||
|
return new SimpleStatInstance(map, stat);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (Bukkit.getPluginManager().getPlugin("Vault") != null)
|
if (Bukkit.getPluginManager().getPlugin("Vault") != null)
|
||||||
economy = new VaultEconomy();
|
economy = new VaultEconomy();
|
||||||
|
Loading…
Reference in New Issue
Block a user