Command cause to server lag if you have to check playerdata/playerdatafor in command in PlayerJoinEvent #346


Open
  • tudubucket created this issue Aug 17, 2022

    Edit: or it's cause by some MyCommand placeholder that im using in this command ($get_ip, $player, ...) 

     

    My server have a command to check player when they join (im using playerjoin in playerevents.yml):


    join-server-event:


    command: /joined-server
    type: RUN_CONSOLE
    runcmd:
    # Check list of Admin
    - "$Script$%if%$PlayerDataFor%ServerData%bucketCommand.adminList%.contains=$player<and>$PlayerData%bucketCommand.adminIPList%.notcontains=$get_ip"
    - '/kick $player &fInternal Exception: java.net.SocketException: Connection reset -s'
    #- '$log$Administrator "$player | $get_ip" failed to login to server1.'
    - '/discordsrv broadcast #admin-chat ...'

    - "$Script$%elseif%......'


    register: true
    permission-required: false
    log_filename: adminloginevent.log.toml

     

    This command sometime cause lag spike (for about 10 - 11 seconds), you can see some image under here:

     

    Server has not responding for 10 seconds 

     

    Timings Report before & after using that command

     

     

    Is there any algorithm to solve this problem?

  • tudubucket edited description Aug 17, 2022

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