let default_config =
{
Language: 'en_US',
CreateCost: 0, // Create Union Fee
CreateAuthority: true, // Do you need permission from the server owner to create an union(/union lord "error block" true)
UnionNameLimit: 15, // Maximum number of characters in union name
UnionDiscriptionLimit: 100, // Maximum number of characters in union description
TpaEnabled: false, // Allow delivery to union members
TpaPrice: 0, // Tpa price
TpPosEnabled: false, // Whether to enable the transfer anchor(TP pos) function
TpPosPrice: 0, // Set TP pos price(Delete non return coins)
TpPosNum: 2, // TP pos limit quantity
BillSavedDays: 60, // Days to save bills and logs (form) except the logs under ./log/WnUnion/
BankEnabled: false, // Whether to activate the alliance bank function
UnionChat: true, // Enable intra union chat
ChatMedal: false, // Chat Medal(Conflicts with other chat plugins)
PAPI: false, // enabled: PAPI BEPlaceholderAPI | UnionMedal: %player_UnionMedal% | UnionLevel: %player_UnionLevel%,please install pre plugin [URL='https://github.com/GroupMountain/GMLIB']GMLIB[/URL] and [URL='https://github.com/GroupMountain/GMLIB-LegacyRemoteCallApi']GMLIB-LegacyRemoteCallApi[/URL]
BlockPlaceEnabled: true, // enabled: Place blocks to obtain points
EconomyType: 'llmoney', // llmoney, scoreboard, func(external function)
EconomyName: '§r§eCoin§r', //
EconomyScoreBoardName: '', //
EconomyFunc: {
namespace: '', //
getMoney: 'getMoney', //
setMoney: 'setMoney',
addMoney: 'addMoney',
reduceMoney: 'reduceMoney',
}
}
;
mc.listen('onServerStarted', ()=>{
if (ll.hasExported('WnUnion', 'getUnionData')){
WnUnion.getUnionData = ll.imports('WnUnion', 'getUnionData');
WnUnion.getPlayerData = ll.imports('WnUnion', 'getPlayerData');
WnUnion.getMedal = ll.imports('WnUnion', 'getMedal');
WnUnion.saveUnion = ll.imports('WnUnion', 'saveUnion');
WnUnion.sendPlayerNotice = ll.imports('WnUnion', 'sendPlayerNotice');
WnUnion.sendUnionNotice = ll.imports('WnUnion', 'sendUnionNotice');
WnUnion.addUnionLog = ll.imports('WnUnion', 'addUnionLog');
WnUnion.addUnionMoney = ll.imports('WnUnion', 'addUnionMoney');
WnUnion.addPlayerConstruct = ll.imports('WnUnion', 'addPlayerConstruct');
WnUnion.addUnionConstruct = ll.imports('WnUnion', 'addUnionConstruct');
WnUnion.getMoney = ll.imports('WnUnion', 'getMoney');
WnUnion.addMoney = ll.imports('WnUnion', 'addMoney');
WnUnion.reduceMoney = ll.imports('WnUnion', 'reduceMoney');
WnUnion.setMoney = ll.imports('WnUnion', 'setMoney');
}else{
logger.error(`WnUnion API获取失败, 请检查经WnUnion插件状态`);
}
});
setInterval(()=>{
for (let pl of mc.getOnlinePlayers()){
if (pl!=null){
WnUnion.addPlayerConstruct(pl.xuid, 1);
pl.tell('blockplaceScore +1');
}
}
},1000);