Skip to content

Commit

Permalink
エンダーマンのブロック設置をキャンセル
Browse files Browse the repository at this point in the history
  • Loading branch information
meyason committed Nov 4, 2024
1 parent 95985f5 commit e97ab0b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package space.yurisi.universecorev2.event.entity;

import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityChangeBlockEvent;

public class ChangeBlockEvent implements Listener {

@EventHandler
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
if(event.getEntity().getType() == EntityType.ENDERMAN) {
event.setCancelled(true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public L96A1() {
ItemStack.of(Material.DIAMOND_HOE)
);

this.type = GunType.SR_SEMI;
this.type = GunType.SR_BOLT;
this.equipmentType = GunType.PRIMARY;
this.magazineSize = 5;
this.burst = 0;
Expand Down

0 comments on commit e97ab0b

Please sign in to comment.