Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Do you want Shoghi to allow VoteReward?

Comments in 'Plugin Development' started by LDX, Jun 7, 2014.

?

Do you want VoteReward to be available on the plugin repository?

  1. Yes

    8 vote(s)
    61.5%
  2. No

    5 vote(s)
    38.5%
Thread Status:
Not open for further replies.
  1. Jag
    Offline

    Jag Active Member

    Joined:
    Mar 26, 2014
    Posts:
    53
    Minecraft User:
    Jag
    Ok somewhat stupid question, is this very common? Like its normal for most web sites to get really slow a few times a day, so by using this plugin you are just asking for lag? Or are we talking once in a blue moon where its slow enough to be noticeable?

    I would think that only a handful of players each hour would use /vote (some legitimate, some just curious). Which is far less than many other commands like teleporting, warping etc.

    There is a big difference in the risk between: 1) this will lag your server every night during busy hours, or 2) only if the web site is under attack will you every notice.

    Let me know if this question is just unanswerable, which is actually an answer in itself.
  2. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I am aware of that. ;)
  3. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    Unless someone programs a bot to come on and spam the server with /vote 50,000 times a second, you won't even notice. As for the website being under attack, I believe it is DDoS protected.
    tnpxxsheepdog likes this.
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If that happens, you don't need to have that command and it would aos lag the server.

    Remember the spammer who used /tell @a @a @a @a @a in huntereb's server... 20 players -> 20^5 commands -> 20^5 * 2 packets -> 6400000
    LDX likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Depends on whether your network can afford 50,000 packets a second, both the spammer and server.
  6. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    If putting it up on the repository allows it to stay up to date and active, then yes. No matter what, please keep the plugin updated! Love it..


    No lag on my end! I have talked to several members of the minecraft pocket servers website and they seem like a good group of devs. They know their stuff and how to keep API and website fast!
    Darunia18 likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    But you still need to do all I/O things outside the main thread.
    Look at how they send the usage.
  8. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    Because I am not a 100% dev, I have no idea what that means. I know basically what threads are and how they interact with the server but other than that...
  9. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I'm working on it! Wish me luck...
  10. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    Good luck!
    LDX likes this.
  11. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    @PEMapModder, is it possible to do this?

    PHP:
    class VoteReward extends Thread implements Plugin {
    Edit: Wow, that was the stupidest idea I've had this week.
    Last edited: Jun 8, 2014
  12. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I've got it working... Sort of. I successfully created a new thread and got the file's contents in it, but the rest of the code executes before it returns the status.
    FunneyShip and tnpxxsheepdog like this.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Call a function in the main thread when it finishes
Thread Status:
Not open for further replies.

Share This Page

Advertisement