Ssomar Plugins
Search
K

Block Conditions

For conditions that require numerical values, you can assign 2 conditions.
Example: "I want to create a condition that only activates if the value is greater than 50 but less than 250" So what you would type in the config will be 50 < CONDITION < 250
If a condition fails to be met, you can enable cancelEvent so if a specific condition isn't completed, cancelEvent will run. You can also customize the error message !
Example:
blockConditions:
ifBlockAge: <2
ifBlockAgeMsg: "héhéhé you can custom your message here"
ifBlockAgeCancel: true
Example
name: '&7MyPickaxe'
lore:
- '&7&oDefault desc'
material: DIAMOND_PICKAXE
headDBID: ''
glow: false
glowDrop: false
disableStack: false
keepItemOnDeath: false
give-first-join: false
give-slot: 0
usage: 0
usePerDay: -1
usageLimit: -1
disable-world: []
unbreakable: false
isSpecialProjectile: false
canBeUsedOnlyByTheOwner: false
storeItemInfos: false
activators:
activator1:
activator: PLAYER_ALL_CLICK
displayName: Activator name
usageModification: 0
usePerDay: -1
cancelEventIfMaxUsePerDay: false
autoUpdateItem: false
commands: []
silenceOutput: false
blockCommands:
- BREAK
detailedBlocks:
- WHEAT
- CARROTS
cancelEventIfNotDetailedBlocks: false
onlyAirClick: false
onlyBlockClick: true
cancelEventIfInvalidRequiredExecutableItems: false
cancelEvent: false
conditions:
targetBlockConditions:
ifPlantFullyGrown: true
ifPlantFullyGrownMsg: '&cError the plant clicked must be fully grown !'

ifContainerEmpty - Not

  • Description: Check if the block contains items or not.
  • Example:
- have to add -

ifIsPowered - Not

  • Description: Checks if the target block is (or must not be) powered by a redstone signal
  • Example:
blockConditions:
ifIsPowered: false
ifIsPoweredMsg: ''
ifMustBeNotPowered: true
ifMustBeNotPoweredMsg: ''
  • Example Situations:
    • If the block you are clicking at is a lit redstone lamp, the activator will activate
  • Required: NO (Default: false)

ifMustBeNatural - ifMustBeNotNatural

  • Description: Checks if the target block is a natural block (so not a placed block) (CORE PROTECT MUST BE INSTALLED)
Don't use that in an activator very frenquetly used because it will require a lot of performances
  • Example:
blockConditions:
ifMustBeNotNatural: true
ifMustBeNotNaturalMsg: ''
ifMustBeNotNaturalCancel: true
blockConditions:
ifMustBeNatural: true
ifMustBeNaturalMsg: ''
ifMustBeNaturalCancel: true
  • Example Situations:
    • If the block you are clicking is/isn't natural, the activator will activate
  • Required: NO (Default: false)

ifPlayerMustBeOnTheBlock

  • Description: Checks if the target block has a player on top of it
  • Example:
blockConditions:
ifPlayerMustBeOnTheBlock: false
ifPlayerMustBeOnTheBlockMsg: ''
  • Example Situations:
    • If the block you are clicking has a player on top of it, the activator activates
  • Required: NO (Default: false)

ifNoPlayerMustBeOnTheBlock

  • Description: Checks if the target block has no player on top of it
  • Example:
blockConditions:
ifNoPlayerMustBeOnTheBlock: false
ifNoPlayerMustBeOnTheBlockMsg: ''
  • Example Situations:
    • If the block you are clicking has a player on top of it, the activator doesn't activate
  • Required: NO (Default: false)

ifPlantFullyGrown - ifPlantNotFullyGrown

  • Description: Checks if the target block is a fully grown plant.
  • Example:
blockConditions:
ifPlantFullyGrown: true
ifPlantFullyGrownMsg: ''
##################################################
blockConditions:
ifPlantNotFullyGrown: true
ifPlantNotFullyGrownMsg: ''
  • Example Situations:
    • If the wheat crop is fully grown, the activator will activate.
  • Required: NO (Default: false)

ifBlockAge

  • Description: Checks the target block age (crops)
  • Example:
blockConditions:
ifBlockAge: <2
ifBlockAgeMsg: "héhéhé you can custom your message here"

ifBlockLocationX - Y -Z

  • Description: Checks the target block location X / Y / Z
  • Example:
blockConditions:
ifBlockLocationX: 500 < CONDITION < 1500
ifBlockLocationXMsg: "héhéhé you can custom your message here"
ifBlockLocationY: 50 < CONDITION < 150
ifBlockLocationYMsg: "héhéhé you can custom your message here"
ifBlockLocationZ: 500 < CONDITION < 1500
ifBlockLocationZMsg: "héhéhé you can custom your message here"

ifUsage

  • It checks the usage of the clicked ExecutableBlock, if the usage is valid, the activator will work, otherwise an error message is displayed.
  • Example:
blockConditions:
ifUsage: 4< #it also supports intervals like 4 < CONDITION <= 8
ifUsageMsg: "&cError the executableBlock clicked must have more than 3 usages but less than 10"
  • Required: NO

ifContainerContainsSellableItem

  • Description: Checks if the clicked container has items that can be sold
  • Example:
blockConditions:
ifContainerContainsSellableItem: true
ifContainerContainsSellableItemMsg: "&cError the executableBlock clicked must have more than 3 usages but less than 10"

Block Around Conditions

  • Description: Checks the blocks around the clicked block:
  • Example:
blockConditions:
blockAroundCdts:
blockAround3:
southValue: 0
northValue: 0
westValue: 4
eastValue: 0
aboveValue: 0
underValue: 0
errorMsg: '&c&oA block is not placed correctly !'
blockMustBeExecutableBlock: []
blockTypeMustBe: {}
blockTypeMustNotBe:
- AIR
blockAround2:
southValue: 0
northValue: 4
westValue: 0
eastValue: 0
aboveValue: 0
underValue: 0
errorMsg: '&c&oA block is not placed correctly !'
blockMustBeExecutableBlock: []
blockTypeMustBe:
- ZOMBIE_HEAD
blockTypeMustNotBe: {}
blockAround4:
southValue: 0
northValue: 0
westValue: 0
eastValue: 0
aboveValue: 0
underValue: 0
errorMsg: '&c&oA block is not placed correctly !'
blockMustBeExecutableBlock: []
blockTypeMustBe: {}
blockTypeMustNotBe: {}
blockAround1:
southValue: 0
northValue: 0
westValue: 0
eastValue: 0
aboveValue: 3
underValue: 0
errorMsg: '&c&oA block is not placed correctly !'
blockMustBeExecutableBlock: []
blockTypeMustBe:
- ACACIA_BUTTON
- ACACIA_LEAVES
- ACACIA_FENCE_GATE
blockTypeMustNotBe: {}
blockAround0:
southValue: 1
northValue: 0
westValue: 0
eastValue: 0
aboveValue: 3
underValue: 0
errorMsg: '&c&oA block is not placed correctly !'
blockTypeMustBeE:
- quarrypost
blockTypeMustBe: {}
blockTypeMustNotBe: {}
blockAroundCdtsMsg: ''
blockConditions:
blockAroundCdts:
blockAround0:
southValue: 0
northValue: 0
westValue: 0
eastValue: 0
aboveValue: 1
underValue: 0
errorMsg: '&c&oA block is not placed correctly !'
blockTypeMustBe:
- STONE
- COBBLESTONE
- ANDESITE
- ITEMSADDER:turquoise_block
- EXECUTABLEBLOCKS:CUSTOMDIRT
- !DIRT
- ALL_ORES