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

Change [Server] to something else

Comments in 'Plugin Development' started by Andrey Nazarchuk, Jun 25, 2014.

  1. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    Hey people, I have a question: Is there a way to modify the code or something so that it says [FreeBuild] Someone joined the game (and things like that) instead of [Server] ?
    Thanks!
    Last edited: Jun 25, 2014
  2. PluginMastered
    Offline

    PluginMastered Active Member

    Joined:
    Mar 1, 2014
    Posts:
    161
    Minecraft User:
    Flexa33
    Want me to make a plugin???
  3. PluginMastered
    Offline

    PluginMastered Active Member

    Joined:
    Mar 1, 2014
    Posts:
    161
    Minecraft User:
    Flexa33
    There That Should Do It If You Want Me To Make There Names To Be Displayed Then Tell Me

    Attached Files:

    Andrey Nazarchuk likes this.
  4. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    wait so this plugin changes the server so that every time it says [FreeBuild] instead of [Server]?
  5. PluginMastered
    Offline

    PluginMastered Active Member

    Joined:
    Mar 1, 2014
    Posts:
    161
    Minecraft User:
    Flexa33
    no its makes it say so when a player joins it says [FreeBuild] A Player Has Joined The Game you have to look around in your src but I wouldn't recommend it might break your server so if you do it back up your files
  6. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    Well I tryed nd could not find it :(
    but thanks for helping me :)
  7. PluginMastered
    Offline

    PluginMastered Active Member

    Joined:
    Mar 1, 2014
    Posts:
    161
    Minecraft User:
    Flexa33
    look in src /api look thru all of those and see if you find recomemended is ChatAPI.php
  8. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
  9. PluginMastered
    Offline

    PluginMastered Active Member

    Joined:
    Mar 1, 2014
    Posts:
    161
    Minecraft User:
    Flexa33
    np
  10. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Easy, listen on events, cancel them, and broadcast manually with a different prefix!
    PluginMastered likes this.
  11. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    Player join messages are client-side. You can not cancel them until 1.4.
  12. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    And how would i do that?
    Sorry noob.
    thanks for being patient
  13. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Actually not, when a client join the game, the server sends a chat packet containing the join message.
  14. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    You're mistaken. @shoghicp himself told me it was client side, after I searched the entire SRC in Github.
    iJoshuaHD likes this.
  15. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,132
    Plugins:
    4
    Minecraft User:
    iksaku
    It will be only available for the New API, use an event alike:
    PHP:
    public function onPlayerJoin(PlayerJoinEvent $event){
        
    $event->setJoinMessage("here comes your message");
    }
  16. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
  17. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    It is NOT client side! It is just not possible through a plugin in the Old API.
  18. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    But you know how on lifeboat its says [LifeBoat] instead of [Server]
    Is there a way to modify the code to change that?
  19. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    You can modify the PocketMine source code... But you would have to dig deep.
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No. Look at this example code (supposed to be first-class top secret in LegionPE, but it is written by me and it is old API so I don't mind giving this out now); I tested it for a million times on LegionPE, and a <server> @player joiend the game message appears every time.
    PHP:
    public function showCmd($c$a$issuer){
    if(!(
    $issuer instanceof Player))
                return 
    "You aren't supposed to see any players with $issuer anyway, right?";
            if(!isset(
    $a[0]))return "Usage: /show <player>, fixes an invisibility bug";
            if(
    $a[0]==="all"){
                foreach(
    $this->api->player->getAll($issuer->entity->level) as $p$p->entity->spawn($issuer);
                return 
    "Spawned all players in your world to you.";
            }
            
    $p $this->api->player->get($a[0]);
            if(!(
    $p instanceof Player))
                return 
    "Error: No player with name similar to $a[0] is found.";
            if(
    $p->entity->level->getName() !== $issuer->entity->level->getName()) return "$p is not in the same level of you!";
            
    $p->entity->spawn($issuer);
            
    $output .= "Packet adding $p sent to you.";
            
    # return $output;}

Share This Page

Advertisement