• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

“Studio:插件代码集中营”的版本间的差异

来自Minecraft插件百科
跳转至: 导航搜索
给实体药水效果
代码区
第40行: 第40行:
 
Player p = (Player)sender;
 
Player p = (Player)sender;
 
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,80,2) );
 
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,80,2) );
 +
</source>
 +
 +
备注: 暂无
 +
 +
=== 生成自定义实体(之一) ===
 +
 +
前提:  实体类(Interface)
 +
 +
说明:
 +
 +
指定实体类 变量 = (指定实体类) *.getWorld().spawnEntity(位置, 实体类型);
 +
位置: Location
 +
指定实体类: org.bukkit.entity  包 / Interface Summary 接口
 +
实体类型: EntityType.*
 +
 +
实例:
 +
 +
<source lang="java">
 +
Player p = (Player)sender;
 +
Location l = p.getLocation();
 +
Sheep s = (Sheep) p.getWorld().spawnEntity(l, EntityType.SHEEP);
 
</source>
 
</source>
  
 
备注: 暂无
 
备注: 暂无

2015年12月3日 (四) 13:37的版本

In order to reach all the Reached party

前言

标题就是这货存在的意义

记不下的代码这里放

写明这货是干什么的

这里只容得下黑科技和麻烦码


快捷代码格:

<source lang="java"> </source>

代码区

给实体药水效果

前提: 实体类(生物)

说明:

addPotionEffect(new PotionEffect(效果类型,持续时间,效果等级) );
效果类型: PotionEffectType.*   
持续时间&效果等级: int

实例:

Player p = (Player)sender;
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,80,2) );

备注: 暂无

生成自定义实体(之一)

前提: 实体类(Interface)

说明:

指定实体类 变量 = (指定实体类) *.getWorld().spawnEntity(位置, 实体类型);
位置: Location
指定实体类: org.bukkit.entity  包 / Interface Summary 接口
实体类型: EntityType.*

实例:

Player p = (Player)sender;
Location l = p.getLocation();
Sheep s = (Sheep) p.getWorld().spawnEntity(l, EntityType.SHEEP);

备注: 暂无