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
public void powerPiston(Block b) | |
{ | |
if(b == null) | |
{ | |
return; | |
} | |
if(b.getType() != Material.PISTON_BASE && b.getType() != Material.PISTON_STICKY_BASE) | |
{ | |
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
import java.util.List; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.inventory.meta.PotionMeta; | |
import org.bukkit.potion.Potion; | |
import org.bukkit.potion.PotionEffect; | |
import org.bukkit.potion.PotionType; | |
/** | |
* | |
* @author DarkSeraphim |
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
@Command(name="freeforall", description="Teleports you to the free for all arena") | |
@Aliases("ffa") | |
public boolean freeForAll(CommandSender sender, org.bukkit.command.Command command, String[] args) | |
{ | |
if(sender instanceof Player) | |
{ | |
((Player)sender).teleport(this.loc); | |
sender.sendMessage(ChatColor.YELLOW+"Have a good fight >:)!"); | |
} | |
return true; |
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
@Command(name="ffa", description="Teleports you to the free for all arena") | |
@Aliases("freeforall") | |
public boolean freeForAll(CommandSender sender, org.bukkit.command.Command command, String label, String[] args) | |
{ | |
if(sender instanceof Player) | |
{ | |
((Player)sender).teleport(this.loc); | |
sender.sendMessage(ChatColor.YELLOW+"Have a good fight >:)!"); | |
} | |
return true; |
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 net.darkseraphim.sbt; | |
import org.bukkit.Bukkit; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.player.PlayerJoinEvent; | |
import org.bukkit.event.player.PlayerQuitEvent; | |
import org.bukkit.entity.Player; | |
import org.bukkit.scoreboard.Objective; | |
import org.bukkit.scoreboard.DisplaySlot; |
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 net.darkseraphim.fr; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** |
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 com.earth2me.essentials.Essentials; | |
import com.earth2me.essentials.Kit; | |
import com.earth2me.essentials.MetaItemStack; | |
import com.earth2me.essentials.textreader.IText; | |
import com.earth2me.essentials.textreader.KeywordReplacer; | |
import com.earth2me.essentials.textreader.SimpleTextInput; | |
import net.ess3.api.IEssentials; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; |
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 net.darkseraphim.util; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Random; | |
/** | |
* @Author DarkSeraphim | |
*/ | |
public class ClairvoyantRandom extends Random |
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
public class LoadingCache<K, V> extends HashMap<K, V> | |
{ | |
private final long timeout; | |
private final Function<K, V> function; | |
private Map<K, Long> timeouts = new HashMap<K, Long>(); | |
public LoadingCache(long timeout, Function<K, V> function) |
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
public void getMeMyMessages(String player) | |
{ | |
db.execute(String.format("SELECT * FROM `messages` WHERE `player` = '%s'", player), new Callback() | |
{ | |
@Override | |
public void callMeMaybe(ResultSet rs) | |
{ | |
Player p = Bukkit.getPlayer(player); | |
if(p == null) | |
return; |
OlderNewer