• 周年纪念勋章活动已圆满结束,如有已购买但仍未申请的用户,可以通过对应勋章的下载链接申请~
BetterSidebar - 更好的自定义侧边栏

LSE BetterSidebar - 更好的自定义侧边栏 0.1.20

Introduction:

This is a custom sidebar, which supports up to 88+ variables that can be dynamically switched and bounced

Good performance optimization, flexible call of server resources based on variable usage, public resources are only called once per refresh (shared by all players, greatly saving server resources) Simple use of BEPlaceholderAPI variables, also supports js expressions!



If you encounter any problems, you can click on me to add a group to ask (scroll down for video tutorials)



Refactoring update 0.1.0
This version is not compatible with the old version in some areas, please make your own changes



Now, in addition to the newly added variables, you can also directly call them based on llse

For example:

{pl.pos.x} -- current x coordinate



{pl.getScore(money)} -- Get the scoreboard of the current player's money



Isn't it very flexible?



This update mainly

1. Filtering simulated players, players who have not finished loading, and players who are sleeping (to improve performance)

2. Public variables are only called once, and other players use the cache

3. Dynamic jumping of two-level indexes Each is initialized with an independent index to prevent the problem of random jumping

4. Select the required variables based on the user's usage variables to reduce unnecessary variable updates (reduce server pressure)



Configure the listening scoreboard (supported in versions >= 0.1.3)

(The old version of the configuration requires adding the on configuration item by yourself)

For example:

JavaScript:
"on": {



        "money": {



            '<=0': '{num} is clean',//less than or equal to 0



            '=100': 'small money belt',



            '500': 'wallet is full',// = can be ignored



            '>1000': '小富',//大于1000



            '>=5000': '富豪',//5000 or more



            '>=100000': 'rich enough to rival the country'



        //监听 money 记分项,仅对该记分项生效



    },//Scoreboard monitor, display different strings

 

    //  {num}  is the variable that listens to the scoreboard value (only this type is supported here!!!)







Variable list:

Variables are uniformly wrapped with {variable name}

Player's pl



Attribute, Meaning, Type
pl.llmoney player llmoney Integer
pl.name: Player name, String
pl.pos: The player's current coordinates, as a number
pl.blockPos player's block coordinate IntPos
pl.lastDeathPos: The coordinates of the player's last death. IntPos
pl.realName: The player's real name, a String
pl.xuid Player XUID string String
pl.uuid: player UUID string
pl.permLevel player's operation permission level (0 - 4) Integer
pl.gameMode player's game mode (0 - 3) Integer
pl.canFly Whether the player can fly Boolean
pl.canSleep Whether the player can sleep Boolean
pl.canBeSeenOnMap Whether the player can be seen on the map Boolean
pl.canFreeze Whether the player can freeze Boolean
pl.canSeeDaylight Whether the player can see daylight Boolean
pl.canShowNameTag Whether the player can display the name tag Boolean
pl.canStartSleepInBed Whether the player can start sleeping in bed Boolean
pl.canPickupItems Whether the player can pick up items Boolean
pl.maxHealth: The maximum health of the player, Integer
pl.health: The current health of the player, an Integer
pl.inAir Whether the player is currently suspended in the air Boolean
pl.inWater Whether the player is currently in water Boolean
pl.inLava Whether the player is in the lava Boolean
pl.inRain Whether it rains for the player Boolean
pl.inSnow Whether the player is in snow Boolean
pl.inWall Whether the player is on the wall Boolean
pl.inWaterOrRain Whether the player is in water or rain Boolean
pl.inWorld Whether the player is in the world Boolean
pl.inClouds Whether the player is in the cloud Boolean
pl.sneaking Whether the player is currently sneaking Boolean
pl.speed: The current speed of the player, represented as a Float
pl.directionStr: The current direction of the player. DirectionAngle
pl.uniqueId Player (entity) unique identifier String
pl.langCode: The identifier for the language set by the player (e.g., zh_CN) String
pl.isLoading Whether the player has loaded Boolean
pl.IsInvisible Whether the player is invisible Boolean
pl.isInsidePortal player is inside portal Boolean
pl.isHurt Whether the player is hurt Boolean
pl.isTrusting Unknown Boolean
pl.isTouchingDamageBlock Whether the player is on a block that can cause damage Boolean
pl.isHungry Whether the player is hungry Boolean
pl.isOnFire Whether the player is on fire Boolean
pl.isOnGround Whether the player is on the ground Boolean
pl.isOnHotBlock Whether the player is on a hot block (magma, etc.) Boolean
pl.isTrading player is trading Boolean
pl.isAdventure Whether the player is in adventure mode Boolean
pl.isGliding Player is gliding Boolean
pl.isSurvival Whether the player is in survival mode Boolean
Is the player in spectator mode? Boolean
pl.isRiding Whether the player is riding or not Boolean
Is the player dancing? Boolean
pl.isCreative Whether the player is in creative mode Boolean
pl.isFlying Whether the player is flying Boolean
pl.isSleeping Whether the player is sleeping Boolean
pl.isMoving Whether the player is moving Boolean
pl.ip: Player device IP address: String
pl.getScore(name) Gets the score of the player's scoring item (convenient function) Integer
pl.isOP() Whether the player is an OP Boolean
According to the llse player object documentation, basically all functions can be called, but unless you know what you are doing, don't mess around. Danger, danger, danger


IntPos type introduction Full usage pl.pos.x

Member: Meaning: Type
pos.x x coordinate Integer
pos.y: y-coordinate, Integer
pos.z z coordinate Integer
pos.dim 维度文本名 String
pos.dimid Dimension ID Integer


Date and Time

Variable name Description Return value
date.Y Year 2021
date.M month 10
date.D Day 24
date.h Hour (24-hour clock) 02
date.m, minute 07
date.s Seconds 43
date.ms milliseconds 321


Player device dv



Attribute, Meaning, Type
dv.ip: The IP address of the player's device. String
dv.avgPing: The average network latency (in ms) of the player. Integer
dv.avgPacketLoss: The average network packet loss rate (%) of the player, as a Float
dv.lastPing: The network latency time (in ms) of the player. Integer
dv.lastPacketLoss Player's network packet loss rate (%) Float
dv.os: The operating system type of the player device. String
dv.inputMode: The player's operation mode. Integer
dv.playMode Player's play mode Integer
dv.serverAddress: The address of the player's connection. String
dv.clientId: The identification code ID of the player client. String


Other variables of the package yoyo (BEPlaceholderAPI supports variable call %s_yoyo_itemSum%)

Variable name Description Return value
yoyo.itemSum Total number of dropped entities in the loaded block 14
yoyo.itemDetailSum Number of items dropped 125
yoyo.beingSum Total number of biological entities in the loaded block 43
yoyo.playerSum Total number of players online 3
yoyo.bdsv returns the current version of BDS, 1.17.30
yoyo.llv returns the current version of LiteXLoader, 0.5.7
yoyo.tps returns the current tps value, which is 19.89 (maximum 20)
yoyo.bdsa bds version agreement




BEPlaceholderAPI pre-plug-in support You can do this (>=0.1.3 support)

bep | b | B | Bep



For example:



Server variable:

{bep.server_has_whitelist} Call server variable to check whether there is a whitelist



Player variables:



{bep.player_health:pl} Call the player variable current health The end of the variable needs to be added with :pl or :player identification



JavaScript expression (>=0.1.5 support)

Attention:

The variable of the BEPlaceholderAPI cannot be directly b.xx bep.xx here

It needs to be like this:



//[Recommendation] Translate player variables (updated and modified in 0.1.20)

PAPI.translateStringWithPlayer('%player_max_health%',pl);



//[Recommendation] Translation server variables (updated and modified in 0.1.20)

PAPI.translateString('%server_port%');



//Player variable

PAPI.getValueByPlayer('variable name',pl)//(0.1.20 updated and modified) The old version was p.xuid, now it is pl



//Server variables

PAPI.getValue('variable name')





For example:

{js:pl.llmoney+(pl.llmoney>=5000?'(rich man)':'(poor man)')}

{js: your JavaScript code}

//Only simple expressions are supported. There cannot be any brackets such as { } in the expression. Multiple ; endings are allowed. The last one is returned as the result by default

Note: If you don't understand js, please don't try it easily because it can easily lead to errors (the background will also continue to prompt errors)



Configuration file path:

".\\plugins\\Yoyo\\BetterSidebar\\newConfig.json"



Player Commands (updated and modified in 0.1.20)

/sidebar <on|on|true> - Enable your own sidebar

/sidebar <off|off|false> - Turn off your own sidebar



/sidebar - Open the sidebar action menu (supported in versions >= 0.1.5)



Console Command (updated and modified in 0.1.20)

sidebar reload- Quickly reload configuration





Configuration file:

JSON:
{

    "hz": 800,

    "on": {

        "money": {

            "500": "{num} wallet is full",

            "<=0": "{num} clean",

            "=100": "{num} small money belt",

            ">1000": "{num}小富",

            ">=5000": "{num} millionaires",

            ">=100000": "Enriching to rival a nation"

        }

    },

    "title": [

        Announcement: Welcome to join us,

        “§1§g-Announcement:§5 Welcome to join us!”,

        “§1§g/Announcement:§5 Welcome to join us! ”

    ],

    "data": [

        "§e{pl.realName},§g Hello!",

        "§gScoreboard:§5{pl.getScore(money)}",

        [

            &quot;§gPlatform: §5{dv.os} &quot,

            "§gDelay: {js:(dv.avgPing>=100?'§4':'§2')+dv.avgPing}ms",

            Version: §6{yoyo.bdsv}

        ],

        §g Falling objects: §4{js:(yoyo.itemDetailSum>=1000?'§4(many)':'§2(few)')+yoyo.itemDetailSum},§g Living things: §4{yoyo.beingSum},

        Player: §5{yoyo.playerSum}, Direction: §5{pl.directionStr},

        "§gmoney: §3{pl.llmoney}",

        Now it is: {date.D} {date.h}:{date.m}:{date.s},{js:date.h>=22||date.h<4?'§l§8 It's late at night':'§3 Let's have some fun'},

        Whether §g is in the air: §5{pl.inAir}, §gTps: §5{yoyo.tps}"

    ]

}



hz:600 is the refresh frequency unit in milliseconds

title: ["我是标题"] This is the title. Add multiple titles to this array to switch between them



data:["first line","second line"] Each line in this represents a sidebar

data: ["First line", "Second line", ["Third line, first item", "Third line, second item"]] Similarly, multiple items can be switched as with the title



data: ["My name is: {pl.name}, "second line"] For example, we added a variable {pl.name} to display the player name



1688136755854.jpeg





Video demonstration:


1688170228821.jpeg
后退
顶部 底部