Betther Command Detection

Betther Command Detection

AD

Bookmark0

This great addon will even allow you to use custom chat commands with command blocks.The addon is an extension that utilizes a script API to help combine script events with command blocks through tags and scores.

ADVERSITE

Facilitates command systems using tags and scores. The detections you can use in commands are as follows:

Entities

  • Entity hit by another entity – hitEntity | tag 
  • Entity hitting another entity – damagingEntity | tag 
  • Entity self-harming – hurtEntity | tag 
  • Entity that dies (only players) – deadEntity | tag 
  • Entity that kills – murderEntity | tag

Blocks

  • Block broken – blockBreak | tag 
  • Specific block broken – blockBreak:<block id> (“blockBreak:grass”) | tag 
  • Block placed – blockPlace | tag 
  • Specific block placed – blockPlace:<block id> (“blockPlace:grass”) | tag 
  • Block hit – hitBlock | tag 
  • Specific block hit – hitBlock:<block id> (“hitBlock:grass”) | tag

Items

  • Use item – itemUse | tag 
  • Use specific item – itemUse:<item id> (“itemUse:clock”) | tag

Player

  • Player’s current health – health | scoreboard 
  • Player’s current level – level | scoreboard 
  • Experience earned in the current level – xpEarnedCurrentLevel | scoreboard 
  • Total experience needed to level up – totalXpNeededToNextLevel | scoreboard 
  • Experience needed to level up – xpNeededToNextLevel | scoreboard 
  • Player’s current coordinates – x y z | scoreboard 
  • Player falling detection – isFalling | tag 
  • Player climbing detection – isClimbing | tag 
  • Player flying detection – isFlying | tag 
  • Player gliding detection – isGliding | tag 
  • Player in-water detection – isInWater | tag 
  • Player jumping detection – isJumping | tag 
  • Player on-ground detection – isOnGround | tag 
  • Player crouching detection – isSneaking | tag 
  • Player running detection – isSprinting | tag 
  • Player swimming detection – isSwimming | tag 
  • Player’s current dimension detection – dimension:<dimension Id> (“dimension:overworld”) | tag 
  • Block in player’s view direction detection (max distance = 20 blocks) – blockFromViewDirection:<block Id> (“blockFromViewDirection:grass”) | tag 
  • Entities in player’s view detection (max distance = 20 blocks) – entityFromViewDirection:<entity id> (“entityFromViewDirection:cow”) | tag 
  • Player spawn detection – playerSpawn | tag 
  • Player initial spawn detection – playerInitialSpawn | tag

Others

  • Message sending detection – chatSend | tag 
  • Specific message sending detection (max length = 20 words) – chatSend:<message> (“chatSend:Hello”) | tag 
  • Number of entities loaded in the world detection – allEntities | world scoreboard 
  • Number of players in the world detection – players | world scoreboard 
  • Number of items loaded in the world detection – items | world scoreboard 
  • Number of mobs loaded in the world detection – mobs | world scoreboard 
  • Current day in the world detection – day | world scoreboard 
  • Current time of day in the world detection – timeOfDay | world scoreboard 
  • Current weather state in the world detection – weatherState | world scoreboard | May have errors

Usage of tags: 

/tp @a[tag=”chatSend:!lobby”] 0 65 4 

This example will teleport all players who write !lobby in the chat to the coordinates 0 65 4.

Usage of scoreboards: 

/execute if entity @a[scores={health=..1}] run title @a actionbar The player @a[scores={health=..1}] is about to die! 

This example will send a repeated message to the actionbar of all players who have half a heart.

Usage of world scoreboard:

/execute if score items world matches 100.. run kill @e[type=item] 

This example will remove all items after reaching 100 or more.

Leave a Reply

AD