Skip to content

GriefDefender Extensions

When using GriefDefender, you can use the following extensions to add additional functionality to your NPCs.

  • Function
    q.npc.griefdefender()

    Returns the NPC's UUID for use with the GriefDefender functions.

    Returns { "npcUUID": "string" }
  • Function
    q.npc.griefdefender.economy_enabled()

    Checks if the GriefDefender economy is enabled on the server.

    Returns 1 for true, or 0
  • Function
    q.npc.griefdefender.get_player_claims(<uuid>)

    Returns an array of claims owned by a specific player UUID.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string" }>
  • Function
    q.npc.griefdefender.is_wilderness()

    Checks if the NPC is currently in a wilderness area (not in a claim).

    Returns 1 for true, or 0
  • Function
    q.npc.griefdefender.available_rentals()

    Returns an array of claims that are available for rent.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "rentalRate": double, "isForRent": false, "isRented": false, "renter": "string", "paymentType": "string", "rentMinTime": 0, "rentMaxTime": 0 }>
  • Function
    q.npc.griefdefender.available_forsale()

    Returns an array of claims that are available for sale.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "isForSale": false, "salePrice": double }>
  • Function
    q.npc.griefdefender.claim_data()

    Returns the claim data for the claim the NPC is currently in, if any.

    Returns { "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string" }
  • Function
    q.npc.griefdefender.claim_uuid()

    Returns the UUID of the claim the NPC is currently in, if any.

    Returns "string" or 0 if not in a claim
  • Function
    q.npc.griefdefender.claim_name()

    Returns the name of the claim the NPC is currently in, if any.

    Returns "string" or 0 if not in a claim
  • Function
    q.npc.griefdefender.claim_owner_uuid()

    Returns the UUID of the owner of the claim the NPC is currently in, if any.

    Returns "string" or 0 if not in a claim
  • Function
    q.npc.griefdefender.claim_owner_name()

    Returns the name of the owner of the claim the NPC is currently in, if any.

    Returns "string" or 0 if not in a claim
  • Function
    q.npc.griefdefender.claim_rental_data()

    Returns the rental data for the claim the NPC is currently in, if any.

    Returns { "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "rentalRate": double, "isForRent": false, "isRented": false, "renter": "string", "paymentType": "string", "rentMinTime": 0, "rentMaxTime": 0 }
  • Function
    q.npc.griefdefender.claim_sale_data()

    Returns the sale data for the claim the NPC is currently in, if any.

    Returns { "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "isForSale": false, "salePrice": double }
  • Function
    q.npc.griefdefender.claim_tax_data()

    Returns the tax data for the claim the NPC is currently in, if any.

    Returns { "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "spawnPos": "string", "taxPastDueDate": "string", "taxBalance": double }
  • Function
    q.player.griefdefender()

    Returns the player's UUID for use with the GriefDefender functions.

    Returns { "playerUUID": "string" }
  • Function
    q.player.griefdefender.economy_enabled()

    Checks if the GriefDefender economy is enabled on the server.

    Returns 1 for true, or 0
  • Function
    q.player.griefdefender.available_rentals()

    Returns an array of claims that are available for rent.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "rentalRate": double }>
  • Function
    q.player.griefdefender.available_forsale()

    Returns an array of claims that are available for sale.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "isForSale": false, "salePrice": double }>
  • Function
    q.player.griefdefender.claims(<uuid>)

    Returns an array of claims owned by a specific player UUID.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string" }>
  • Function
    q.player.griefdefender.current_claim()

    Returns the claim data for the claim the player is currently in, if any.

    Returns UUID as string or 0
  • Function
    q.player.griefdefender.accrued_claim_blocks()

    Returns the number of accrued claim blocks the player has.

    Returns An Integer
  • Function
    q.player.griefdefender.blocks_accrued_per_hour()

    Returns the number of claim blocks the player accrues per hour.

    Returns An Integer
  • Function
    q.player.griefdefender.max_accrued_claim_blocks()

    Returns the maximum number of accrued claim blocks the player can have.

    Returns An Integer
  • Function
    q.player.griefdefender.max_bonus_claim_blocks()

    Returns the maximum number of bonus claim blocks the player can have.

    Returns An Integer
  • Function
    q.player.griefdefender.max_claim_level()

    Returns the maximum claim level the player can have.

    Returns An Integer
  • Function
    q.player.griefdefender.min_claim_level()

    Returns the minimum claim level the player can have.

    Returns An Integer
  • Function
    q.player.griefdefender.bonus_claim_blocks()

    Returns the number of bonus claim blocks the player has.

    Returns An Integer
  • Function
    q.player.griefdefender.initial_claim_blocks()

    Returns the number of initial claim blocks the player has.

    Returns An Integer
  • Function
    q.player.griefdefender.remaining_claim_blocks()

    Returns the number of remaining claim blocks the player has.

    Returns An Integer
  • Function
    q.player.griefdefender.max_claimable_blocks()

    Returns the maximum number of claimable blocks the player can have.

    Returns An Integer
  • Function
    q.player.griefdefender.rental_limit()

    Returns the rental limit for the player.

    Returns An Integer
  • Function
    q.player.griefdefender.start_purchase(<claimUUID>)

    Attempts to start a purchase for the specified claim.

    Returns 1 for success or 0
  • Function
    q.server.griefdefender()

    Returns the server's platform for use with the GriefDefender functions.

    Returns { "serverPlatform": "string" }
  • Function
    q.server.griefdefender.economy_enabled()

    Checks if the GriefDefender economy is enabled on the server.

    Returns 1 for true, or 0
  • Function
    q.server.griefdefender.get_player_claims(<uuid>)

    Returns an array of claims owned by a specific player UUID.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string" }>
  • Function
    q.world.griefdefender()

    Returns the world's name for use with the GriefDefender functions.

    Returns { "location": "string" }
  • Function
    q.world.griefdefender.economy_enabled()

    Checks if the GriefDefender economy is enabled on the server.

    Returns 1 for true, or 0
  • Function
    q.world.griefdefender.get_player_claims(<uuid>)

    Returns an array of claims owned by a specific player UUID.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string" }>
  • Function
    q.world.griefdefender.available_rentals()

    Returns an array of claims that are available for rent.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "rentalRate": double }>
  • Function
    q.world.griefdefender.available_forsale()

    Returns an array of claims that are available for sale.

    Returns Array<{ "uuid": "string", "displayName": "string", "ownerUUID": "string", "ownerName": "string", "isForSale": false, "salePrice": double }>
  • Function
    q.world.griefdefender.is_wilderness(x, y, z)

    Checks if the specified coordinates are in a wilderness area (not in a claim).

    Returns 1 for true or 0
  • Function
    q.world.griefdefender.get_claim_uuid(x, y, z)

    Returns the UUID of the claim at the specified coordinates, if any.

    Returns string or 0
  • Function
    q.world.griefdefender.get_claim_name(x, y, z)

    Returns the name of the claim at the specified coordinates, if any.

    Returns string or 0
  • Function
    q.world.griefdefender.get_claim_owner_uuid(x, y, z)

    Returns the UUID of the owner of the claim at the specified coordinates, if any.

    Returns string or 0
  • Function
    q.world.griefdefender.get_claim_owner_name(x, y, z)

    Returns the name of the owner of the claim at the specified coordinates, if any.

    Returns string or 0