mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 12:06:17 +01:00
Updated some portal info
This commit is contained in:
parent
fd58793480
commit
130ae81857
@ -29,10 +29,6 @@ public class DestinationManager {
|
||||
}
|
||||
|
||||
public void createDesti(PlayerContainer player, PlayerLocation playerLocation, ArrayList<DataTag> dataTags) throws DestinationException {
|
||||
if(player == null) {
|
||||
throw new DestinationException(Lang.translate("error.notplayer"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ public class PortalManager {
|
||||
this.createPortal(name, player, this.portalSelectorLeftClick.get(player.getUUID().toString()),
|
||||
this.portalSelectorRightClick.get(player.getUUID().toString()), tags);
|
||||
} else {
|
||||
throw new PortalException(Lang.translate("portal.invalidselection"));
|
||||
throw new PortalException("portal.invalidselection");
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ public class PortalManager {
|
||||
int minZ = Math.min(loc1.posZ, loc2.posZ);
|
||||
|
||||
if(!loc1.worldName.equalsIgnoreCase(loc2.worldName)) {
|
||||
throw new PortalException(Lang.translate("portal.error.selection.differentworlds"));
|
||||
throw new PortalException("portal.error.selection.differentworlds");
|
||||
}
|
||||
|
||||
PortalLocation maxLoc = new PortalLocation(loc1.worldName, maxX, maxY, maxZ);
|
||||
@ -152,10 +152,10 @@ public class PortalManager {
|
||||
creation.portalCreated(portal, player, portalTag.VALUE);
|
||||
}
|
||||
if(name == null || name.equals("")) {
|
||||
throw new PortalException(Lang.translate("portal.error.noname"));
|
||||
throw new PortalException("portal.error.noname");
|
||||
}
|
||||
else if(this.portalHashMap.containsKey(name)) {
|
||||
throw new PortalException(Lang.translate("portal.error.takenname"));
|
||||
throw new PortalException("portal.error.takenname");
|
||||
}
|
||||
this.portalHashMap.put(name, portal);
|
||||
this.updatePortalArray();
|
||||
@ -173,16 +173,16 @@ public class PortalManager {
|
||||
this.removePortal(player, portal);
|
||||
}
|
||||
catch(PortalException e) {
|
||||
if(e.getMessage().equals(Lang.translate("command.remove.noname"))) {
|
||||
if(e.getMessage().equals("command.remove.noname")) {
|
||||
this.selectedPortal.remove(player.getUUID());
|
||||
throw new PortalException(Lang.translate("command.remove.invalidselection"));
|
||||
throw new PortalException("command.remove.invalidselection");
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new PortalException(Lang.translate("command.remove.noselection"));
|
||||
throw new PortalException("command.remove.noselection");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -193,7 +193,7 @@ public class PortalManager {
|
||||
public void removePortal(PlayerContainer player, String portalName) throws PortalException {
|
||||
AdvancedPortal portal = this.getPortal(portalName);
|
||||
if(portal == null) {
|
||||
throw new PortalException(Lang.translate("command.remove.noname"));
|
||||
throw new PortalException("command.remove.noname");
|
||||
}
|
||||
|
||||
for(DataTag portalTag : portal.getArgs()) {
|
||||
|
@ -17,6 +17,7 @@ import java.util.Set;
|
||||
* @author sekwah41
|
||||
*/
|
||||
public class AdvancedPortal {
|
||||
|
||||
@SerializedName("max")
|
||||
private PortalLocation maxLoc;
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class CreateSubCommand implements SubCommand {
|
||||
AdvancedPortalsCore.getPortalManager().createPortal(args[1], player, portalTags);
|
||||
} catch (PortalException portalTagExeption) {
|
||||
sender.sendMessage(Lang.translateColor("messageprefix.negative") + Lang.translateColor("command.create.error") + " "
|
||||
+ portalTagExeption.getMessage());
|
||||
+ Lang.translate(portalTagExeption.getMessage()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -22,7 +22,7 @@ public class RemoveSubCommand implements SubCommand {
|
||||
AdvancedPortalsCore.getPortalManager().removePortal(sender.getPlayerContainer(), args[1]);
|
||||
} catch (PortalException portalTagExeption) {
|
||||
sender.sendMessage(Lang.translateColor("messageprefix.negative")
|
||||
+ Lang.translateColor("command.remove.error") + " " + portalTagExeption.getMessage());
|
||||
+ Lang.translateColor("command.remove.error") + " " + Lang.translate(portalTagExeption.getMessage()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -35,7 +35,7 @@ public class RemoveSubCommand implements SubCommand {
|
||||
AdvancedPortalsCore.getPortalManager().removePlayerSelection(player);
|
||||
} catch (PortalException portalTagExeption) {
|
||||
sender.sendMessage(Lang.translateColor("messageprefix.negative")
|
||||
+ Lang.translateColor("command.remove.error") + " " + portalTagExeption.getMessage());
|
||||
+ Lang.translateColor("command.remove.error") + " " + Lang.translate(portalTagExeption.getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user