mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-13 11:41:47 +01:00
rearranged to test gui stuff
This commit is contained in:
parent
88a823f713
commit
ee10d17cbb
@ -1,6 +1,6 @@
|
|||||||
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
|
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
|
||||||
name: AdvancedPortals
|
name: AdvancedPortals
|
||||||
version: 0.0.21
|
version: 0.0.22
|
||||||
author: sekwah41
|
author: sekwah41
|
||||||
description: An advanced portals plugin for bukkit.
|
description: An advanced portals plugin for bukkit.
|
||||||
commands:
|
commands:
|
||||||
|
2
pom.xml
2
pom.xml
@ -16,7 +16,7 @@
|
|||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<version>0.0.21-snapshot</version>
|
<version>0.0.22-snapshot</version>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||||||
|
@ -385,6 +385,32 @@ public class Portal {
|
|||||||
cooldown.put(player, System.currentTimeMillis());
|
cooldown.put(player, System.currentTimeMillis());
|
||||||
boolean showFailMessage = true;
|
boolean showFailMessage = true;
|
||||||
|
|
||||||
|
//plugin.getLogger().info(portal.portalName + ":" + portal.destiation);
|
||||||
|
boolean warped = false;
|
||||||
|
if (portal.bungee != null) {
|
||||||
|
if (ShowBungeeMessage) {
|
||||||
|
player.sendMessage(PluginMessages.customPrefix + "\u00A7a Attempting to warp to \u00A7e" + portal.bungee + "\u00A7a.");
|
||||||
|
}
|
||||||
|
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
|
out.writeUTF("Connect");
|
||||||
|
out.writeUTF(portal.bungee);
|
||||||
|
player.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
|
||||||
|
// Down to bungee to sort out the teleporting but yea theoretically they should warp.
|
||||||
|
}
|
||||||
|
else if (portal.destiation != null) {
|
||||||
|
ConfigAccessor configDesti = new ConfigAccessor(plugin, "destinations.yml");
|
||||||
|
if (configDesti.getConfig().getString(portal.destiation + ".world") != null) {
|
||||||
|
warped = Destination.warp(player, portal.destiation);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (showFailMessage) {
|
||||||
|
player.sendMessage(PluginMessages.customPrefix + "\u00A7c The portal you are trying to use doesn't have a destination!");
|
||||||
|
plugin.getLogger().log(Level.SEVERE, "The portal '" + portal.portalName + "' has just had a warp "
|
||||||
|
+ "attempt and either the data is corrupt or portal doesn't exist!");
|
||||||
|
throwPlayerBack(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (portal.getArg("command.1") != null) {
|
if (portal.getArg("command.1") != null) {
|
||||||
showFailMessage = false;
|
showFailMessage = false;
|
||||||
int commandLine = 1;
|
int commandLine = 1;
|
||||||
@ -426,32 +452,8 @@ public class Portal {
|
|||||||
command = portal.getArg("command." + ++commandLine);
|
command = portal.getArg("command." + ++commandLine);
|
||||||
} while (command != null);
|
} while (command != null);
|
||||||
}
|
}
|
||||||
//plugin.getLogger().info(portal.portalName + ":" + portal.destiation);
|
|
||||||
if (portal.bungee != null) {
|
return warped;
|
||||||
if (ShowBungeeMessage) {
|
|
||||||
player.sendMessage(PluginMessages.customPrefix + "\u00A7a Attempting to warp to \u00A7e" + portal.bungee + "\u00A7a.");
|
|
||||||
}
|
|
||||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
|
||||||
out.writeUTF("Connect");
|
|
||||||
out.writeUTF(portal.bungee);
|
|
||||||
player.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
|
|
||||||
// Down to bungee to sort out the teleporting but yea theoretically they should warp.
|
|
||||||
}
|
|
||||||
else if (portal.destiation != null) {
|
|
||||||
ConfigAccessor configDesti = new ConfigAccessor(plugin, "destinations.yml");
|
|
||||||
if (configDesti.getConfig().getString(portal.destiation + ".world") != null) {
|
|
||||||
boolean warped = Destination.warp(player, portal.destiation);
|
|
||||||
return warped;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (showFailMessage) {
|
|
||||||
player.sendMessage(PluginMessages.customPrefix + "\u00A7c The portal you are trying to use doesn't have a destination!");
|
|
||||||
plugin.getLogger().log(Level.SEVERE, "The portal '" + portal.portalName + "' has just had a warp "
|
|
||||||
+ "attempt and either the data is corrupt or portal doesn't exist!");
|
|
||||||
throwPlayerBack(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void rename(String oldName, String newName) {
|
public static void rename(String oldName, String newName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user