mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-09-27 14:52:59 +02: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")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String command, String[] args) {
|
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 config = new ConfigAccessor(plugin, "config.yml");
|
||||||
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "portals.yml");
|
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "portals.yml");
|
||||||
if (!(sender instanceof Player)) {
|
if (!(sender instanceof Player)) {
|
||||||
|
@ -95,14 +95,10 @@ public class Listeners implements Listener {
|
|||||||
|
|
||||||
String uuid = player.getUniqueId().toString();
|
String uuid = player.getUniqueId().toString();
|
||||||
|
|
||||||
/*if (plugin.PlayerDestiMap.containsKey(uuid)) {
|
if (plugin.PlayerDestiMap.containsKey(uuid)) {
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
Destination.warp(player, plugin.PlayerDestiMap.get(uuid), false, true);
|
||||||
Destination.warp(player, plugin.PlayerDestiMap.get(uuid), false, true);
|
plugin.PlayerDestiMap.remove(uuid);
|
||||||
plugin.PlayerDestiMap.remove(uuid);
|
}
|
||||||
|
|
||||||
}, 1L);
|
|
||||||
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
@ -35,23 +35,18 @@ public class PluginMessageReceiver implements PluginMessageListener {
|
|||||||
|
|
||||||
Player targetPlayer = this.plugin.getServer().getPlayer(UUID.fromString(bungeeUUID));
|
Player targetPlayer = this.plugin.getServer().getPlayer(UUID.fromString(bungeeUUID));
|
||||||
|
|
||||||
|
if (targetPlayer != null) {
|
||||||
Player finalTargetPlayer = targetPlayer;
|
Destination.warp(targetPlayer, targetDestination, false, true);
|
||||||
Destination.warp(finalTargetPlayer, targetDestination, false, true);
|
|
||||||
|
|
||||||
/*if (targetPlayer != null) {
|
|
||||||
Player finalTargetPlayer = targetPlayer;
|
|
||||||
Destination.warp(finalTargetPlayer, targetDestination, false, true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plugin.PlayerDestiMap.put(bungeeUUID, targetDestination);
|
plugin.PlayerDestiMap.put(bungeeUUID, targetDestination);
|
||||||
|
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () ->
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () ->
|
||||||
plugin.PlayerDestiMap.remove(bungeeUUID),
|
plugin.PlayerDestiMap.remove(bungeeUUID),
|
||||||
20L*10
|
20L * 10
|
||||||
);
|
);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user