mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-29 05:55:19 +01:00
Changed for better support for paperspigot
This commit is contained in:
parent
d84ec0bd3e
commit
d104da907f
@ -54,7 +54,6 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String command, String[] args) {
|
||||
// System.out.printf("%s %s %s %s%n", sender, cmd, command, args );
|
||||
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
|
||||
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "portals.yml");
|
||||
if (!(sender instanceof Player)) {
|
||||
|
@ -95,14 +95,10 @@ public class Listeners implements Listener {
|
||||
|
||||
String uuid = player.getUniqueId().toString();
|
||||
|
||||
/*if (plugin.PlayerDestiMap.containsKey(uuid)) {
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
||||
if (plugin.PlayerDestiMap.containsKey(uuid)) {
|
||||
Destination.warp(player, plugin.PlayerDestiMap.get(uuid), false, true);
|
||||
plugin.PlayerDestiMap.remove(uuid);
|
||||
|
||||
}, 1L);
|
||||
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
|
@ -35,13 +35,8 @@ public class PluginMessageReceiver implements PluginMessageListener {
|
||||
|
||||
Player targetPlayer = this.plugin.getServer().getPlayer(UUID.fromString(bungeeUUID));
|
||||
|
||||
|
||||
Player finalTargetPlayer = targetPlayer;
|
||||
Destination.warp(finalTargetPlayer, targetDestination, false, true);
|
||||
|
||||
/*if (targetPlayer != null) {
|
||||
Player finalTargetPlayer = targetPlayer;
|
||||
Destination.warp(finalTargetPlayer, targetDestination, false, true);
|
||||
if (targetPlayer != null) {
|
||||
Destination.warp(targetPlayer, targetDestination, false, true);
|
||||
|
||||
}
|
||||
else {
|
||||
@ -51,7 +46,7 @@ public class PluginMessageReceiver implements PluginMessageListener {
|
||||
plugin.PlayerDestiMap.remove(bungeeUUID),
|
||||
20L * 10
|
||||
);
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user