nukkit跨服进java服_Nukkit,一款核能驱动级 Minecraft: PE 服务端,开启属于 Minecraft: PE 的高性能开服时代!...

Nukkit

banner.png

This program is free software: you can redistribute it and/or modify

it under the terms of the GNU Lesser General Public License as published by

the Free Software Foundation, either version 3 of the License, or

(at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License

along with this program. If not, see .

A Nuclear-Powered Server Software For Minecraft: Pocket Edition

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2d646f6e6174652d79656c6c6f772e73766768747470733a2f2f696d672e736869656c64732e696f2f6769747465722f726f6f6d2f4e756b6b69742f4e756b6b69742e6a732e7376673f7374796c653d666c617468747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4e756b6b69742f4e756b6b69742e7376673f7374796c653d666c6174

Introduction

Nukkit is nuclear-powered server software for Minecraft: Pocket Edition. It has a few key advantages over other server software:

Written in Java, Nukkit is faster and more stable.

Having a friendly structure, it's easy to contribute to Nukkit's development and rewrite plugins from other platforms into Nukkit plugins.

Nukkit is under improvement yet, we welcome contributions.

Example servers running Nukkit

play.EaseCation.net

play.GameTeam.cz

MultiLabs.net

Get Nukkit & Plugins

Recommended Sites

Thank you for visiting our official sites. Our official websites are provided free of charge, and we do not like to place ads on the home page affecting your reading. If you like this project, please donate to us. All the donations will only be used for Nukkit websites and services.

Unofficial Download Mirrors

These sites are provided by our users, Nukkit staff are not responsible for the reliability of these sites. Jar files downloaded here are only for reference - to try the latest update or for commercial uses, compile by yourself.

Build JAR file

git submodule update --init

mvn clean

mvn package

Running

Simply run start.sh or start.cmd, or execute java -jar Nukkit.jar.

Plugin API

Example Plugin

Example Plugin which shows the API of Nukkit.

Development Tools

There're some tools for Nukkit developers.

Load source and pack them easily)

Run Nukkit on android devices)

Contributing

Please read the CONTRIBUTING guide before submitting any issue. Issues with insufficient information or in the wrong format will be closed and will not be reviewed.

Discussion

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要编写一个Java语言的Minecraft mod,使得当玩家受伤时会自动打创造模式,可以按照以下步骤行: 1. 下载并安装Minecraft Mod发工具,例如Eclipse或IntelliJ IDEA。 2. 创建一个新的Minecraft mod项目。 3. 在mod的代码中,使用Minecraft Forge提供的事件监听器来检测玩家受伤事件。 4. 在受伤事件发生时,通过Minecraft Forge提供的API将玩家的游戏模式切换到创造模式。 以下是一些示例代码来实现此功能: ```java import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventHandler; @Mod(modid = "mymod", version = "1.0") public class MyMod { @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void onLivingHurt(LivingHurtEvent event) { if (event.getEntity() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.getEntity(); if (player.getHealth() - event.getAmount() <= 0) { player.setGameType(GameType.CREATIVE); } } } } ``` 上述代码中,我们注册了一个事件监听器来监听实体受伤事件。在事件处理程序中,我们检查实体是否为玩家,并检查玩家是否会在此次伤害事件中死亡。如果是,则将玩家的游戏模式切换到创造模式。请注意,我们使用了Minecraft Forge提供的API来设置玩家的游戏模式。 完成上述步骤后,编译并打包你的mod,然后将它安装到Minecraft游戏中。当你在游戏中受伤时,你的游戏模式将会自动切换到创造模式。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值