mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-09-29 23:57:36 +02:00
Left in fall damage removal by mistake...
This commit is contained in:
parent
57bc18b994
commit
1ccda4eab7
@ -1,7 +1,7 @@
|
|||||||
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
|
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
|
||||||
name: AdvancedPortals
|
name: AdvancedPortals
|
||||||
version: 0.0.14
|
version: 0.0.15
|
||||||
author: SEKWAH41
|
author: sekwah41
|
||||||
description: An advanced portals plugin for bukkit.
|
description: An advanced portals plugin for bukkit.
|
||||||
commands:
|
commands:
|
||||||
advancedportals:
|
advancedportals:
|
||||||
|
@ -92,8 +92,6 @@ public class Listeners implements Listener {
|
|||||||
|
|
||||||
cPlayer.isOnGround();
|
cPlayer.isOnGround();
|
||||||
|
|
||||||
cPlayer.setFallDistance(-10);
|
|
||||||
|
|
||||||
Location fromloc = event.getFrom();
|
Location fromloc = event.getFrom();
|
||||||
Location loc = event.getTo();
|
Location loc = event.getTo();
|
||||||
// Potentially fixes that stupid error cauzed by a bukkit update.
|
// Potentially fixes that stupid error cauzed by a bukkit update.
|
||||||
|
@ -359,6 +359,13 @@ public class Portal {
|
|||||||
|
|
||||||
// add other variables or filter code here, or somehow have a way to register them
|
// add other variables or filter code here, or somehow have a way to register them
|
||||||
|
|
||||||
|
String permission = portal.getArg("permission");
|
||||||
|
/*if((permission == null || (permission != null && player.hasPermission(permission)) || player.isOp())){*/
|
||||||
|
if(!((permission != null && player.hasPermission(permission)) || player.isOp())){
|
||||||
|
player.sendMessage("\u00A7c[\u00A77AdvancedPortals\u00A7c] You do not have permission to use this portal!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(portal.bungee != null){
|
if(portal.bungee != null){
|
||||||
if(ShowBungeeMessage){
|
if(ShowBungeeMessage){
|
||||||
player.sendMessage("\u00A7a[\u00A7eAdvancedPortals\u00A7a] Attempting to warp to \u00A7e" + portal.bungee + "\u00A7a.");
|
player.sendMessage("\u00A7a[\u00A7eAdvancedPortals\u00A7a] Attempting to warp to \u00A7e" + portal.bungee + "\u00A7a.");
|
||||||
@ -414,11 +421,9 @@ 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);
|
//plugin.getLogger().info(portal.portalName + ":" + portal.destiation);
|
||||||
if(portal.destiation != null){
|
if(portal.destiation != null){
|
||||||
ConfigAccessor configDesti = new ConfigAccessor(plugin, "destinations.yml");
|
ConfigAccessor configDesti = new ConfigAccessor(plugin, "destinations.yml");
|
||||||
String permission = portal.getArg("permission");
|
|
||||||
if(permission == null || (permission != null && player.hasPermission(permission)) || player.isOp()){
|
|
||||||
if(configDesti.getConfig().getString(portal.destiation + ".world") != null){
|
if(configDesti.getConfig().getString(portal.destiation + ".world") != null){
|
||||||
boolean warped = Destination.warp(player, portal.destiation);
|
boolean warped = Destination.warp(player, portal.destiation);
|
||||||
return warped;
|
return warped;
|
||||||
@ -431,9 +436,14 @@ public class Portal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.sendMessage("\u00A7c[\u00A77AdvancedPortals\u00A7c] You do not have permission to use this portal!");
|
if(showFailMessage) {
|
||||||
|
player.sendMessage("\u00A7c[\u00A77AdvancedPortals\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!");
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if(configDesti.getConfig().getString(destiName + ".world") != null){
|
/*if(configDesti.getConfig().getString(destiName + ".world") != null){
|
||||||
String permission = portalData.getConfig().getString(portalName + ".portalArgs.permission");
|
String permission = portalData.getConfig().getString(portalName + ".portalArgs.permission");
|
||||||
if(permission == null || (permission != null && player.hasPermission(permission)) || player.isOp()){
|
if(permission == null || (permission != null && player.hasPermission(permission)) || player.isOp()){
|
||||||
@ -453,19 +463,6 @@ public class Portal {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
if(showFailMessage) {
|
|
||||||
player.sendMessage("\u00A7c[\u00A77AdvancedPortals\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!");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// add code for if the portal doesnt have a destination but a exemptPlayer location
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void rename(String oldName, String newName){
|
public static void rename(String oldName, String newName){
|
||||||
|
Loading…
Reference in New Issue
Block a user