- Building Minecraft Server Modifications(Second Edition)
- Cody M. Sommer
- 167字
- 2021-07-30 09:52:21
Understanding the Java documentation
Let's look at a method that is included in the World
class to see what information it provides us. Click on the link to view the createExplosion(Location loc, float power, boolean setFire)
method. You will be brought to a method description that is similar to the one shown in the following screenshot:

The screenshot explains each parameter and the return value for the method. This method requires that we pass three parameters to it, which is explained as follows:
- Where the explosion should take place
- How powerful the explosion should be
- Whether the explosion should cause the surrounding blocks to ignite in flames
If the returned value is void
, then the method will not send any information back to us. In this example, the method returns a boolean
value. On reading the documentation, you will learn that the returned value is whether or not the explosion actually occurred. If another plugin prevented the explosion from happening, then the createExplosion
method will return false
.
- Spring 5.0 By Example
- Access 2010數據庫基礎與應用項目式教程(第3版)
- Oracle Database 12c Security Cookbook
- Instant RubyMotion App Development
- Python數據分析從0到1
- Spring+Spring MVC+MyBatis整合開發實戰
- Visual C#通用范例開發金典
- Java Web開發詳解
- PHP+MySQL+Dreamweaver動態網站開發從入門到精通(第3版)
- Advanced Express Web Application Development
- Emgu CV Essentials
- JBoss:Developer's Guide
- C陷阱與缺陷
- 算法圖解
- 愛上C語言:C KISS