Skip to content

Commit

Permalink
[VoteUp] Bug 修复.
Browse files Browse the repository at this point in the history
- 修复了一个权限问题。
  • Loading branch information
Polar-Pumpkin committed Mar 3, 2020
1 parent c71c06a commit 50bd245
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public String getPromptText(ConversationContext context) {
public Prompt acceptInput(ConversationContext context, String input) {
locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected Prompt acceptValidatedInput(ConversationContext context, String input)

locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public SetAmountPrompt(Player player) {
protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public String getPromptText(ConversationContext context) {
public Prompt acceptInput(ConversationContext context, String input) {
locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected boolean isInputValid(ConversationContext context, String input) {
protected Prompt acceptValidatedInput(ConversationContext context, String input) {
locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public String getPromptText(ConversationContext context) {
public Prompt acceptInput(ConversationContext context, String input) {
locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public String getPromptText(ConversationContext context) {
public Prompt acceptInput(ConversationContext context, String input) {
locale = VoteUp.getInstance().getLocale();

if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) || !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
if (!user.hasPermission(VoteUpPerm.ADMIN.perm()) && !voteID.split("_")[0].equalsIgnoreCase(user.getName())) {
CommonUtil.message(locale.buildMessage(VoteUp.LOCALE, MessageType.WARN, "&7权限验证失败, 您不具有修改目标投票内容的权限."), user.getName());
return Prompt.END_OF_CONVERSATION;
}
Expand Down

0 comments on commit 50bd245

Please sign in to comment.