Package games.pickupbot.errors

Examples of games.pickupbot.errors.PlayerError


            ExtensionObject.DatabaseManager.addGameProfile(host, gameProfile);

        } else {
            String boundGameProfile = ExtensionObject.DatabaseManager.getGameProfileForHost(host);

            throw new PlayerError(String.format("Host=[%s] already has associated account=[%s]", host, boundGameProfile));
        }
    }
View Full Code Here


    public String getGameProfile(String host) {
        if (ExtensionObject.DatabaseManager.isGameProfileExistsForHost(host)) {
            return ExtensionObject.DatabaseManager.getGameProfileForHost(host);
        } else {
            throw new PlayerError(String.format("No associated game profile records exists for host=[%s]", host));
        }
    }
View Full Code Here

    public void changeGameProfile(String oldGameProfile, String newGameProfile) {
        if (ExtensionObject.DatabaseManager.isGameProfileExists(oldGameProfile)) {
            ExtensionObject.DatabaseManager.changeGameProfile(oldGameProfile, newGameProfile);
        } else {
            throw new PlayerError(String.format("Game profile=[%s] does not exists", oldGameProfile));
        }
    }
View Full Code Here

            ExtensionObject.DatabaseManager.removeHostBindingForGameProfile(host, gameProfile);

            this.removePlayerFromEachGameType(new Player(null, null, gameProfile), true);
        } else {
            throw new PlayerError(String.format("No associated game profile records exists for host=[%s]" +
                    " and game profile=[%s]", host, gameProfile));
        }
    }
View Full Code Here

            ExtensionObject.DatabaseManager.removeAllHostBindingsForGameProfiles(host);

            this.removePlayerFromEachGameType(new Player(null, null, gameProfile), true);
        } else {
            throw new PlayerError(String.format("No associated game profile records exists for host=[%s]", host));
        }
    }
View Full Code Here

            } else {
                String timeDifference = GregorianCalendarHelper.GetDifferenceAsHumanReadableString(lockedDateTimeStamp,
                        new GregorianCalendar());

                String lockedErrorString = String.format("Player is locked [%s remaining]", timeDifference);
                throw new PlayerError(lockedErrorString);
            }
        }
    }
View Full Code Here

        if (this.host != null && !this.host.isEmpty()
                && ExtensionObject.Configuration.getBoolean("player.game_profile_required")) {
            if (ExtensionObject.DatabaseManager.isGameProfileExistsForHost(this.host)) {
                this.gameProfile = ExtensionObject.DatabaseManager.getGameProfileForHost(this.host);
            } else {
                throw new PlayerError("No game profile has been set. Try to set it by [!iam] command like [!iam player].");
            }
        }
    }
View Full Code Here

TOP

Related Classes of games.pickupbot.errors.PlayerError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.