- 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
.
- 數(shù)據(jù)結構和算法基礎(Java語言實現(xiàn))
- 構建移動網(wǎng)站與APP:HTML 5移動開發(fā)入門與實戰(zhàn)(跨平臺移動開發(fā)叢書)
- HTML5 移動Web開發(fā)從入門到精通(微課精編版)
- Learning ArcGIS Pro
- Java EE 7 Development with NetBeans 8
- Mastering AndEngine Game Development
- 精通Python自然語言處理
- PhoneGap Mobile Application Development Cookbook
- 大學計算機基礎(第2版)(微課版)
- Elasticsearch for Hadoop
- Android程序設計基礎
- Spring核心技術和案例實戰(zhàn)
- Learning YARN
- Android開發(fā)三劍客:UML、模式與測試
- C++ Fundamentals