MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    Solved 插件之间的不正常调用

    开发交流
    2
    3
    398
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      Ycituss last edited by

      我用同样的指令结构和文件结构写了两个插件,我是用在两个不同的机器人上的,使用没有问题,但是放在同一个 Mirai Console里面,就会出现奇怪的问题。

      setu

      private PluginMain() {
              super(new JvmPluginDescriptionBuilder("com.ycitus.setu", "3.5.0")
                      .name("Setu")
                      .author("ycitus")
                      .build());
          }
      

      mcping

         private MinecraftPing() {
              super(new JvmPluginDescriptionBuilder("com.ycitus.MinecraftPing", "1.0-SNAPSHOT")
                      .name("MinecraftPing")
                      .author("Ycitus")
                      .build());
          }
      

      日志

      2021-09-08 16:38:49 I/MinecraftPing: MinecraftPing >> Enable.
      2021-09-08 16:38:49 I/MinecraftPing: Start Init...
      2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init FileSystem.
      2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init All Configs...
      2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init >> ApplicationConfig.json
      2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Load Local File to Memory >> ApplicationConfig.json
      2021-09-08 16:38:49 I/MinecraftPing: [CommandSystem] Init CommandSystem.
      2021-09-08 16:38:49 I/MinecraftPing: [TimerSystem] Start TimerSystem.
      2021-09-08 16:38:49 I/MinecraftPing: McPing End Init...
      2021-09-08 16:38:49 I/MinecraftPing: Setu >> Enable.
      2021-09-08 16:38:49 I/MinecraftPing: Start Init...
      2021-09-08 16:38:49 I/MinecraftPing: [FileSystem] Init FileSystem.
      2021-09-08 16:38:49 I/MinecraftPing: [CommandSystem] Init CommandSystem.
      2021-09-08 16:38:49 I/MinecraftPing: End Init...
      

      可以看到,写在setu的onEnable()函数里的输出显示输出插件为mcping
      同时setu插件的功能也无法正常使用,监听事件失效。

      有没有大佬知道是为什么

      1 Reply Last reply Reply Quote 0
      • Karlatemp
        Karlatemp last edited by

        99%两个插件的主包名一样

        Y 1 Reply Last reply Reply Quote 1
        • Y
          Ycituss @Karlatemp last edited by

          @karlatemp 原来是因为这个 萌新涨知识

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact