1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Ok this is really weird

Discussion in 'Help' started by WinterHell, Apr 12, 2021.

  1. WinterHell

    WinterHell Spider

    Messages:
    6
    GitHub:
    WinterHellMC
    OK, I made a plugin and converted it into phar using dev tools. The plugin is working well no issue then I restart the server now the command is shown in the suggestion but it doesn't work. And I restart again it works again and I restart it it doesn't work again and repeats on the loop can someone help me.
    this is a really weird issue it happens to 90% of the plugin I make
     

    Attached Files:

  2. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Have you tried debugging
     
  3. WinterHell

    WinterHell Spider

    Messages:
    6
    GitHub:
    WinterHellMC
    where can i do that
     
  4. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Have you tried learning php

    Just kidding.
    Add some "echos" in your code to see which code isn't being executed
     
  5. WinterHell

    WinterHell Spider

    Messages:
    6
    GitHub:
    WinterHellMC
    I mean i know php lmfao. as i said even with echo. The command works fine but when i restart the server command executes nothing amd restart again it works restart again it dosent work. Its like plugin ahs mood when to work and when not to. Understand what im saying
     
  6. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Does the plugin load when it’s not “working”
     
  7. WinterHell

    WinterHell Spider

    Messages:
    6
    GitHub:
    WinterHellMC
    yes it does load the command is visible even in cmd suggestion list but dosent work when not working
     
  8. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Hmm, I see. Let me install the plugin and do some things around and try to find out what the problem is.
    In the meanwhile, could you see if any other plugins in-use are causing it?
     
  9. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    The plugin is working perfectly fine for me.
    I noticed that you wrote
    PHP:
    $sender->getInventory()->setItem(3$item1true);
    ...
    $sender->getInventory()->setItem(5$itemtrue);
    As you probably know, this sets(also will replace) the given item to the given inventory slot.
    Perhaps you're mistaking this as the command not working?
     
    WinterHell and Primus like this.
  10. WinterHell

    WinterHell Spider

    Messages:
    6
    GitHub:
    WinterHellMC
    nope even when i have nothing in my inventory it dosent work
     
  11. WinterHell

    WinterHell Spider

    Messages:
    6
    GitHub:
    WinterHellMC
    and the plugin wont work after you restart again
     
  12. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Yeah, I'm restarting my server and it's still working.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.