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

Tutorial [New API]Set your own custom join messages

Comments in 'Resources' started by sebagius7110, Aug 10, 2014.

?

Did I help you?

  1. YES OF COURSE

    17 vote(s)
    60.7%
  2. NO LOL U FAILED ME

    11 vote(s)
    39.3%
  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    We are not talking about messages. We are talking about popups.
  2. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    You're talking about PopUps? I see broadcastMessage, not broadcastPopup.
  3. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    I think is really bad use elseif a lot of times!

    *Instead elseif, you can use or in your if, and set "The owner " . $name . "joined the game!" instead "The owner Andrew joined the game!"

    Maybe you can do it better with:
    PHP:
    if ($name == "AndrewBit4" or $name == "Guillaume351") {
    $this->getServer()->broadcastPopup("The owner"$name ."joined the game!");
    # $event->setJoinMessage("The owner " . $name . " joined the game!");  <- I think this is optional.
    }
    *This is a part of one of my plugins.
    Last edited: Aug 17, 2015
    EvolSoft and PEMapModder like this.
  4. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Wow. You're smart. There isn't a Server::broadcastPopup() by default.
    AndrewBit likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    AndrewBit likes this.
  6. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
  7. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Read the source. Docs tell you nothing.
  9. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Yeah. I have the docs on by bookmarks bar.
  10. Aravenftw
    Offline

    Aravenftw New Member

    Joined:
    Jul 22, 2015
    Posts:
    7
    Minecraft User:
    Aravenftw
  11. MasterDoctor
    Offline

    MasterDoctor New Member

    Joined:
    Sep 19, 2014
    Posts:
    11
    Minecraft User:
    MasterDoctor
    Hi Seb, Do you mind if I include this tutorial in my new video tutorial series for PocketMine Plugin Development?
    You can see the series here [https://forums.pocketmine.net/threads/newapi-how-to-create-a-pocketmine-plugin.5047/]
    I will give you a shoutout as well.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
  13. MasterDoctor
    Offline

    MasterDoctor New Member

    Joined:
    Sep 19, 2014
    Posts:
    11
    Minecraft User:
    MasterDoctor
    I thought so but the Tutorial flag in the title confused me :)
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Right. The tag is incorrect. It isn't a tutorial at all. Well, it is a tutorial, but it isn't a plugin development tutorial. It is a plugin editing tutorial.
  15. AvivShopenCraft
    Offline

    AvivShopenCraft New Member

    Joined:
    Oct 14, 2015
    Posts:
    73
    Minecraft User:
    AvivShopen
    idk why this happening:
    [Server thread/CRITICAL]: ClassNotFoundException: "Class AvivShopen\CustomJoining\CustomJoining not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 131

    can you help? new to pocketmine

    Attached Files:

  16. megamichiel
    Offline

    megamichiel New Member

    Joined:
    Nov 2, 2015
    Posts:
    9
    Minecraft User:
    WorkThatBench
    @AvivShopenCraft you should create a separate thread for that, since it's not related to the joining. On your problem: Inside the PHP file the namespace is specified as CustomJoining, not AvivShopen, and the classname is StaffJoin instead of CustomJoining.
    AvivShopenCraft likes this.
  17. AvivShopenCraft
    Offline

    AvivShopenCraft New Member

    Joined:
    Oct 14, 2015
    Posts:
    73
    Minecraft User:
    AvivShopen
    this is don't work for me:(:confused:

    Attached Files:

  18. megamichiel
    Offline

    megamichiel New Member

    Joined:
    Nov 2, 2015
    Posts:
    9
    Minecraft User:
    WorkThatBench
    @AvivShopenCraft
    "Class AvivShopen\CustomJoining\CustomJoining not found"
    namespace CustomJoining; class CustomJoining
    = CustomJoining\CustomJoining
    AvivShopenCraft likes this.
  19. AvivShopenCraft
    Offline

    AvivShopenCraft New Member

    Joined:
    Oct 14, 2015
    Posts:
    73
    Minecraft User:
    AvivShopen
    can you explain? I don't understand cuz I don't know very good PHP:(
    Thx for helping me!
  20. AvivShopenCraft
    Offline

    AvivShopenCraft New Member

    Joined:
    Oct 14, 2015
    Posts:
    73
    Minecraft User:
    AvivShopen
    Can omeone just give me .phar file?:(

Share This Page

Advertisement