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
if (!i.getType().equals(Material.COMPASS)) | |
return; | |
Player pl = null; | |
double dist = 0.0D; | |
for (Entity en : p.getNearbyEntities(1000.0D, 1000.0D, 1000.0D)) { | |
if (!(en instanceof Player)) continue; | |
Player play = (Player)en; | |
dist = p.getLocation().distance(play.getLocation()); | |
if (dist < 15.0) continue; |
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 de.Timpa.Hilfe.commands; | |
import org.bukkit.ChatColor; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandExecutor; | |
import org.bukkit.command.CommandSender; | |
import org.bukkit.entity.Player; | |
import de.Timpa.Hilfe.Hilfe; | |
public class CommandTeam implements CommandExecutor { |
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 abstract class Stats { | |
private static MyPlugin plugin; | |
private static Map<String,Integer> kills = new HashMap<String,Integer>(); | |
public static void setPlugin(MyPlugin pl) { | |
plugin = pl: | |
} | |
public static void load() { | |
for(String key : plugin.getConfig().getKeys(false)) { | |
kills.put(key, plugin.getConfig().get(key)); | |
} |
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 final class LocationSerialation { | |
public static String serial(Location l) { | |
return new String(l.getBlockX() + "," + l.getBlockY() + "," + l.getBlockZ() + "," + l.getWorld().getName()); | |
} | |
public static Location deserial(String s) { | |
String[] a = s.split(","); | |
World w = Bukkit.getWorld(a[3]); | |
if(w == null) { | |
w = Bukkit.getWorlds().get(0); | |
} |
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
<iframe scr="http://www.twitch.tv/DEINCHANNELNAME/popout" name="Livestream" style="width: 640px; height: 480px; margin: 2em auto; background-color: black; box-shadow: 0 0 20px rgba(128,128,128,.5);">Dein browser unterstütz IFrames nicht</iframe> |
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.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.apache.commons.lang.StringUtils; | |
import org.bukkit.Material; | |
import org.bukkit.enchantments.Enchantment; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.inventory.meta.ItemMeta; |
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 ScoreboardHelper { | |
public static void displayObjective(Player player, String id, String title, DisplaySlot slot ,Map<String, Integer> values) { | |
Scoreboard board = player.getScoreboard(); | |
if(board == null) { | |
board = Bukkit.getScoreboardManager().getNewScoreboard(); | |
} | |
Objective obj = board.getObjective(id); | |
if(obj == null) { | |
obj = board.registerNewObjective(id, "dummy"); |