Remove LWC Protections

Discussion in 'Plugin Development' started by chriztopia, Nov 10, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    chriztopia

    I am wanting to remove LWC Protections from a sign when its created. This is what I have tried so far.

    Code:
                    plugin.lwc.findProtection(event.getBlock()).removeAllPermissions();
                    plugin.lwc.findProtection(event.getBlock()).removeCache();
                    plugin.lwc.findProtection(event.getBlock()).radiusRemoveCache();
                    plugin.lwc.findProtection(event.getBlock()).saveNow();
                    plugin.lwc.findProtection(event.getBlock()).save();
                    plugin.lwc.reloadDatabase();
                    plugin.lwc.reload();
                    p.sendMessage("REMOVE PROTECTIONS");
     
  2. Offline

    zachoooo

    Why not just prevent the sign from being created? It looks like lwc does have an API so you should be able to
     
  3. Offline

    chriztopia

    Im wanting to do a basic thing like this.
    Code:
            if(event.getLine(0).contains("[BuyLand]") || event.getLine(0).equalsIgnoreCase("[BuyLand]")){
                if(plugin.lwc.findProtection(world.getBlockAt(loc)) != null)
                {
                    p.sendMessage("NULLLLLLLLLLLLLLLLLLL");
                }else{
                    plugin.lwc.findProtection(event.getBlock()).removeTemporaryPermissions();
                    plugin.lwc.findProtection(event.getBlock()).removeAllPermissions();
                    plugin.lwc.findProtection(event.getBlock()).removeCache();
                    plugin.lwc.findProtection(event.getBlock()).radiusRemoveCache();
                    plugin.lwc.findProtection(event.getBlock()).saveNow();
                    plugin.lwc.findProtection(event.getBlock()).save();
                    plugin.lwc.reloadDatabase();
                    plugin.lwc.reload();
                    p.sendMessage("REMOVE PROTECTIONS");
                }
                }
    I want to stop LWC from creating promissions on a sign that has [buyland] on the first line.
     
  4. Offline

    chriztopia

Thread Status:
Not open for further replies.

Share This Page