Add this.
This commit is contained in:
parent
024336d717
commit
5d50dc9971
@ -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()));
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user