Skip to content

Execute math expressions in the server or console on PocketMine-MP servers.

License

Notifications You must be signed in to change notification settings

nhanaz-pm-pl/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General

Execute math expressions in the server or console on PocketMine-MP servers with /calculator command

EgImg

Arithmetic Operators

Constants

  • List of supported constants: e, euler, false, inf, log2e, log10e, ln2, ln10, lnpi, pi, nan, pi2, pi4, m_1pi, m_2pi, m_2sqrtpi, sqrtpi, sqrt2, sqrt3, sqrt12, true.
  • Description of constants: https://github.com/Muqsit/arithmexp/wiki/Constant
  • Eg: /calculator 3**2 * pi > Result: 28.2

Math functions

  • List of supported math functions: abs(), acos(), acosh(), asin(), asinh(), atan2(), atan(), atanh(), boolval(), ceil(), cos(), cosh(), deg2rad(), exp(), expm1(), fdiv(), floatval(), floor(), fmod(), hypot(), intdiv(), intval(), is_bool(), is_float(), is_finite(), is_infinite(), is_nan(), lcg_value(), log10(), log1p(), log(), max(), min(), mt_getrandmax(), mt_rand(), pi(), pow(), rad2deg(), round(), sin(), sinh(), sqrt(), tan(), tanh().
  • Description of math functions: https://github.com/Muqsit/arithmexp/wiki/Function
  • Eg: /calculator sqrt(369) > Result: 19.2

Operator

Commands & Permissions

commands:
  calculator:
    description: "Perform a math operation"
    usage: "/calculator <expression>"
    permission: calculator.command
    aliases: ["calc"]
permissions:
  calculator.command:
    default: true
    description: "Allows the use of /calculator"

Config

---
# Prefix of messages.
prefix: "&f[&6Calculator&f]&r"

# {prefix} : Prefix.
# {result} : The result of the math.
result: "{prefix} &aResult: &b{result}"

# {prefix} : Prefix.
# {error} : Error information.
error: "{prefix} &cError: {error}"

# playSound: true > A sound will be sent to the player when a math expressions is performed.
playSound: true

# showDataType: true > The data type will be displayed with the result.
showDataType: true

# Config version
configVersion: "0.0.15"
...

Contact

Discord
You can contact me directly via Discord NhanAZ

About

Execute math expressions in the server or console on PocketMine-MP servers.

Topics

Resources

License

Stars

Watchers

Forks

Languages