Keeps giving rulebook to players even if they are listed in the hasread.txt #1


  • New
  • Defect
Open
Assigned to _ForgeUser7037478
  • Schwajo created this issue Aug 12, 2012

    No errors or anything. Works great other than It keeps giving out the book every time you rejoin the server. It also deletes anything you are holding in your 1st slot.

  • Schwajo added the tags New Defect Aug 12, 2012
  • _ForgeUser7018366 posted a comment Aug 13, 2012

    Same problem here. All players are getting a rulebook every time they join.

    The same player is getting his name added to hasread.txt every time they join as well.

    I would use hasread.txt exclusively instead of relying on .hasPlayedBefore, I've never had good luck with it.


    Edited Aug 13, 2012
  • _ForgeUser8960599 posted a comment Aug 16, 2012

    So do I. There are tons of users that find their first inv slot replaced by the book!

  • _ForgeUser7323256 posted a comment Sep 30, 2012

    Yeah same issue.
    After a server restart if a person has been given it though they no longer get spammed with them.

    The problem is that it does not update the list of users who have already read it as it goes. It only reads that in when it is enabled. It updates the file when it gives it to new people but i never updates the variable that holds all this info.

    It's an easy fix.

    When he updates hasread.txt in the onPlayerJoin event he needs to update the "received" variable.

    received.add(event.getPlayer().getName())


To post a comment, please login or register a new account.