Skip to content

Commit

Permalink
Catch showfake errors, meta work
Browse files Browse the repository at this point in the history
offline players can't get block upates!
  • Loading branch information
mcmonkey4eva committed Sep 24, 2014
1 parent 96dcbd3 commit 9f7bbf8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Expand Up @@ -59,14 +59,24 @@ public void breakDown() {
// MECHANICS
///////////

// <--[language]
// @name Damage Cause
// @group Events
// @description
// Possible damage causes
// BLOCK_EXPLOSION, CONTACT, CUSTOM, DROWNING, ENTITY_ATTACK, ENTITY_EXPLOSION,
// FALL, FALLING_BLOCK, FIRE, FIRE_TICK, LAVA, LIGHTNING, MAGIC, MELTING, POISON,
// PROJECTILE, STARVATION, SUFFOCATION, SUICIDE, THORNS, VOID, WITHER.
// -->

// <--[event]
// @Events
// entity damaged
// entity damaged by <cause>
// <entity> damaged
// <entity> damaged by <cause>
//
// @Triggers when an entity is damaged.
// @Triggers when an entity is damaged - see <@link language damage cause> for causes.
// @Context
// <context.cause> returns the reason the entity was damaged.
// <context.damage> returns the amount of damage dealt.
Expand Down
Expand Up @@ -27,10 +27,11 @@ public FakeBlock(final dPlayer player, final dLocation location,
new Runnable() {
@Override
public void run() {
player.getPlayerEntity().sendBlockChange(
location,
location.getBlock().getType(),
location.getBlock().getData());
if (player.isValid() && player.isOnline())
player.getPlayerEntity().sendBlockChange(
location,
location.getBlock().getType(),
location.getBlock().getData());
}
}, duration.getTicks());
}
Expand Down

0 comments on commit 9f7bbf8

Please sign in to comment.