This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler | |
public void onEntityExplode(EntityExplodeEvent e){ | |
Entity entity = e.getEntity(); | |
if(entity instanceof TNTPrimed){ | |
List<Block> lb = e.blockList(); | |
Location loc = entity.getLocation(); | |
TNTExprotion(loc, lb); | |
return; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler | |
public void onPlayerInteract(PlayerInteractEvent e) { | |
final Player p = e.getPlayer(); | |
ItemStack item = p.getItemInHand(); | |
if(e.getAction().equals(Action.RIGHT_CLICK_AIR)||e.getAction().equals(Action.RIGHT_CLICK_BLOCK)){ | |
if(item.getType().equals(Material.SUGAR)){ | |
Bukkit.getScheduler().runTaskLater(this, new Runnable(){ | |
public void run(){ | |
Bukkit.broadcastMessage("Delay:"+p.getName()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler | |
public void onTNTPrimed(TNTPrimedEvent event){ | |
//着火済みTNTが火打石による着火なら | |
if(event.getReason().equals(TNTPrimedEvent.SpawnReson.IGNITE)){ | |
Player player = event.getPlayer(); | |
player.sendMessage("You ignition TNT !"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler | |
public void onPlayerDeath(PlayerDeathEvent e){ | |
//死亡したプレイヤーの取得 | |
Player player = e.getEntity(); | |
//最後のダメージイベントがnullでなければ | |
if(player.getLastDamageCause() != null){ | |
//最後のダメージイベントを取得 | |
EntityDamageEvent damageE = player.getLastDamageCause(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Properties; | |
import org.bukkit.Bukkit; | |
import org.bukkit.World; | |
import org.bukkit.plugin.java.JavaPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.keepoff07.hiyaserver.blockparty.timer; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Sound; | |
import org.bukkit.entity.Player; | |
public class ExpManager { | |
private JavaPlugin main; | |
public static void setMain(JavaPlugin plugin){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Method; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Color; | |
import org.bukkit.Location; | |
import org.bukkit.Material; | |
import org.bukkit.block.Block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method; | |
import org.bukkit.Color; | |
import org.bukkit.FireworkEffect; | |
import org.bukkit.Location; | |
import org.bukkit.World; | |
import org.bukkit.entity.Firework; | |
import org.bukkit.inventory.meta.FireworkMeta; | |
public class FireworkEffectAPI { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.bukkit.Color; | |
import org.bukkit.FireworkEffect; | |
import org.bukkit.Material; | |
import org.bukkit.enchantments.Enchantment; | |
import org.bukkit.inventory.ItemStack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @author keepoff07 | |
* @license MIT License | |
* @copyright Copyright keepoff07 2015 | |
*/ | |
import io.netty.buffer.ByteBuf; | |
import io.netty.buffer.Unpooled; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; |
OlderNewer