Ejemplo n.º 1
0
        protected virtual bool OnBlockBreak(BlockBreakEventArgs e)
        {
            EventHandler <BlockBreakEventArgs> handler = BlockBreak;

            if (handler != null)
            {
                handler(this, e);
            }

            return(!e.Cancel);
        }
Ejemplo n.º 2
0
 private void LevelOnBlockBreak(object sender, BlockBreakEventArgs e)
 {
     e.Cancel = e.Player.GameMode != GameMode.Creative;
 }
Ejemplo n.º 3
0
 private void LevelOnBlockBreak(object sender, BlockBreakEventArgs e)
 {
     e.Cancel = true;
 }
Ejemplo n.º 4
0
 private void LevelOnBlockBreak(object sender, BlockBreakEventArgs e)
 {
     if (e.Block.Coordinates.DistanceTo((BlockCoordinates) e.Player.SpawnPosition) < 15)
     {
         e.Cancel = e.Player.GameMode != GameMode.Creative;
     }
 }
Ejemplo n.º 5
0
 private void OnBreak(object sender, BlockBreakEventArgs e)
 {
     //Block record = e.Block;
     //e.Level.SetBlock(record);
     e.Cancel = !_registerlist.Contains(e.Player.User) || !e.Player.User.IsAuthenticated;//Maybe properties is invalidate
 }