Skip to content

Commit

Permalink
[VoteUp] Bug 修复.
Browse files Browse the repository at this point in the history
- 修复了一个可能的IndexOutOfBoundsException。
  • Loading branch information
Polar-Pumpkin committed Mar 3, 2020
1 parent cc1a340 commit c71c06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/shoal/sir/voteup/config/CacheManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void report(CacheLogType type, Player user) {

if(targetLogSection != null) {
List<String> logPlayerList = new ArrayList<>(targetLogSection.getKeys(false));
for(int index = 0; index <= logPlayerList.size(); index++) {
for (int index = 0; index < logPlayerList.size(); index++) {
hover.append(PlaceholderUtil.check(
"&b▶ &c%Voter%&7投了&c%Choice%&7一票(&a%LogTime%&7) &9-> &7&o%Reason%"
.replace("%LogTime%", TimeUtil.getDescriptiveTime(targetLogSection.getLong(voteID)))
Expand All @@ -163,7 +163,7 @@ public void report(CacheLogType type, Player user) {
,
targetVote
));
if(!(index == voteIDList.size() - 1)) {
if (index != voteIDList.size() - 1) {
hover.append("\n");
}
}
Expand Down

0 comments on commit c71c06a

Please sign in to comment.