"Reached end of stream" error...

Discussion in 'Plugin Development' started by Notate, Sep 4, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Notate

    Code:java
    1. @EventHandler
    2. public void DamagePlayer(EntityDamageEvent damageEvent){
    3. if(damageEvent instanceof EntityDamageByEntityEvent){
    4. EntityDamageByEntityEvent e = (EntityDamageByEntityEvent)damageEvent;
    5. if(ic.pvp_in_team == false){
    6. if(e.getDamager() instanceof Player){
    7. if(e.getEntity() instanceof Player){
    8. Player d = (Player) e.getDamager();
    9. Player de = (Player) damageEvent.getEntity();
    10. if(de.getWorld().getName().equalsIgnoreCase(d.getWorld().getName())){
    11. if(de.getWorld().getName().equalsIgnoreCase("uhc_world")){
    12. String dt = ic.team.get(de);
    13. String et = ic.team.get(e);
    14. if(dt.equalsIgnoreCase(et)){
    15. d.sendMessage(ChatColor.RED + "Spilleren er på laget ditt!");
    16. damageEvent.setCancelled(true);
    17. }
    18. }
    19. }
    20. }
    21. }
    22. }
    23. }
    24. }

    I think this is crashing my server, when I hit a mob/animal it is crashing.
    Or it is code?
    Code:java
    1. Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable() {
    2. @Override
    3. public void run() {
    4. if((startedCountdown == true && gameStarted == false) || (startedCountdown == false && gameStarted == true)){
    5. if(timerLeft != 0 && gameStarted == false){
    6. timerLeft = timerLeft - 1;
    7. if(timerLeft == 20 || timerLeft == 10 || timerLeft == 5 || timerLeft == 4 || timerLeft == 3 || timerLeft == 2 || timerLeft == 1){
    8. sendMessageToAllPlayersInUHC("Det er nå " + ChatColor.RED + timerLeft + ChatColor.RESET + " sekunder igjen til spillet begynner!");
    9. }
    10. } else if(timerLeft <= 0 && gameStarted == false){
    11. SMTWP("'gameStarted' ble satt over til true.", "uhc.admin.getadminmessage");
    12. gameStarted = true;
    13. timerLeft = conf.getInt("countdownseconds");
    14. startedCountdown = false;
    15. SMTWP("'startedCountdown' ble satt over til false, men det vil ikke skade spillet.", "uhc.admin.getadminmessage");
    16. sendMessageToAllPlayersInUHC("Spillet har begynt!");
    17.  
    18. }
    19.  
    20. if(gameStarted == true){
    21. broadcast30min ++;
    22. timerStarted++;
    23. if(broadcast30min == broadcastminute){
    24. if(splitRecording == true){
    25. sendMessageToAllPlayersInUHC("Det har nå gått nye "+conf2.getInt("splitrecordingloop")+" minutter!");
    26. sendMessageToAllPlayersInUHC("Det vil si at det har gått " + (timerStarted/60) + " minutter av hele spillet");
    27. } else {
    28. sendMessageToAllPlayersInUHC("Det har gått " + (timerStarted/60) + " minutter av hele spillet");
    29. }
    30.  
    31. broadcast30min = 0;
    32.  
    33. }
    34. }
    35.  
    36.  
    37. }
    38. }
    39. }
    40. , 0L, 20L);
     
  2. Offline

    metalhedd

    paste the full error in the server log
     
  3. Offline

    Notate

    Its just crashing my server, no more. No error.
     
  4. Offline

    metalhedd


    A crash produces an error message in the logs. If there's nothing at all in the logs, then what exactly is happening?
     
  5. Offline

    Notate

    2013-09-04 18:00:39 [SEVERE] Reached end of stream (IP)
    I got this, and it is spamming :/
     
  6. Offline

    metalhedd


    that's not related to the problem, that's perfectly harmless minecraft server spam.
     
  7. Offline

    Notate

    that is the only message I got. And it is spamming now..
     
  8. Offline

    metalhedd

    no one can help you without a stack trace from the 'crash'. it sounds like your server is working right now, isn't it?. when it crashes, or stops working, then check the server log. In the mean time, can you explain what you mean when you say it 'crashes'... does it just stop allowing connections? does everyone in game get kicked? does it just lag really bad?
     
  9. Offline

    Notate

    Players will get a timeout message, and they cannot connect anymore...
     
  10. Offline

    Notate

    Checked the console now, and it is still printing..
     
  11. Offline

    Notate

    Bump: It is anybody there who knows the error? I don't get a error message.
     
  12. Notate Any reason why you are casting the EntityDamageEvent to EntityDamageByEntityEvent and not directly listening to that second one?
     
  13. Offline

    Notate

    I dunno why i did, i just did that xD What I am got to do?

    But is this the code? Is this almost crashing my server?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  14. Offline

    Notate

    Bump again.. I REALLY NEED HELP!!!
     
  15. Offline

    Janmm14

    Normally this reached end of stream thing is coming when a mineceaft client loades the server list.
    Fixed in newest minecraft VANILLA server.
     
  16. Offline

    WauloK

    This:
    is happening on EVERYONE's console. It happens when they start Minecraft and the application pings your server to see if it is alive. Unfortunately, it puts this [SEVERE] error in the console when it means nothing and can be ignored. As Janmm14 said, it's fixed in the next update so you won't see it, but it's not from your program.
     
Thread Status:
Not open for further replies.

Share This Page