1. It protects the blocks against all damage regardless of how it gets damaged.

    This next version should also protect all items from damage. I'm afraid I can't test it now but let me know if something is wrong.
     

    Attached Files:

  2. Thanks for this. Unfortunately the items can still be damaged.
     
  3. Its Block trep or ballista damage also?if that do that.i can Use code with different plugins.cubes and items have different damage hooks.
     
  4. The hook is simple.
    Code:
    private void OnCubeTakeDamage(CubeDamageEvent cubeDamageEvent)
            {
                if (IsInTradeArea(new Vector2(cubeDamageEvent.Position.x * 1.2f, cubeDamageEvent.Position.z * 1.2f))) { cubeDamageEvent.Cancel(); cubeDamageEvent.Damage.Amount = 0f; }
            }        private bool IsInTradeArea(Vector2 Position)
            {
                // Is there a designated trade area?
                if (_markList.Count < 1) return false;
                var isInArea = false;
                foreach (var area in _markList)
                {
                    var posX1 = area[0];
                    var posZ1 = area[1];
                    var posX2 = area[2];
                    var posZ2 = area[3];                var locX = Position.x;
                    var locZ = Position.y;                if ((locX < posX1 && locX > posX2) && (locZ > posZ1 && locZ < posZ2)) isInArea = true;
                    if ((locX < posX1 && locX > posX2) && (locZ < posZ1 && locZ > posZ2)) isInArea = true;
                    if ((locX > posX1 && locX < posX2) && (locZ < posZ1 && locZ > posZ2)) isInArea = true;
                    if ((locX > posX1 && locX < posX2) && (locZ > posZ1 && locZ < posZ2)) isInArea = true;
                }            return isInArea;
            }
    Of course it will only block damage when there is a trade area (unlike the original check if it's in the trade area)
     
  5. need help.i need to add this ones no siege damage.
     

    Attached Files:

  6. Only no siege damage or no damage at all?
     
  7. only siege.that its shop and arena area
    broplem its when i add no siege damage.its not work or when its work that take full map effect.all another effect what i add that stay inside that area.after no siege damage i try add that no crest area if its possible
    [DOUBLEPOST=1467910283][/DOUBLEPOST]and ofg its need also no items damage or collect.then its perfect:)
     
    Last edited by a moderator: Jul 7, 2016
  8. just thinking:) no crest area not need after all:).need only that no siege damage and no items collect and damage.even i cant build or collect that area when plugins its up.so if player want to crest that area they can do that.they dont do anything that area even with crest.lol
    [DOUBLEPOST=1467912079][/DOUBLEPOST]item collect its already cancel.but if i try to collect items or block i can take that but its not vanish,that its good but i get that item my inventory:( and that its not good
     
  9. Here, I modified my existing safe area plugin and all it will need next is to remove the crest area with the canceling of the placement of the crest.

    It has a no-entity-damage protection, no-block-damage protection, cube-placement protection and entity-placement protection (crests excluded due to the crest area not being removed yet)
    [DOUBLEPOST=1467912358][/DOUBLEPOST]the problem with item canceling is that it will only cancel the placing/picking up but not the losing/gaining of the item. I'm working on that and it's already fixed for cubes.
     

    Attached Files:

  10. yes i just notice when i set items.its vanish(its looks like that)after area next time download item its there
     
  11. good job:) with my crest shield and no cubedamage its work great.you plugin block item collection and siege damage:) this is great plugins when its ready.and what its best you have commands for that:)
     
  12. Everything seems to be taking damage still, even though people don't have the perms to touch the items at all. I might have a conflitcing addon. I will try it by itself and see what happens.
     
    Last edited by a moderator: Jul 8, 2016
  13. Yes Block take hit damage.plugins stop trep and ballista damage.you need take admins Off when test plugins.then you see what plugins do.and Crest need also To set this moment.best To set before activate protect area.or its vanish and you cant do anything a Crest. If you set that protect area you can remove that with /killall 5 command.
    hmm not sure about that hit damage.but you need test without you admins.then you know
     
    Last edited by a moderator: Jul 8, 2016