Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 23 2018 11:06
    dktapps labeled #2317
  • Jul 23 2018 11:06
    dktapps labeled #2317
  • Jul 23 2018 09:35
    dktapps labeled #2319
  • Jul 23 2018 09:35
    dktapps closed #2319
  • Jul 23 2018 09:35
    dktapps commented #2319
  • Jul 23 2018 09:32
    MSG100TC edited #2319
  • Jul 23 2018 09:31
    MSG100TC opened #2319
  • Jul 22 2018 18:54
    dktapps labeled #2318
  • Jul 22 2018 18:54
    dktapps commented #2318
  • Jul 22 2018 18:18
    dktapps edited #2318
  • Jul 22 2018 16:38
    dktapps unlabeled #2303
  • Jul 22 2018 16:38
    dktapps labeled #2303
  • Jul 22 2018 16:38
    dktapps closed #2303
  • Jul 22 2018 16:38
    dktapps commented #2303
  • Jul 22 2018 16:35
    dktapps synchronize #2318
  • Jul 22 2018 16:35

    dktapps on disconnect-rework

    fixed crash on timeout (compare)

  • Jul 22 2018 16:20
    dktapps labeled #2318
  • Jul 22 2018 16:20
    dktapps commented #2318
  • Jul 22 2018 14:07
    dktapps commented #2318
  • Jul 22 2018 14:01
    dktapps synchronize #2318
SOFe
@SOF3
Handle pocketmine\event\block\BlockBreakEvent
you don't need explanation how to make an event handler, right?
MΔJΩRHΔRD
@MajorPlayz
What does that mean
Yes lol
Ill google it
SOFe
@SOF3
and then
get the block from the event
then get the block id from the block
MΔJΩRHΔRD
@MajorPlayz
Ok
SOFe
@SOF3
then check if the block id is identical to the block id of monster spawner using constants from the block class
MΔJΩRHΔRD
@MajorPlayz
The class is MonsterSpawner
Cld u write a snippet for that cos I have no idea where to start lel pls
SOFe
@SOF3
No
don't use the class
use the constant from Block (or BlockIds).
MΔJΩRHΔRD
@MajorPlayz
OH ok
cld u write a quick snippet pls
SOFe
@SOF3
no
for what?
MΔJΩRHΔRD
@MajorPlayz
For that
What function would I use?
onBreak?
SOFe
@SOF3
You name it.
You can call it any valid function name that doesn't override or duplicate an existing one.
MΔJΩRHΔRD
@MajorPlayz
onBreak()
SOFe
@SOF3
@PEMapModder's personal practice is to put an e_ prefix before event handlers as a note to self so that he wouldn't call these functions in code.
MΔJΩRHΔRD
@MajorPlayz
onBreak()
SOFe
@SOF3
e_break, e_onBreak, onBreak, break, broken, descanso, enElAlmuerzoODescanso (from Google Translate), etc... all are valid.
as long as they are valid function names.
and there isn't another function with this name.
PocketMine doesn't care what function name you use. It only cares the type hint of the first (and only) parameter of the function.
MΔJΩRHΔRD
@MajorPlayz
What
OH ok
So do I do (shift+enter for line break) var code = "formatted";
what
var code = "formatted";
ahh
one sec
SOFe
@SOF3
That's not PHP...
And shift enter is a key in your editor, nothing to do with the code...
And line breaks don't matter in most languages...
MΔJΩRHΔRD
@MajorPlayz
<?php
onBreak(Item <idOfMonsterSpawner> {
//Code
}
$test = "Code";
ok
But yeh
SOFe
@SOF3
no...
look at examples. that's all you need for this moment.
EradiaPE
@EradiaPE
where are the new items / blocks?
Addison
@Addison118
@SOF3 didnt mean to send that here
But im gonna factor rsa 2048