This repository has been archived by the owner on Jul 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added event tracing - added some scripts for unit testing - opened paths in pmscripts
- Loading branch information
1 parent
0415ba8
commit 090e97d
Showing
16 changed files
with
1,179 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# | ||
# Dig through PocketMine sources and find event classes | ||
# | ||
fatal() { | ||
echo "$@" 1>&2 | ||
exit 1 | ||
} | ||
[ $# -ne 1 ] && fatal "Must specify a PocketMine-MP source directory" | ||
[ ! -d "$1" ] && fatal "$1: Is not a directory" | ||
eventdir=$(find "$1" -type d -name "event") | ||
[ -z "$eventdir" ] && fatal "$1: does not contain PocketMine-MP source code" | ||
|
||
find $eventdir -name '*.php' | ( | ||
while read fp | ||
do | ||
event=$(grep '^class '<$fp | grep ' extends ' | grep 'Event' |\ | ||
sed \ | ||
-e 's/^class\s*//' \ | ||
-e 's/{$//' \ | ||
-e 's/\s*implements\s*Cancellable\s*//' \ | ||
-e 's/\s*extends\s*/ /') | ||
[ -z "$event" ] && continue | ||
grep -q '@deprecated' $fp && continue | ||
if grep -q 'handlerList' $fp ; then | ||
handler=yes | ||
else | ||
handler=no | ||
fi | ||
echo $(basename $(dirname $fp)) $event $handler | ||
done | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
block BlockFormEvent BlockGrowEvent yes | ||
block BlockGrowEvent BlockEvent yes | ||
block BlockPlaceEvent BlockEvent yes | ||
block BlockSpreadEvent BlockFormEvent yes | ||
block BlockUpdateEvent BlockEvent yes | ||
block LeavesDecayEvent BlockEvent yes | ||
block SignChangeEvent BlockEvent yes | ||
block BlockBreakEvent BlockEvent yes | ||
entity EntityArmorChangeEvent EntityEvent yes | ||
entity EntityBlockChangeEvent EntityEvent yes | ||
entity EntityCombustByBlockEvent EntityCombustEvent no | ||
entity EntityCombustByEntityEvent EntityCombustEvent no | ||
entity EntityCombustEvent EntityEvent yes | ||
entity EntityDamageByBlockEvent EntityDamageEvent no | ||
entity EntityDamageByChildEntityEvent EntityDamageByEntityEvent no | ||
entity EntityDeathEvent EntityEvent yes | ||
entity EntityDespawnEvent EntityEvent yes | ||
entity EntityExplodeEvent EntityEvent yes | ||
entity EntityInventoryChangeEvent EntityEvent yes | ||
entity EntityLevelChangeEvent EntityEvent yes | ||
entity EntityMotionEvent EntityEvent yes | ||
entity EntityRegainHealthEvent EntityEvent yes | ||
entity EntityShootBowEvent EntityEvent yes | ||
entity EntitySpawnEvent EntityEvent yes | ||
entity EntityTeleportEvent EntityEvent yes | ||
entity ExplosionPrimeEvent EntityEvent yes | ||
entity ItemDespawnEvent EntityEvent yes | ||
entity ItemSpawnEvent EntityEvent yes | ||
entity ProjectileHitEvent EntityEvent yes | ||
entity ProjectileLaunchEvent EntityEvent yes | ||
entity EntityDamageByEntityEvent EntityDamageEvent no | ||
entity EntityDamageEvent EntityEvent yes | ||
inventory CraftItemEvent Event yes | ||
inventory FurnaceBurnEvent BlockEvent yes | ||
inventory FurnaceSmeltEvent BlockEvent yes | ||
inventory InventoryCloseEvent InventoryEvent yes | ||
inventory InventoryOpenEvent InventoryEvent yes | ||
inventory InventoryPickupArrowEvent InventoryEvent yes | ||
inventory InventoryPickupItemEvent InventoryEvent yes | ||
inventory InventoryTransactionEvent Event yes | ||
level ChunkLoadEvent ChunkEvent yes | ||
level ChunkPopulateEvent ChunkEvent yes | ||
level ChunkUnloadEvent ChunkEvent yes | ||
level LevelInitEvent LevelEvent yes | ||
level LevelLoadEvent LevelEvent yes | ||
level LevelSaveEvent LevelEvent yes | ||
level LevelUnloadEvent LevelEvent yes | ||
level SpawnChangeEvent LevelEvent yes | ||
player PlayerAchievementAwardedEvent PlayerEvent yes | ||
player PlayerAnimationEvent PlayerEvent yes | ||
player PlayerBedEnterEvent PlayerEvent yes | ||
player PlayerBedLeaveEvent PlayerEvent yes | ||
player PlayerBucketEmptyEvent PlayerBucketEvent yes | ||
player PlayerBucketFillEvent PlayerBucketEvent yes | ||
player PlayerCommandPreprocessEvent PlayerEvent yes | ||
player PlayerCreationEvent Event yes | ||
player PlayerDropItemEvent PlayerEvent yes | ||
player PlayerGameModeChangeEvent PlayerEvent yes | ||
player PlayerItemConsumeEvent PlayerEvent yes | ||
player PlayerItemHeldEvent PlayerEvent yes | ||
player PlayerKickEvent PlayerEvent yes | ||
player PlayerLoginEvent PlayerEvent yes | ||
player PlayerMoveEvent PlayerEvent yes | ||
player PlayerPreLoginEvent PlayerEvent yes | ||
player PlayerRespawnEvent PlayerEvent yes | ||
player PlayerDeathEvent EntityDeathEvent yes | ||
player PlayerInteractEvent PlayerEvent yes | ||
player PlayerJoinEvent PlayerEvent yes | ||
player PlayerQuitEvent PlayerEvent yes | ||
plugin PluginDisableEvent PluginEvent yes | ||
plugin PluginEnableEvent PluginEvent yes | ||
server DataPacketReceiveEvent ServerEvent yes | ||
server DataPacketSendEvent ServerEvent yes | ||
server RemoteServerCommandEvent ServerCommandEvent yes | ||
server ServerCommandEvent ServerEvent yes | ||
server LowMemoryEvent ServerEvent yes | ||
server QueryRegenerateEvent ServerEvent yes |
Oops, something went wrong.