geforkt von Mirrors/Paper
Added event for endermen picking up and placing blocks and methods to get/set what an enderman is holding.
By: Wizjany <wizjany@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
c3a23bd4e1
Commit
118ab48313
@ -1,8 +1,11 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.server.EntityEnderman;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
public class CraftEnderman extends CraftMonster implements Enderman {
|
||||
public CraftEnderman(CraftServer server, EntityEnderman entity) {
|
||||
@ -18,4 +21,13 @@ public class CraftEnderman extends CraftMonster implements Enderman {
|
||||
public String toString() {
|
||||
return "CraftEnderman";
|
||||
}
|
||||
|
||||
public MaterialData getCarriedMaterial() {
|
||||
return Material.getMaterial(getHandle().getCarriedId()).getNewData((byte) getHandle().getCarriedData());
|
||||
}
|
||||
|
||||
public void setCarriedMaterial(MaterialData data) {
|
||||
getHandle().setCarriedId(data.getItemTypeId());
|
||||
getHandle().setCarriedData(data.getData());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren