mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
1.8.3 update.
This commit is contained in:
parent
b113bb59d4
commit
f8160c6318
7 changed files with 96 additions and 4 deletions
|
@ -214,16 +214,31 @@ public class OfflinePlayer implements Player {
|
|||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Block> getLineOfSight(Set<Material> mat, int i) {
|
||||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getTargetBlock(HashSet<Byte> hs, int i) {
|
||||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getTargetBlock(Set<Material> mat, int i) {
|
||||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> hs, int i) {
|
||||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Block> getLastTwoTargetBlocks(Set<Material> mat, int i) {
|
||||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireTicks() {
|
||||
throw new UnsupportedOperationException(tl("notSupportedYet"));
|
||||
|
@ -1271,6 +1286,11 @@ public class OfflinePlayer implements Player {
|
|||
return base.getPlayer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spigot spigot() {
|
||||
return base.getPlayer().spigot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getFirstPlayed() {
|
||||
return base.getFirstPlayed();
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.earth2me.essentials.utils.StringUtil;
|
|||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.util.concurrent.UncheckedExecutionException;
|
||||
import net.ess3.api.IEssentials;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -17,7 +18,7 @@ import java.util.concurrent.ExecutionException;
|
|||
|
||||
public class UserMap extends CacheLoader<String, User> implements IConf {
|
||||
private final transient IEssentials ess;
|
||||
private final transient Cache<String, User> users;
|
||||
private final transient LoadingCache<String, User> users;
|
||||
private final transient ConcurrentSkipListSet<UUID> keys = new ConcurrentSkipListSet<UUID>();
|
||||
private final transient ConcurrentSkipListMap<String, UUID> names = new ConcurrentSkipListMap<String, UUID>();
|
||||
private final transient ConcurrentSkipListMap<UUID, ArrayList<String>> history = new ConcurrentSkipListMap<UUID, ArrayList<String>>();
|
||||
|
|
|
@ -6,6 +6,8 @@ import org.bukkit.Server;
|
|||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import static com.earth2me.essentials.I18n.tl;
|
||||
|
||||
|
||||
|
@ -17,7 +19,7 @@ public class Commandbreak extends EssentialsCommand {
|
|||
//TODO: Switch to use util class
|
||||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
final Block block = user.getBase().getTargetBlock(null, 20);
|
||||
final Block block = user.getBase().getTargetBlock((HashSet<Byte>) null, 20);
|
||||
if (block == null) {
|
||||
throw new NoChargeException();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import com.earth2me.essentials.User;
|
|||
import org.bukkit.Server;
|
||||
import org.bukkit.entity.LightningStrike;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import static com.earth2me.essentials.I18n.tl;
|
||||
|
||||
|
||||
|
@ -21,7 +23,7 @@ public class Commandlightning extends EssentialsLoopCommand {
|
|||
if (sender.isPlayer()) {
|
||||
user = ess.getUser(sender.getPlayer());
|
||||
if ((args.length < 1 || user != null && !user.isAuthorized("essentials.lightning.others"))) {
|
||||
user.getWorld().strikeLightning(user.getBase().getTargetBlock(null, 600).getLocation());
|
||||
user.getWorld().strikeLightning(user.getBase().getTargetBlock((HashSet<Byte>) null, 600).getLocation());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -621,4 +621,19 @@ public class FakeWorld implements World {
|
|||
public boolean createExplosion(double d, double d1, double d2, float f, boolean bln, boolean bln1) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorldBorder getWorldBorder() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spigot spigot() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entity> getNearbyEntities(Location loc, double x, double y, double z) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.bukkit.event.Listener;
|
|||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
||||
|
@ -37,7 +38,7 @@ public class SignPlayerListener implements Listener {
|
|||
if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) {
|
||||
Block targetBlock = null;
|
||||
try {
|
||||
targetBlock = event.getPlayer().getTargetBlock(null, 5);
|
||||
targetBlock = event.getPlayer().getTargetBlock((HashSet<Byte>) null, 5);
|
||||
} catch (IllegalStateException ex) {
|
||||
if (ess.getSettings().isDebug()) {
|
||||
ess.getLogger().log(Level.WARNING, ex.getMessage(), ex);
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.bukkit.permissions.PermissionAttachment;
|
|||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.*;
|
||||
import org.bukkit.plugin.messaging.Messenger;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.scheduler.BukkitWorker;
|
||||
|
@ -158,16 +159,31 @@ public class FakeServer implements Server {
|
|||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable bukkitRunnable, long l) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleSyncDelayedTask(Plugin plugin, Runnable r) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable bukkitRunnable) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleSyncRepeatingTask(Plugin plugin, Runnable r, long l, long l1) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleSyncRepeatingTask(Plugin plugin, BukkitRunnable bukkitRunnable, long l, long l1) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncRepeatingTask(Plugin plugin, Runnable r, long l, long l1) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
|
@ -218,33 +234,63 @@ public class FakeServer implements Server {
|
|||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTask(Plugin plugin, BukkitRunnable bukkitRunnable) throws IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskAsynchronously(Plugin plugin, Runnable r) throws IllegalArgumentException {
|
||||
r.run();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskAsynchronously(Plugin plugin, BukkitRunnable bukkitRunnable) throws IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskLater(Plugin plugin, Runnable r, long l) throws IllegalArgumentException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskLater(Plugin plugin, BukkitRunnable bukkitRunnable, long l) throws IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable r, long l) throws IllegalArgumentException {
|
||||
r.run();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskLaterAsynchronously(Plugin plugin, BukkitRunnable bukkitRunnable, long l) throws IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskTimer(Plugin plugin, Runnable r, long l, long l1) throws IllegalArgumentException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskTimer(Plugin plugin, BukkitRunnable bukkitRunnable, long l, long l1) throws IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable r, long l, long l1) throws IllegalArgumentException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BukkitTask runTaskTimerAsynchronously(Plugin plugin, BukkitRunnable bukkitRunnable, long l, long l1) throws IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable r, long l) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
|
@ -868,6 +914,11 @@ public class FakeServer implements Server {
|
|||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spigot spigot() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BanList getBanList(BanList.Type arg0) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
|
|
Loading…
Reference in a new issue