莫幽
本帖最后由 莫幽 于 2021-5-31 11:34 编辑

有什么变量可以查询当前玩家是否具备某种药剂效果,最好是能检测到玩家具备的药剂效果的等级格式是%balabala_<药剂效果名>%或是%balabala_<药剂效果名>_<药剂等级名>%

注: 我想拿这个变量做一些菜单的判定条件,如果变量里是必须使用固定的玩家名(%otherplayer_haspotioneffect_<player>_effect_<effect_name>%)那将毫无帮助...不可能为了某一个玩家做一个专门的菜单啊...

redfish
本帖最后由 redfish 于 2021-5-19 20:12 编辑

非要用插件搞这么复杂的话,推荐一个思路:
1、用命令方块做检测
2、用luckperms的临时权限存储变量
3、用trmenu检测luckperms存储的变量
命令方块不够用的话可以用这个插件ScriptBlockPlus


莫幽
redfish 发表于 2021-5-19 20:09
非要用插件搞这么复杂的话,推荐一个思路:
1、用命令方块做检测
2、用luckperms的临时权限存储变量

没有啥papi提供的变量吗

redfish
本帖最后由 redfish 于 2021-5-21 13:24 编辑
莫幽 发表于 2021-5-21 10:05
没有啥papi提供的变量吗

我好像找到个扩展可以检测,怎么用你应该会吧
  1. OtherPlayer
  2. /papi ecloud download OtherPlayer

  3. Lets you get placeholders for other players. (Not ** that triggers the action)

  4. %otherplayer_displayname_<player>%
  5. %otherplayer_gamemode_<player>%
  6. %otherplayer_hasperm_<player>_perm_<permission.string>%
  7. %otherplayer_haspotioneffect_<player>_effect_<effect_name>%
  8. %otherplayer_health_<player>%
  9. %otherplayer_hunger_<player>%
  10. %otherplayer_iteminhand_<player>%
  11. %otherplayer_ip_<player>%
  12. %otherplayer_level_<player>%
  13. %otherplayer_locx_<player>%
  14. %otherplayer_locy_<player>%
  15. %otherplayer_locz_<player>%
  16. %otherplayer_oxygen_<player>%
  17. %otherplayer_spells_<player>%
  18. %otherplayer_uuid_<player>%
  19. %otherplayer_world_<player>%
复制代码

%otherplayer_haspotioneffect_<player>_effect_<effect_name>%


莫幽
redfish 发表于 2021-5-21 13:10
我好像找到个扩展可以检测,怎么用你应该会吧
%otherplayer_haspotioneffect__effect_%


%otherplayer_haspotioneffect_<player>_effect_<effect_name>%中的<player>应该怎么使用变量代替

redfish
莫幽 发表于 2021-5-22 21:45

%otherplayer_haspotioneffect__effect_%中的应该怎么使用变量代替

应该是只能指定一个玩家名

莫幽
redfish 发表于 2021-5-22 23:03
应该是只能指定一个玩家名

只能指定某一个具体的玩家那...用处太小了吧

redfish
本帖最后由 redfish 于 2021-5-23 15:49 编辑
莫幽 发表于 2021-5-23 12:19
只能指定某一个具体的玩家那...用处太小了吧

你要明白papi本来主要就是用来提取游戏里或者其他插件变量的。

什么事他都干了那其他插件还干啥。
额,搞了这么久,如果需要的话,我帮你弄吧。

莫幽
本帖最后由 莫幽 于 2021-5-31 11:35 编辑

变量内部是否可以使用变量呢?而或是[PLYEAR]之类的二级变量?

除去otherplayer
还有其他变量吗,最好是%xxx_药剂名_等级%

帖子的标题名似乎无法编辑..?