Add this.

This commit is contained in:
drtshock 2014-05-19 11:45:45 -05:00
parent 024336d717
commit 5d50dc9971
6 changed files with 10 additions and 10 deletions

View File

@ -15,12 +15,10 @@ import com.massivecraft.factions.zcore.persist.PlayerEntity;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
@ -302,7 +300,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator {
}
public String getName() {
if(isOnline()) {
if (isOnline()) {
return getPlayer().getName();
}
/*OfflinePlayer player = Bukkit.getOfflinePlayer(UUID.fromString(getId()));

View File

@ -13,9 +13,6 @@ import com.massivecraft.factions.util.MapFLocToStringSetTypeAdapter;
import com.massivecraft.factions.util.MyLocationTypeAdapter;
import com.massivecraft.factions.zcore.MPlugin;
import com.massivecraft.factions.zcore.util.TextUtil;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.libs.com.google.gson.GsonBuilder;

View File

@ -1,6 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.*;
import com.massivecraft.factions.integration.Essentials;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.struct.Role;
@ -107,6 +108,10 @@ public class CmdHome extends FCommand {
return;
}
}
// if Essentials teleport handling is enabled and available, pass the teleport off to it (for delay and cooldown)
if (Essentials.handleTeleport(me, myFaction.getHome())) return;
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (!payForCommand(Conf.econCostHome, "to teleport to your faction home", "for teleporting to your faction home"))
return;

View File

@ -132,7 +132,7 @@ public abstract class FCommand extends MCommand<P> {
if (name != null) {
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
if (player.hasPlayedBefore()) {
if (player.hasPlayedBefore()) {
FPlayer fplayer = FPlayers.i.get(player);
if (fplayer != null) {
ret = fplayer;
@ -196,7 +196,7 @@ public abstract class FCommand extends MCommand<P> {
// Next we match player names
if (faction == null) {
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
if (player.hasPlayedBefore()) {
if (player.hasPlayedBefore()) {
FPlayer fplayer = FPlayers.i.get(player);
if (fplayer != null) {
faction = fplayer.getFaction();

View File

@ -16,7 +16,7 @@ public class Essentials {
public static void setup() {
Plugin ess = Bukkit.getPluginManager().getPlugin("Essentials");
if(ess != null) {
if (ess != null) {
essentials = (IEssentials) ess;
}
}

View File

@ -74,7 +74,7 @@ public class UUIDFetcher implements Callable<Map<String, UUID>> {
}
private static UUID getUUID(String id) {
return UUID.fromString(id.substring(0, 8) + "-" + id.substring(8, 12) + "-" + id.substring(12, 16) + "-" + id.substring(16, 20) + "-" +id.substring(20, 32));
return UUID.fromString(id.substring(0, 8) + "-" + id.substring(8, 12) + "-" + id.substring(12, 16) + "-" + id.substring(16, 20) + "-" + id.substring(20, 32));
}
public static byte[] toBytes(UUID uuid) {