简体   繁体   English

如何通过我的世界插件管理世界?

[英]How to manage the world through the minecraft plugin?

I can manage player with我可以用

Player p = (Player) sender
p.*

* - player manage funcions. * - 玩家管理功能。

I can manage world?我能管理世界吗? For example: change time.例如:改变时间。

You can get the world object with: World w = player.getWorld()您可以通过以下方式获得世界 object: World w = player.getWorld()

Now you can execute methods onto the world object, for example w.setTime(2000)现在您可以在世界 object 上执行方法,例如w.setTime(2000)

See the documentation for methods: https://jd.bukkit.org/org/bukkit/World.html有关方法,请参阅文档: https://jd.bukkit.org/org/bukkit/World.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM