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

Chat

Comments in 'Plugin Development' started by pub4game, Oct 3, 2015.

  1. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    please help to block duplicate messages (flood)

    Attached Files:

  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Blame PocketMine. :p I'm pretty sure it's possible, I just don't know how. I'm a noob. ;)
  3. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    :( I need help. This can be done, but I don't know how...
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is not possible. MCPE would ask the server to send the packet again if it lost it during transferring (NACK). But actually, it got the packet maybe just the moment after sending the NACK.
    But actually, MCPE should ignore the duplicated packet sent from NACK. Somehow it doesn't.

    It is possible to resolve this issue by modifying RakLib (or maybe just some Player.php internals), but it will result in other issues such as packet loss.
    pub4game likes this.
  5. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    It's possible! If you want I can write ip and port of the server on which there such a thing)
  6. pomee4
    Offline

    pomee4 Active Member

    Joined:
    Jul 8, 2015
    Posts:
    106
    Minecraft User:
    pomee4
    There is a plugin called ChatCensor (if i remember right) what can ignore fast message sending, you can change the time between the 2 message. Its not prevent duplicated messages but prevent flooding
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Wait, do you mean purposely spam or the bug where messages are sent multiple times?
    pub4game likes this.
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
  9. pomee4
    Offline

    pomee4 Active Member

    Joined:
    Jul 8, 2015
    Posts:
    106
    Minecraft User:
    pomee4
    Flood means someone send messages rapidly (if i'm right) duplicated messages are a bug (agin if im right)
  10. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    Wooooowwww!!!! Thanks

    RuntimeException: "Argument 1 passed to pocketmine\plugin\PluginManager::registerEvents() must implement interface pocketmine\event\Listener, instance of PEMapModder\NoRepeat\Main given, called in phar://C:/PocketMine-MP/plugins/qW0jTYcxibE_.phar/src/PEMapModder/NoRepeat/Main.php on line 13 and defined" (E_RECOVERABLE_ERROR) in "/src/pocketmine/plugin/PluginManager" at line 698

    Error :(
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Fixed.
    pub4game likes this.
  12. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30

    "Could not pass event 'pocketmine\event\player\PlayerChatEvent' to 'NoRepeat v1.0': Invalid argument supplied for foreach() on PEMapModder\NoRepeat\Main
    RuntimeException: "Invalid argument supplied for foreach()" (E_WARNING) in "/KI8f8FsBT8I_.phar/src/PEMapModder/NoRepeat/Main" at line 22
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Fixed.
    Please like if it works :p
    pub4game likes this.
  14. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    :( like? No problem. Does not work

    Attached Files:

  15. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
  16. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    I believe it's one message being sent multiple times to a client. I notice this sometimes. Anyways if I'm wrong, assume it's a player spamming the chat.
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I just read the image again, I suppose that that lag wouldn't go as bad as filling the whole screen :p
    I fixed it. I thought I posted it, probably something interrupted me and I forgot to post the update.
    pub4game likes this.
  18. pub4game
    Offline

    pub4game New Member

    Joined:
    Feb 28, 2015
    Posts:
    30
    Thank you so much, you helped me a lot
  19. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    After all, it just depends on the message length. The most messages(due to lag) I've ever seen in gameplay was 8.
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is by a small extent related to message length. Mostly, if a player sees a packet arriving before another, which is usually caused by lag, such issue would occur.

Share This Page

Advertisement