8Crafter's Server Utilities Wiki
  • Home
  • Discord
  • Contribute
  • ModBay
Changelogs
  • Changelogs
  • Releases
    • v1.1.0
    • v1.2.0
    • v1.2.1
    • v1.2.2
    • v1.3.0
    • v1.3.1
    • v1.3.2
    • v1.3.3
    • v1.3.4
    • v1.3.5
    • v1.3.6
    • v1.4.0
    • v1.5.0
    • v1.5.1
    • v1.6.0
    • v1.7.0
    • v1.8.0
    • v1.9.0
    • v1.10.2
    • v1.11.0
    • v1.12.0
    • v1.12.1
    • v1.12.2
    • v1.12.3
    • v1.13.0
    • v1.14.0
    • v1.14.1
    • v1.15.0
    • v1.15.1
    • v1.16.0
    • v1.17.0
    • v1.18.0
    • v1.18.1
    • v1.18.2
    • v1.19.0
    • v1.20.0
    • v1.21.0
    • v1.22.0
    • v1.23.0
    • v1.23.1
    • v1.24.0
    • v1.25.0
    • v1.25.1
    • v1.25.2
    • v1.26.0
    • v1.27.0
    • v1.28.0
    • v1.28.1
    • v1.28.2
    • v1.28.3
    • v1.28.4
    • v1.28.5
    • v1.29.0
    • v1.29.1
    • v1.29.2
    • v1.29.3
    • v1.29.4
    • v1.30.0
    • v1.30.1
    • v1.31.0
    • v1.32.0
    • v1.32.1
    • v1.33.0
    • v1.33.1
    • v1.34.0
    • v1.34.1
    • v1.35.0
    • v1.36.0
    • v1.36.1
    • v1.36.2
    • v1.36.3
    • v1.36.4
    • v1.37.0
  • Pre-Releases
    • v0.1.0
    • v0.2.0
    • v0.3.0
    • v0.3.1
    • v0.3.2
    • v0.4.0
    • v0.5.0
    • v0.5.1
    • v0.6.0
    • v0.8.0
    • v0.8.1
    • v0.8.2
    • v0.8.3
    • v1.0.0-RC.1
    • v1.0.0-RC.2
    • v1.20.0-preview.20
    • v1.20.0-preview.21
    • v1.20.0-preview.22
    • v1.23.0-preview.20+BUILD.1
    • v1.26.0-RC.1
    • v1.26.0-RC.2
    • v1.26.0-RC.3
    • v1.35.0-RC.1
    • v1.35.0-RC.2
General
  • General Information
  • Troubleshooting
  • Downloading
  • Installing
  • Getting Started
Commands
  • Commands Basics
  • Parameters Basics
  • Parameter Types
Commands List
  • Main
    • \align
    • \aligncenter
    • \attribute
    • \binvsee
    • \block
    • \bluemodsversion
    • \clearchat
    • \eval
    • \gma
    • \gmc
    • \gmd
    • \gmg
    • \gmp
    • \gmr
    • \gms
    • \help
    • \mainmenu
    • \playermenu
    • \tpa
    • \tpaccept
    • \tpdeny
  • WorldEdit
    • \\backuparea
    • \\ceil
    • \\chunk
    • \\cone
    • \\copy
    • \\cube
      Non-Functional
    • \\cut
    • \\cyl
    • \\deletesavedpos
    • \\drain
    • \\expandselection
    • \\flood
    • \\floor
    • \\generate
    • \\generatecallback
      Non-Functional
    • \\generatef
    • \\generatejs
      Non-Functional
    • \\generates
    • \\generateterrain
    • \\hcone
      Non-Functional
    • \\hcube
    • \\hcyl
      Non-Functional
    • \\hpos1
    • \\hpos2
    • \\hreplace
    • \\hsphere
    • \\idtfill
    • \\itfill
    • \\listpos
    • \\loadchunks
    • \\loadpos
    • \\maze
    • \\move
      Non-Functional
    • \\offset
    • \\omove
      Non-Functional
    • \\oreplace
    • \\paste
    • \\pos1
    • \\pos2
    • \\protectarea
    • \\regenerateblocks
    • \\remove
    • \\replace
    • \\savepos
    • \\savestructure
    • \\selectmode
    • \\set
    • \\seti
    • \\shift
    • \\smove
      Non-Functional
    • \\sphere
    • \\stack
    • \\stsphere
    • \\tube
    • \\undo
    • \\walls
    • \selectionrender
  • Removed
    • \settings (Old)
Systems
  • Anti-Spam System
  • Ban System
  • Chat Ranks System
  • Home System
  • Player Shop System
  • Rank Name Tags System
  • Server Shop System
  • Shop System
  • Sign Shop System
  • Spawn Protection System
  • TPA System
Settings
  • Chat Ranks Settings
  • General Settings
  • Home System Settings
  • Manage Game Rules
  • Module Imports
  • Money System Settings
  • Notifications Settings
  • Personal Settings
  • Script Settings
  • TPA System Settings
  • UI Settings
  • Extra Features
    • Extra Features Settings
  • Advanced
    • Advanced Settings
/scriptevent Commands
  • s:e
Blocks
  • ifill Command Placeholder Block
  • Invalid Block Placeholder
Entities
  • Tickingarea
  • Tickingarea 6
Items
  • Debug Sticks
    • Debug Stick
    • Editor Stick
  • UI Items
    • Main Menu
    • Player Menu
  • WorldEdit Items
    • Selection Tool
  • Misc.
    • Programmable Items
    • Ultra Bundle
    • WorldEdit Brushes
Main Menu
  • Main Menu
Player Menu
  • Player Menu
Ultra Security Mode
  • Command Required Permission Levels
Misc
  • Add-On Version Compatibility List
Other Features
  • Enchanting Any Item With Any Enchantment
  • Item Customization
  • No AI Entities
  • Particle Customization
  • Simulated Players
Meta
  • Add-On Performance
  • Style Guide
  • Useful Links

\eval

Runs the specified JavaScript / Script API code. This can be very useful for doing things such as running more advanced commands with JavaScript variables and conditions, or running commands with JavaScript escape codes(for example to put multiple lines of text in the name of an entity or use special unicode characters in commands without needing to copy and paste them into your game).

\eval
Dflt USM Sec Lvl: admin
Dflt Required Tags: canUseChatCommands
Categories:misc
Version:1.1.0
Undo Supported:N/A
Functional:Yes
Deprecated:No

Syntax ​

\eval <ScriptAPICode: JavaScript>

Arguments ​

<ScriptAPICode: JavaScript>: JavaScript

Result ​

CommandTriggerResult

Any

The command is incomplete, or any argument is not specified correctly. Unparseable
An error occurs while running the provided JavaScript / Script API code. Failed
OtherwiseSuccessful

Examples ​

  • Send a tellraw command message:
    • \eval world.sendMessage("Example message\nNew Line\nSender's Name: " + player.name + "\nToken Emoji: \uE105")
      • API Reference:
        • world.sendMessage()
        • player (Only available in the context of this command)
  • Give all players health boost with the level equal to their XP level:
    • \eval srun(()=>world.getAllPlayers().forEach((p)=>{p.addEffect("health_boost", 200, {amplifier: player.level, showParticles: false})}))
      • API Reference:
        • srun()
        • world.getAllPlayers()
        • p.addEffect()

History ​

This section of the page is empty.
 
You can help by expanding it.
Edit \eval on GitHub

8Crafter's Server Utilities Wiki by 8Crafter-Studios

"Minecraft" is a trademark of Mojang AB.

8Crafter-Studios, 8Crafter's Server Utilities Wiki and 8crafter.com are not affiliated in any way with Microsoft or Mojang AB.

  • Privacy Policy
  • Join our Discord
  • Learn how to Contribute
  • Visit our Repository
  • Wiki Settings