[Suggestion] Edit Disconnect Messages

Discussion in 'Suggestion Box Archives' started by finch_rocks_1, Dec 13, 2016.

  1. I just want to make a little note here: I'm not using a small screen at all, in fact, I'm using a television as main screen, but I know some people play minecraft on laptops that have got like 16ins screens, and I feel like we still sould think about those people aswell :)
    jkrmnj likes this.
  2. It does not have anything to do with your Screen size, its your Resolution that you play in. I play on a Laptop 17inch, and its a 1080p.
    607 and Jelle68 like this.
  3. + ∞!
    finch_rocks_1 likes this.
  4. Minecraft also modifies the size of UI elements to match your window. I play Minecraft with a resolution of 840x480 and can see just fine.

    The way I was thinking would be something like:
    Code:
    //Somewhere in a QuitEvent function with the event equal to p
    
    Player player = p.getPlayer()
    //I have no idea how EMC actually would get the player's server...
    Server currentServer = getServer(Player);
    if (currentServer != null) {
        //Once again, no idea how EMC stores server details internally
        quitMessage = p.player.getName() + " switched to " + currentServer.name;
    }
    else {
        quitMessage = p.player.getName() + " has disconnected";
    }
    
    p.setQuitMessage(quitMessage);
    willies952002, TomvanWijnen and 607 like this.
  5. Maybe instead of "finch_rocks_1 Disconnected, and joined SMP#", what about "finch_rocks_1 switched to SMP#" ?

    And for connection messages coming from other SMPs, maybe "finch_rocks_1 connected, coming from SMP#"?

    Depending on how session logging is done, this could be as easy as checking if the player already has an active session and what server they just came from, or as hard as looking up some other information that I don't have the privilege to know about.

    Anyways... +1 :D
    607 and finch_rocks_1 like this.
  6. #CodeTalk :D

    Btw... it would be a bit more like...
    Code:
    public void onSwitch(ServerSwitchEvent event) {
    ProxiedPlayer player = event.getPlayer()
    Server currentServer = player.getServer();
    if (currentServer != null) {
        quitMessage = p.player.getName() + " switched to " + currentServer.getInfo().getName();
    } else {
        quitMessage = p.player.getName() + " has disconnected";
    }
    
    event.setQuitMessage(quitMessage);
    jkrmnj likes this.
  7. Like i said, My Text way is a Rough Idea :p
    607 and willies952002 like this.
  8. I don't think it would take two lines if you have something like...
    "{Player} disconnected - Joined SMP{#}"
    You would need to have an extremely small screen for it to take 2 lines.