BlocklyNukkit —— Efficient plugin development framework

BlocklyNukkit —— Efficient plugin development framework

Bug Fixed
-Fixed BNP loader unable to load custom module name
-Fixed the problem that BN floating words can be typed
-Removed the old bnmiscbuild command
Bug Fixed
-Fixed the problem of asynchronous JSON and yaml conversion, greatly improved the conversion speed
-Arrow function can be used in JS
-JS can call Java class or other plug-ins through require (Java class name / file name)
-Fixed JS parser error parsing regular expressions in strings
-Fixed manager.doPathCreate Unable to create folder problem
-Fixed a problem with the BlackBerry collaboration API bug
-Fixed powernukkit 1.4.0. X biocompatibility issue
-NPC has default skin
-Define a module by commenting the macro: pragma module module name
-After the module is defined, the exported functions in other modules can be introduced through the module name
- void appendFile(String path,String text)
-Appending the contents of the written file
- BNNPC buildNPC(Position pos,String name)
- void displayHurt(Entity e)
- void displayDie(Entity e)
- void addFishingResult(String type,Item item,double chance)
-Add fishing product, type is the new product type, item is the product item, and change is the probability weight
-Type can take treasures, treasures, junks, garbage, fish, fish, both in Chinese and English
- Position buildPosition(double x,double y,double z,Level level)
New Event
- BNInitializedEvent
-Issued after all BN plug-ins are initialized
-No member function, cannot be canceled
- BNClosedEvent
-Issued when BN is requested to be closed by NK
-No member function, cannot be canceled
- StartFishingEvent
-Issued when the player starts fishing
-Player getplayer () - returns to the fishing player
-Entityfishinghook getfishinghook() - returns the fishhook entity
-Void setcancelled (Boolean cancel / void) - sets the cancel event
-Boolean iscancelled () - whether the event is cancelled
-Bnpm plug-in manager is added for one click installation, update and quick distribution of plug-ins
-Bnpm install plug-in name - installs or updates the specified plug-in
-Bnpm delete plug-in name - unloads the specified plug-in
-Related links:
-Bnpm plug in center:
Bugs fixed
- Fix the parameter dependence problem in entity.shootArrow()
- Fix BlockEntity cannot fall
- Reconstruct the AI architecture of BNNPC and fix the problem that BNNPC can't go pass doors
- Fix the problem of extracting the resource files in BN-plugin-packages
- More friendly debug for PHP users
- Fix PHP timeout bug
- Repair world.clearChunk()
- Fix database.localstroage.cache() error
- Fix the problem of switching to thunderstorm without rain
- Clean up some useless code
- //pragma es6 compile flag can be used in JS
- Fix the error of manager.getOnlinePlayers

new functions in particle :

- void drawDot(Position pos,int pid)
- void drawDot(Position pos,int pid,Player toPlayer)
- void drawDot(Position pos,int pid,int data)
- void drawDot(Position pos,int pid,int r,int g,int b)
- void drawDot(Position pos,int pid,int data,Player toPlayer)
- void drawDot(Position pos,int pid,int r,int g,int b,Player toPlayer)
- void drawEmitter(Position pos)
- void drawEmitter(Position pos,String id)
- void drawEmitter(Position pos,String id,Player toPlayer)
- these ids below can be used:
- minecraft:arrow_spell_emitter, minecraft:balloon_gas_particle, minecraft:basic_bubble_particle,
minecraft:basic_bubble_particle_manual, minecraft:basic_crit_particle, minecraft:basic_flame_particle,
minecraft:basic_portal_particle, minecraft:basic_smoke_particle, minecraft:bleach,
minecraft:block_destruct, minecraft:block_slide, minecraft:blue_flame_particle, minecraft:breaking_item_icon,
minecraft:breaking_item_terrain, minecraft:bubble_column_bubble, minecraft:bubble_column_down_particle,
minecraft:bubble_column_up_particle, minecraft:camera_shoot_explosion, minecraft:campfire_smoke_particle,
minecraft:campfire_tall_smoke_particle, minecraft:cauldron_spell_emitter, minecraft:cauldron_bubble_particle,
minecraft:cauldron_splash_particle, minecraft:colored_flame_particle, minecraft:conduit_particle,
minecraft:conduit_absorb_particle, minecraft:conduit_attack_emitter, minecraft:critical_hit_emitter,
minecraft:crop_growth_emitter, minecraft:dolphin_move_particle, minecraft:dragon_breath_fire, minecraft:dragon_breath_lingering,
minecraft:dragon_breath_trail, minecraft:dragon_death_explosion_emitter, minecraft:dragon_destroy_block,
minecraft:dragon_dying_explosion, minecraft:enchanting_table_particle, minecraft:endrod, minecraft:end_chest,
minecraft:elephant_tooth_paste_vapor_particle, minecraft:evocation_fang_particle, minecraft:evoker_spell,
minecraft:cauldron_explosion_emitter, minecraft:death_explosion_emitter, minecraft:egg_destroy_emitter,
minecraft:eyeofender_death_explode_particle, minecraft:misc_fire_vapor_particle, minecraft:explosion_particle,
minecraft:explosion_manual, minecraft:eye_of_ender_bubble_particle, minecraft:falling_border_dust_particle,
minecraft:falling_dust, minecraft:falling_dust_concrete_powder_particle, minecraft:falling_dust_dragon_egg_particle,
minecraft:falling_dust_gravel_particle, minecraft:falling_dust_red_sand_particle, minecraft:falling_dust_sand_particle,
minecraft:falling_dust_scaffolding_particle, minecraft:falling_dust_top_snow_particle, minecraft:fish_hook_particle,
minecraft:fish_pos_particle, minecraft:guardian_attack_particle, minecraft:guardian_water_move_particle,
minecraft:heart_particle, minecraft:honey_drip_particle, minecraft:huge_explosion_lab_misc_emitter,
minecraft:huge_explosion_emitter, minecraft:ice_evaporation_emitter, minecraft:ink_emitter, minecraft:knockback_roar_particle,
minecraft:lab_table_heatblock_dust_particle, minecraft:lab_table_misc_mystical_particle, minecraft:large_explosion,
minecraft:lava_drip_particle, minecraft:lava_particle, minecraft:llama_spit_smoke, minecraft:magnesium_salts_emitter,
minecraft:mobflame_emitter, minecraft:mobflame_single, minecraft:mobspell_emitter, minecraft:mob_block_spawn_emitter,
minecraft:mob_portal, minecraft:mycelium_dust_particle, minecraft:nectar_drip_particle, minecraft:note_particle,
minecraft:eek:bsidian_glow_dust_particle, minecraft:eek:bsidian_tear_particle, minecraft:phantom_trail_particle,
minecraft:portal_directional, minecraft:portal_east_west, minecraft:portal_north_south, minecraft:portal_reverse_particle,
minecraft:rain_splash_particle, minecraft:redstone_ore_dust_particle, minecraft:redstone_repeater_dust_particle,
minecraft:redstone_torch_dust_particle, minecraft:redstone_wire_dust_particle, minecraft:rising_border_dust_particle,
minecraft:shulker_bullet, minecraft:silverfish_grief_emitter, minecraft:soul_particle, minecraft:sparkler_emitter,
minecraft:splash_spell_emitter, minecraft:sponge_absorb_water_particle, minecraft:squid_flee_particle,
minecraft:squid_ink_bubble, minecraft:squid_move_particle, minecraft:stunned_emitter, minecraft:totem_particle,
minecraft:totem_manual, minecraft:underwater_torch_particle, minecraft:villager_angry, minecraft:villager_happy,
minecraft:water_drip_particle, minecraft:water_evaporation_actor_emitter, minecraft:water_evaporation_bucket_emitter,
minecraft:water_evaporation_manual, minecraft:water_splash_particle_manual, minecraft:water_splash_particle,
minecraft:water_wake_particle, minecraft:wither_boss_invulnerable

new functions in entity

- Entity spawnFallingBlock(Position pos, Block block, boolean enableGravity,boolean canBePlaced)
- EntityArrow shootArrow(Position from,Position to,Entity shooter,boolean canPickUp,double multiply)
- EntityArrow shootArrow(Position from,Position to,boolean canPickUp,double multiply)
- EntityArrow shootArrow(Position from,Position to,double multiply)
- EntityArrow shootArrow(Position from,Position to,boolean canPickUp)
- EntityArrow shootArrow(Position from,Position to)
- EntitySnowball shootSnowball(Position from,Position to,Entity shooter,boolean canPickUp,double multiply)
- EntitySnowball shootSnowball(Position from,Position to,boolean canPickUp,double multiply)
- EntitySnowball shootSnowball(Position from,Position to,double multiply)
- EntitySnowball shootSnowball(Position from,Position to,boolean canPickUp)
- EntitySnowball shootSnowball(Position from,Position to)

new functions in manager

- void removeCommand(String name)
- void sendMail(String smtpMailServer,String from,String to,String cc,String bcc,String subject,String content)
- \<E> syncCallFunction(String functionName,Object... args)
- void jvmGC()
- String getPlayerDeviceOS(Player player)
- boolean createHttpServer(int port)
- void startHttpServer(int port)
- boolean attachHandlerToHttpServer(int port,String path,String functionName)
- boolean attachHandlerToHttpServer(int port,String path,F function)

something about the callback functions of attachHandlerToHttpServer:

- Parameter: (HttpRequestEntry request);
- request成员函数:
- String getRequestUrl()
- String getPath()
- String getHeader()
- String getMethod()
- String getParameter()
- String getProtocol()
- String getFromAddress()
- void addResponseHeaderEntry(String name,String value)
- void addResponseHeader(String header)
- void addDefaultResponseHeader()
- void addDefaultResponseHeader(String charSet)
- boolean response(int statusCode,String content)
- boolean response(int statusCode,String content,String charSet)
- boolean response(int statusCode,byte[] content)

new functions in blockitem

- void addShapedCraft(String shape,Item output,(String key,Item value)...)
-This is a more comfortable way to add an ordered composition API. Shape is a synthetic shape string,
-Use a letter or number to represent the placement of synthetic raw materials, use "|" to connect three lines, and use spaces to occupy the space. If there is nothing in the last line or column, please do not keep it
-Output is a composite product, and the following parameters are the mapping table. Key is the character in your previous shape, and value is the item represented by this key
-There must be as many mapping parameters as there are strings in the shape
-For example, stone PICK: addshapedcraft ("SSS | I | I", stone pick item, "s", round stone item, "I", stick item)
-Worktable: addshapedcraft ("mm | mm", worktable item, "m", oak board item)
- void registerSimpleItem(int id,String name,int stackSize/void)
- If you register a simple pile of items, you can only override the education version items. Stacksize specifies the maximum number of items to be stacked, not 64
- void makeDropItem(Position position, Item item, boolean fly)
- void blockUpdate(Position position)

new funtion in BNNPC

- void reFresh()
Refactoring code loader code, refactoring the bnqqbot code, enhance stability, simplify interpreter
Add the function of BN plug-in package,. BNP (BN plug-in collection package) and. Bnpx (BN plug-in composite package) can be put into the blocklynukkit folder to run directly
The package can be operated by BNP command, and a BN plug-in package can be built by BNP build < makefile Path > command
Makefile is a package configuration file in JSON format, which consists of three fields: name, compress and plugins
Name is the name (string) of the packaged plug-in package, and compress is whether to compress the plug-in package (Boolean),
Plugins is a string array, which indicates the path of the BN plug-in to be typed into the package. It is loaded from top to bottom,
You can also type in the resource file in JSON YML XML TXT format, and the resource file will be decompressed sequentially to the relative position of the NK core when packaging.
You can use console in JS
Now JS plug-in error will display the correct file name
F (closure function) function is used to wrap closure
The; newline in bnapi now supports the use of \ \; to escape
Fixed the problem of F (closure) function return type error in PHP
Fixed the problem of logger (console) output null or nil error
Fixed a problem where the version command could not be modified
A new preprocessing statement pragma autoload false / true is added. Whether to let the BN interpreter load the plug-in automatically is true by default
Fixed an issue where archery does not trigger entitydamagebyentityevent
Fixed the problem that the URL could not be automatically encoded when HTTP processing
Update the PHP plug-in writing support based on Quercus PHP6 engine
For the running environment provided by Quercus, see
Compatible with all Java classes, nukkit API and BN base object, call BN API remember to add$
Updated the C / C + + plug-in writing support based on webassembly technology stack
It can directly call Java and interact with Java, compile once, run everywhere, and support Windows Linux MacOS
You can export the functions in the BN plug-in to the global environment through the export tag, and then you can use Java classes
The command exportdevjar < BN plug-in name > will export the function header of BN plug-in to a jar package for development
export function MyFun(arg1,arg2,arg3){}
def MyFun(arg1,arg2,arg3):
function BlockPlaceEvent(ent)-->export
static function PlayerJoinEvent($event){
-The function of logger has been enhanced, and now the object can be output in JSON format
-Localstorage: local storage manager
- void localStorage.cacheAll () -- read data from local and cache it to increase the speed of getting data at runtime
- String localStorage.cache (string key) -- read the specified data from local and cache it
- void localStorage.setItem (string key, string item) - set the data corresponding to the specified key to item
- String localStorage.getItem (string key) -- get the data corresponding to the specified key
- void localStorage.removeItem (string key) -- remove the data corresponding to the specified key
- String[] localStorage.getKeys () -- get all keys
- void () -- force to save the data immediately, BN will check and save the data every 3 seconds
-Memorystorage: memory shared storage manager
- void memoryStorage.setItem (object key, object item) -- set the data corresponding to the specified key to item
- String memoryStorage.getItem (object key) -- get the data corresponding to the specified key
- void memoryStorage.removeItem (object key) -- remove the data corresponding to the specified key
- Object[] localStorage.getKeys () -- get all keys
- Player[] getOnlinePlayers()
-String getresource (string name) -- read resource
-Void runcmd (string CMD) -- execute command line program
- boolean isPathExists(String path)
- String[] getFolderFiles(String path)
- int getFileSize(String path)
- void deleteFile(String path)
- void doPathCreate(String path)
- boolean isPathReadable(String path)
- boolean isPathWritable(String path)
- void copyFile(String fromPath,String toPath)
- void qq.stopBot ()
-Void interrupt (string info) -- forcibly interrupts the current function
- void downloadFromURL(String url,String saveDir,String saveName)
-Thread runthread (string functionname, object... Args) -- executes a function in a new thread and returns the thread synchronously
-Void requiremenversion (string minversion, string failmessage) -- check the BN interpreter version. If it is too low, stop running and issue a failmessage
- void shootArrow(Position from,Position to,boolean canPickUp,double multiply)
- void shootArrow(Position from,Position to,double multiply)
- void shootArrow(Position from,Position to,boolean canPickUp)
- void shootArrow(Position from,Position to)
- void lookAt(Entity e,Position pos)
-If the second text parameter of int [] setplayerbossbar starts with # XXXXXX or RGB (x, x, x), the custom color will be set for the boss blood bar
-Int [] setplayerbossbar can now be used in the text parameter; to add multiple ossbars
-Int [] setplayerbossbar (player, string text, float len) -- now returns an array containing the ID of each created ossbar
-Void removeplayerbossbar (player player, long ID) - related APIs now support the ID operation of specifying the ossbar
- double getLengthOfPlayerBossBar(Player player,long id)
- String getTextOfPlayerBossBar(Player player,long id)
-Void sendplayerxboxinfo (player from, player to) -- show the Xbox information of the player from to
-Void startedpoem (player) -- let the player begin to show the poem of the end on the screen
-Void setswingstyle (string style) -- set the style of swing
-Currently: darcula IntelliJ metal motif multi nimbus OS (system style)
- JFrame getStyledSwingWindow(String title,int width,int height,String iconPath)
-Get the swing window object according to the previously set style. If iconpath is null or "" will be replaced by bnlogo
- void showToPlayer(Player p,String callback,boolean acceptClose)
-Acceptclose is used to specify whether to call the callback function once when the window is closed
- buildButton(String text,String img)
- button(String text,String img)
- button(String text)
- setAction(String actionFunctionName/F function)
- action(String actionFunctionName/F function)
- setTitle(String title)
- title(String title)
- setContext(String context)
- context(String context)
- showToPlayer(Player p)
- showToPlayer(Player p,boolean acceptClose)
- showToPlayer(Player p,String callbackFunctionName/F function)
- showToPlayer(Player p,String callbackFunctionName/F function,boolean acceptClose)
- show(Player p)
- show(Player p,boolean accpetClose)
- show(Player p,String callbackFunctionName/F function)
- show(Player p,String callbackFunctionName/F function,boolean acceptClose)
- setTitle(String title)
- title(String title)
- setContext(String context)
- context(String context)
- setButton1(String text)
- setButton2(String text)
- button1(String text)
- button2(String text)
- setAction(String callbackFunctionName/F function)
- action(String callbackFunctionName/F function)
- showToPlayer(Player p)
- showToPlayer(Player p,boolean acceptClose)
- showToPlayer(Player p,String callbackFunctionName/F function)
- showToPlayer(Player p,String callbackFunctionName/F function,boolean acceptClose)
- show(Player p)
- show(Player p,boolean accpetClose)
- show(Player p,String callbackFunctionName/F function)
- show(Player p,String callbackFunctionName/F function,boolean acceptClose)
- setTitle(String title)
- showToPlayer(Player p)
- showToPlayer(Player p,boolean acceptClose)
- showToPlayer(Player p,String callbackFunctionName/F function)
- show(Player p)
- show(Player p,boolean accpetClose)
- show(Player p,String callbackFunctionName/F function)
- show(Player p,String callbackFunctionName/F function,boolean acceptClose)
- showToPlayer(Player p,String callbackFunctionName/F function,boolean acceptClose)
- showAsSetting(Player p, String callbackFunctionName/F function)
- showAsSetting(Player p, String imageURL, String callbackFunctionName/F function)
- buildLabel(String text)
- label(String text)
- buildInput(String title,String placeholder)
- input(String title,String placeholder)
- buildInput(String title,String placeholder,String defaulttext)
- input(String title,String placeholder,String defaulttext)
- buildToggle(String title)
- toggle(String title)
- buildToggle(String title,boolean open)
- toggle(String title,boolean open)
- buildDropdown(String title,String inner)
- dropdown(String title,String inner)
- buildDropdown(String title,String inner,int index)
- dropdown(String title,String inner,int index)
- buildSlider(String title,double min,double max,int step,double defaultvalue)
- slider(String title,double min,double max,int step,double defaultvalue)
- buildSlider(String title,double min,double max,int step)
- slider(String title,double min,double max,int step)
- buildSlider(String title,double min,double max)
- slider(String title,double min,double max)
- buildStepSlider(String title,String options)
- stepSlider(String title,String options)
- stepslider(String title,String options)
- buildStepSlider(String title,String options,int index)
- stepSlider(String title,String options,int index)
- stepslider(String title,String options,int index)
- setAction(String callbackFunctionName/F function)
- action(String callbackFunctionName/F function)
- void addExtraDropItem(Item item)
- boolean hasDropItem(Item item)
- void removeExtraDropItem(Item item)
- Item[] getExtraDropItems()
- Item[] getDropItems()
-Void setdrophand (Boolean drop / void) -- the default value is true when the parameter is not filled in
-Void setdropoffhand (Boolean drop / void) -- the default value is true when the parameter is not filled in
-Void adddropslot (int slot) -- specifies the slot of the backpack
- int[] getDropSlots()
- void removeDropSlot(int slot)
-Void doemote (string action / void) -- let NPC execute the specified facial expression action
-The action can be wave punch clap overthere hammer fall diamond pickaxe
-You can also fill in the corresponding Chinese wave boxing applause in that hammer fall diamond
-If not, choose one of the five actions above
-As for why there are only eight: because the rest can only get UUID after the purchase of krypton gold, it's cold and has no money
-Welcome to contribute UUID
-Boolean directmove (position to)
- void regenerateChunk(Position pos)
- void defineChunkRenderByName(String forLevel,String callback,int priority / void)
-Forlevel is the specified world name that the render can render
-Callback is the render callback function
-Priority is the priority. The higher the priority is, the higher the priority is. If it is not filled in, the default value is 0
- void drawPic(Position pos1,Position pos2,String img,int faceData)
-Draw the image on the IMG path from pos1 to pos2. Facedata specifies the orientation of the display box. Pos1 and pos2 must be in the same vertical plane
- void registerSolidBlock(int id,String name,double hardness,double resistance,int toolType,boolean isSilkTouchable,int dropMinExp,int dropMaxExp,int mineTier)
-Register solid blocks, the parameters are block ID (only the educational version of blocks can be overridden), block name, block hardness, block explosion resistance, mining tools, accurate collection effect, minimum drop experience, maximum drop experience, mining level
-The greater the hardness of the block, the longer the excavation time and the higher the explosion resistance, the less likely it is to be blasted
-Mining tools 0-none, 1-sword, 2-shovel, 3-pick, 4-axe, 5-scissors
-Mining level 0 - empty handed, 1 - wood, 2 - gold, 3 - stone, 4 - iron, 5 - diamond
- void registerSimpleItem(int id,String name)
-Registration of simple items heap can only override educational items

Bugs Fixed

- fix bnnpc walking in air
- fix nullpointer exception when player change the world
- new error ui


- <E> callFunction(String functionname,Object... args) --callFunction will return the return value of the function
- <E> getVariableFrom(String scriptName,String varName)
- void putVariableTo(String scriptName,String varName,<E> var)
- double getCPULoad()
- int getCPUCores()
- double getMemoryTotalSizeMB()
- double getMemoryUsedSizeMB()
- void forceDisconnect(Player player)
- Array<String> getEventFunctions(Event event)
- void getServerMotd(String host, int port, String callback)


- void setItemColor(Item item,int r,int g,int b)
- void setItemUnbreakable(Item item,boolean unbreakable)


- Item getEntityHelmet(Entity entity)
- Item getEntityChestplate(Entity entity)
- Item getEntityLeggings(Entity entity)
- Item getEntityBoots(Entity entity)
- Item getEntityItemInHand(Entity entity)
- Item getEntityItemInOffHand(Entity entity)
- void setEntityItemHelmet(Entity entity,Item item)
- void setEntityItemChestplate(Entity entity,Item item)
- void setEntityItemLeggings(Entity entity,Item item)
- void setEntityItemBoots(Entity entity,Item item)
- void setEntityItemInHand(Entity entity,Item item)
- void setEntityItemInOffHand(Entity entity,Item item)
- Item getInventorySlot(Inventory inv,int slot)


- void forceClearWindow(Player player)
- int getEventResponseIndex(PlayerFormRespondedEvent event)


- boolean isPlayer(Entity e)
- void spawnFallingBlock(Position pos, Block block, boolean enableGravity,boolean canBePlaced)

gameapi --新的基对象

- void createGame(String name,boolean useTeam,String startGameCallBack,String endGameCallBack,String mainLoopCallBack,String deathCallBack)
- void joinGame(Player player, String gameName)
- void leaveGame(Player player)
- boolean isPlayerInGame(Player player)
- GameBase getPlayerRoom(Player player)
- Array<GameBase> getAllRoomByName(String gameName)
- Array<String> getAllGameNames()
- Messager getMessager(String prefix)
- Messager getGameMessager(GameBase game)
- Multiline getMultiline(String messageType)
- InventoryMenu createInventoryMenu(String inventoryType, String title)
- FormMenu createFormMenu(String title, String content)
- void addMenuItem(InventoryMenu menu, int slot, Item item, String inventoryCallback)
- void addMenuButton(FormMenu menu,String buttonText,String imageData,String formCallback)
- Scoreboard getScoreboard(Player p)
- void setObjective(Scoreboard sb, String objectiveName,String displayName)

EventLoader --73 new

- BlockFadeEvent
- BlockFallEvent
- BlockFromToEvent
- BlockGrowEvent
- BlockIgniteEvent
- BlockPistonChangeEvent
- BlockRedstoneEvent
- DoorToggleEvent
- CreatureSpawnEvent
- CreeperPowerEvent
- EntityArmorChangeEvent
- EntityBlockChangeEvent
- EntityCombustByBlockEvent
- EntityCombustByEntityEvent
- EntityCombustEvent
- EntityDamageByBlockEvent
- EntityDamageByChildEntityEvent
- EntityExplodeEvent
- EntityMotionEvent
- EntityPortalEnterEvent
- EntityRegainHealthEvent
- EntityShootBowEvent
- EntityVehicleEnterEvent
- EntityVehicleExitEvent
- ExplosionPrimeEvent
- BrewEvent
- EnchantItemEvent
- InventoryMoveItemEvent
- StartBrewEvent
- ChunkLoadEvent
- ChunkPopulateEvent
- LevelInitEvent
- LevelLoadEvent
- LevelSaveEvent
- LevelUnloadEvent
- SpawnChangeEvent
- ThunderChangeEvent
- WeatherChangeEvent
- PlayerAchievementAwardedEvent
- PlayerAnimationEvent
- PlayerAsyncPreLoginEvent
- PlayerBlockPickEvent
- PlayerBucketEmptyEvent
- PlayerBucketFillEvent
- PlayerChangeSkinEvent
- PlayerChunkRequestEvent
- PlayerCreationEvent
- PlayerDropItemEvent
- PlayerEatFoodEvent
- PlayerEditBookEvent
- PlayerFoodLevelChangeEvent
- PlayerGameModeChangeEvent
- PlayerGlassBottleFillEvent
- PlayerInvalidMoveEvent
- PlayerItemConsumeEvent
- PlayerLocallyInitializedEvent
- PlayerMapInfoRequestEvent
- PlayerMouseOverEntityEvent
- PlayerServerSettingsRequestEvent
- PlayerSettingsRespondedEvent
- PluginDisableEvent
- PluginEnableEvent
- PotionApplyEvent
- PotionCollideEvent
- PlayerDataSerializeEvent
- RemoteServerCommandEvent
- EntityEnterVehicleEvent
- EntityExitVehicleEvent
- VehicleCreateEvent
- VehicleDamageEvent
- VehicleDestroyEvent
- VehicleMoveEvent
- VehicleUpdateEvent
- LightningStrikeEvent
Fix bugs
-Fixed the problem of bnnpc and BN floating words disappearing
New features
-Now you can add a line of comment //pragma es9 at the beginning of JS code to enable es9 language features, but there will be some performance loss, and the loss is not big, so you can use it with confidence
-The bninstall command has been abandoned, and all libraries are packaged into the BN interpreter jar. This is to save memory space, which can save up to 50MB of memory space.
Two member functions are added to the Advanced menu manager of customwindowbuilder
-Custom showasetting (player P, string callback) uses this advanced form as the player's server settings page
-Custom build dropdown (string title, string inner, int index) builds a drop-down menu and specifies default options
Eventloader adds 1 event
-Chunk unload event
Six new functions for entity
-Void setplayerexp (player player, int exp) sets player experience
-Int getplayerexp (player player)
-Void setplayer explevel (player player, int LEL) sets the player level
-Int getplayerexplevel (player player) to get player level
-Void setplayer Hunter (player player, int hunger) sets the player's hunger level
-Int getplayerhunger (player player) to get player hunger
Two new functions are added in window
-Void maketipsvar (string Varname, string providercallback) creates dynamic tips plug-in variables
-Void maketips static (string Varname, string to replace) creates static tips plug-in variables


- BNNPC buildNPC(Position pos,String name,String skinID,int calltick,String callfunction,String attackfunction)
- void showFloatingItem(Position pos,Item item)
- void removeFloatingItem(Position pos,Item item)


- Custom buildSlider(String title,double min,double max)
- Custom buildSlider(String title,double min,double max,int step)
- Custom buildSlider(String title,double min,double max,int step,double defaultvalue)
- Custom buildStepSlider(String title,String options)
- Custom buildStepSlider(String title,String options,int index)


- String getEventCustomVar(PlayerFormRespondedEvent event,int id,String mode)
- mode可以为input toggle dropdown slider stepslider


- void displaySwing()
- void setSwim(boolean swim)
- void setSwim()
- void setTickCallback(String callback)
- void setAttackCallback(String callback)


- void bStats(String pluginName,String pluginVer,String authorName,int pluginid)
- void callFunction(String functionname,Object... args) --修复了错误的拼写


- void loadScreenTP(Player player,Position pos)
- void loadScreenTP(Player player,Position pos,int loadScreenTick)
- void clearChunk(Position pos)


- PlayerHeldEvent
- InventoryClickEvent
Class library manager

-Now the class library manager can install the module directly. For now, there are only Python and database modules
-Use the command bninstall module name to install the class library


- void setBelowName(Player player,String str)


- void loadJar(String path)


- void setOceanGenerator(int seaLevel)


- BNNPC buildNPC(Position pos,String name,String skinID)
- BNNPC buildNPC(Position pos,String name,String skinID,int calltick,String callfunction)


- void turnRound(double yaw)
- void headUp(double pitch)
- void setEnableAttack(boolean attack)
- void setEnableAttack()
- void setEnableHurt(boolean hurt)
- void setEnableHurt()
- void displayHurt()
- void start()
- void setEnableGravity(boolean gravity)
- void setEnableGravity()
- void setG(double newg)
- void lookAt(Position pos)
- Player getNearestPlayer()

- boolean isSneak()

- void setSneak(boolean sneak)

- void setSneak()

- void jump()

- void setJumpHigh(double j)

- void setEnableKnockBack(boolean knock)

- void setEnableKnockBack()

- void setKnockBase(double base)

- boolean canMoveTo(Position to)

- boolean findAndMove(Position to)

- void setSpeed(double s)

- void setRouteMax(int m)

- void stopMove()

- void hit(Entity entity)

bug fixed:

-Some potions of entity effect do not display problems, but there are still some potions that cannot be displayed because NK does not support it

-Error in generating void and ocean by world

-Space world configuration loss

-SSH error reporting

-Now the window manager's operation function returns itself, which can be linked directly in the code


Now you can use Python 2.7 to make plug-ins

Add full support for Python development plug-ins, just download additional py support packages to use Python plug-ins

The support for Python development plug-ins will be synchronized with JavaScript. Python and JS use the same set of BN class libraries. All the BN class libraries of JS (except Java modules) can be called directly in Python without import

Support all Python 2.7 native standard syntax and standard library, run time is the same as JS, compiled to Java bytecode run, do not worry about inefficiency

Download the python for BN support module:

After downloading, put it directly under the. / plugins / blocklynukkit folder


- PlayerInteractEntityEvent

- PlayerDamageByPlayerEvent

- EntityKilledByEntityEvent

- PlayerDamageByEntityEvent

- EntityKilledByEntityEvent

- EntityKilledByPlayerEvent

- PlayerRespawnEvent


- void setPlayerBossBar(Player player,String text,float len)

- void removePlayerBossBar(Player player)

- double getLengthOfPlayerBossBar(Player player)

- String getTextOfPlayerBossBar(Player player)


- void createPermission(String per,String description,String defaultper)

- void removePermission(String per)

- boolean checkPlayerPermission(String per,Player player)

- String MD5Encryption(String str)

- String SHA1Encryption(String str)

- void createCommand(String name, String description, String callbackFunctionName, String per)

- void newCommand(String name, String description, Function jsFunction,String per)


- int getNetworkID(Entity entity)

- String getIDName(Entity entity)

- void spawnEntity(String name,Position pos)


- HornSongPlayer buildHorn(Song song, Position pos, boolean isloop, boolean isautodestroy)

- void addPlayerToHorn(HornSongPlayer SongPlayer, Player player)

- void removePlayerToHorn(HornSongPlayer SongPlayer, Player player)

- Array getPlayerInHorn(HornSongPlayer radioSongPlayer)

- void setHornStatus(HornSongPlayer radioSongPlayer, boolean isplaying)

- Song getSongInHorn(HornSongPlayer radioSongPlayer)


-New ocean world generator for genlevel

bug fixed

- setNameTagAlwaysVisable error


- String formatJSON(String json)

-Fixed the error that the WriteFile function could not automatically create a path

Performance optimization is carried out to force invokemethod optimization to be started when the underlying JS translates Java bytecode


For manager base objects:

New function:

String readFile(String path)

void wirteFile(String path,String text)

boolean isFileSame(String path1,String path2)

String JSONtoYAML(String json)

String YAMLtoJSON(String yaml)

void newCommand(String name, String description, Function fun)

int setTimeout(Function fun,int delay,<E+>... args)

void clearTimeout(int id)

int setInterval(Function fun,int delay,<E+>... args)

void clearInterval(int id)

void isWindows()

int getPlayerGameMode(Player player)

For JS loader:

What's new

Name indicates the name of the loaded JS file (it can prevent low-level name change and reselling)

24-hour mandatory update after new release

You can use let and const to define variables in Es5 syntax

For custom / Modal / simple window builders

New function:

- void showToPlayerCallLambda(Player p, Function fun)

For blockitem base objects:

New function:

Array<Enchantment> getItemEnchant(Item item)

int getEnchantID(Enchantment enchantment)

int getEnahcntLevel(Enchantment enchantment)

For event callers:

New event






Sandbox isolation for each JS file runtime, namespace and cross namespace calls are added, article NBT and window default values are added.