Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Commit aa4e4f1

Browse files
committed
Create Alpha version 0.1 -dev
1 parent d67fd1c commit aa4e4f1

32 files changed

+1653
-126
lines changed

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
21
/.idea/
32
/target/
43
/dependency-reduced-pom.xml
4+
/RPGMenu.iml
5+
RPGMenu.iml
6+
/.settings/
7+
/.classpath
8+
/.project
9+
/bin/
10+
*.iml
11+
/resources/
12+
/doc/
13+
.vscode/

.travis.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
notifications:
2+
email: false
13
language: java
24
jdk:
35
- oraclejdk8
6+
install: true
47
script: mvn package
8+
env:
9+
global:
10+
- secure: oE1IWeVoV92JfqEhHyQmA41bBFOai135Rmq++OqgbRPC4UlAqELQa8agPXHqQE4sX+FQ4vtdvp3CC/LIdVFYKnXAyDLiMidvTYH4KWGJuiD55s+Ql+sXb0v7BH10yK3woY0gk86Y0CImYiNsAn5tD19ouqxc4zuK7RyaEnMHctwRQ/GQvko4uSMBRq1V4UHnuoaojpiQnfufVaOT1rqCl3tki7tDPWV0aVJnh/v+hQ3XqLomNUDxHuxlvEFJjRZ6lreZECrDSq2xZbrY5khHW92LJDtKqDKMx7GNvunAJ6o8frZqzNUIuTuSjr/8FHS4QUnNszSKLa1w38No688FaxxvvUtbG08QR7XEqnABV3OwT4+Gqw+rlytiTL3yg+KiRT4jAMF4nkyCdVRp6MQwKVTOOcEvvcIJpf7rOmprQifDM+bkIwMLuVB1yR6+5d9OSrrv7JgP5wyC+VNAG2O2pvk42gzFDUacuDvct4XXK2s+pOvnkawv9zR1j/28O1pGEZPKvtixkZ1pJdIowXmjE89DCeDaUDqlsZ9aH83WEAyT3prbw/x3C7F2nhmnCz6EHRKei1qbgPWDF29BiV4j1qInPmfHGH+KR4jB6tLw1WP+m31qlHXwv3mtixteUgyH34GJBPvyg/s50TIMJO+2L68hMMIUSTjzPHqBkLD5U1I=
11+
- secure: fvUrixC4m+V5/9DI0AH0BxNdt5Ll/mMoOyBvZ8qCrZfjaNFqI1CXuhrtZu6MN7ASf5Rtdz7CVyYUs7ZTUPrbt9MwLXe2LIIKltb1Se/i/cpVBF6RK8EDgv3QnUyDXqL2YozMaxQCyl3G2dI+cNepBeeq6aFaMRAsbFAQXYv/I8gP4vhfm9i1wnfTKmAu99R0hJ85ArT2WYCAUZrPmY9vk9vnE0EuqM8agyjaaTb862zWn2BfCnvCGjDGZPkMlnk/YIOtFAdea6uhCJiR4OV1H1M++IphsjxeZVzRbmGOQGCx28hud0ru0UAOghZqBlA5fmW0Oe/FSY4/9HxyWPuhPkJ2Gr/L11CN60lIEsTEAqmRTfkQEHTteYiP0i01gBSOiBAi20tVpaorbbL4l0AwtXpGuv/8lA16m2trGgXQseTDvCZ7chhK3dkm9jmkG0GAbw+l/BcJXhM2IEQYW5Z7gQLaj3KUpAiPCucwaieVndUhwQ5LO8RlIvsbozf+sgq0m2Fw0j7b6IKEaUHWdQEzW1mXdC2ZnbduRJKkN3Lfdc1vENQI062uspWIl2VmbevhaE3kSWSxagNcI1SJPyT84xHTe2jfBsQiTO1jLlwidU7Juiwamv0s7xKbGwWiJYXvk4r+7GE4CqvAyM4QJPYwAK2eQ6rJ17MWPNUh/FhR5RY=
512
deploy:
613
api_key: $O_AUTH_TOKEN
714
provider: releases
815
skip_cleanup: true
9-
file: $TRAVIS_BUILD_DIR/target/RPGMenu.jar
16+
file: "$TRAVIS_BUILD_DIR/target/RPGMenu.jar"
17+
on:
18+
tags: true
19+
after_success:
20+
- chmod +x discord.sh
21+
- "./discord.sh success $DISCORD_WEBHOOK_URL"
22+
after_failure:
23+
- chmod +x discord.sh
24+
- "./discord.sh failure $DISCORD_WEBHOOK_URL"
25+

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# <img src="https://raw.githubusercontent.com/joblo2213/RPGMenu/master/icon.png" data-canonical-src="https://raw.githubusercontent.com/joblo2213/RPGMenu/master/icon.png" width="40" height="40" /> RPGMenu
1+
![header](https://raw.githubusercontent.com/joblo2213/RPGMenu/master/header.png)
2+
# RPGMenu [![Build Status](https://travis-ci.org/joblo2213/RPGMenu.svg?branch=master)](https://travis-ci.org/joblo2213/RPGMenu)
23

34
RPGMenu is a addon for [BetonQuest](https://github.com/Co0sh/BetonQuest) which allows server operators to simply create thier own guis
45
by using events and items from BetonQuest.

discord.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/bin/bash
2+
3+
if [ -z "$2" ]; then
4+
echo -e "WARNING!!\nYou need to pass the WEBHOOK_URL environment variable as the second argument to this script.\nFor details & guide, visit: https://github.com/k3rn31p4nic/travis-ci-discord-webhook" && exit
5+
fi
6+
7+
if [ -z "$TRAVIS_TAG" ]; then
8+
9+
echo -e "[Webhook]: Sending webhook to Discord...\\n";
10+
11+
case $1 in
12+
"success" )
13+
EMBED_COLOR=3066993
14+
STATUS_MESSAGE="Passed"
15+
STATUS_ICON="https://raw.githubusercontent.com/travis-ci/travis-api/master/public/images/result/passing.png"
16+
;;
17+
18+
"failure" )
19+
EMBED_COLOR=15158332
20+
STATUS_MESSAGE="Failed"
21+
STATUS_ICON="https://raw.githubusercontent.com/travis-ci/travis-api/master/public/images/result/failing.png"
22+
;;
23+
24+
* )
25+
EMBED_COLOR=0
26+
STATUS_MESSAGE="Status Unknown"
27+
STATUS_ICON="https://raw.githubusercontent.com/travis-ci/travis-api/master/public/images/result/unknown.png"
28+
;;
29+
esac
30+
31+
AUTHOR_NAME="$(git log -1 "$TRAVIS_COMMIT" --pretty="%aN")"
32+
COMMITTER_NAME="$(git log -1 "$TRAVIS_COMMIT" --pretty="%cN")"
33+
COMMIT_SUBJECT="$(git log -1 "$TRAVIS_COMMIT" --pretty="%s")"
34+
COMMIT_MESSAGE="$(git log -1 "$TRAVIS_COMMIT" --pretty="%b")"
35+
36+
if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then
37+
CREDITS="$AUTHOR_NAME authored & committed"
38+
else
39+
CREDITS="$AUTHOR_NAME authored & $COMMITTER_NAME committed"
40+
fi
41+
42+
if [[ $TRAVIS_PULL_REQUEST != false ]]; then
43+
URL="https://github.com/$TRAVIS_REPO_SLUG/pull/$TRAVIS_PULL_REQUEST"
44+
else
45+
URL=""
46+
fi
47+
48+
TIMESTAMP=$(date --utc +%FT%TZ)
49+
WEBHOOK_DATA='{
50+
"username": "",
51+
"avatar_url": "",
52+
"embeds": [ {
53+
"color": '$EMBED_COLOR',
54+
"author": {
55+
"name": "Job #'"$TRAVIS_JOB_NUMBER"' (Build #'"$TRAVIS_BUILD_NUMBER"') '"$STATUS_MESSAGE"' - '"$TRAVIS_REPO_SLUG"'",
56+
"url": "https://travis-ci.org/'"$TRAVIS_REPO_SLUG"'/builds/'"$TRAVIS_BUILD_ID"'"
57+
},
58+
"title": "'"$COMMIT_SUBJECT"'",
59+
"url": "'"$URL"'",
60+
"description": "'"${COMMIT_MESSAGE//$'\n'/ }"\\n\\n"$CREDITS"'",
61+
"thumbnail": {
62+
"url": "'"$STATUS_ICON"'"
63+
},
64+
"fields": [
65+
{
66+
"name": "Commit",
67+
"value": "'"[\`${TRAVIS_COMMIT:0:7}\`](https://github.com/$TRAVIS_REPO_SLUG/commit/$TRAVIS_COMMIT)"'",
68+
"inline": true
69+
},
70+
{
71+
"name": "Branch/Tag",
72+
"value": "'"[\`$TRAVIS_BRANCH\`](https://github.com/$TRAVIS_REPO_SLUG/tree/$TRAVIS_BRANCH)"'",
73+
"inline": true
74+
}
75+
],
76+
"timestamp": "'"$TIMESTAMP"'"
77+
} ]
78+
}'
79+
80+
(curl --fail --progress-bar -A "TravisCI-Webhook" -H Content-Type:application/json -H X-Author:k3rn31p4nic#8383 -d "$WEBHOOK_DATA" "$2" \
81+
&& echo -e "\\n[Webhook]: Successfully sent the webhook.") || echo -e "\\n[Webhook]: Unable to send webhook:\\n\\nWEBHHOK_DATA:\\n$WEBHHOK_DATA"
82+
83+
fi

header.png

310 KB
Loading

icon.png

-7.15 KB
Loading

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
<dependency>
2323
<groupId>org.spigotmc</groupId>
2424
<artifactId>spigot-api</artifactId>
25-
<version>LATEST</version>
25+
<version>1.12.2-R0.1-SNAPSHOT</version>
2626
<scope>provided</scope>
2727
</dependency>
2828
<dependency>
2929
<groupId>org.bukkit</groupId>
3030
<artifactId>bukkit</artifactId>
31-
<version>LATEST</version>
31+
<version>1.12.2-R0.1-SNAPSHOT</version>
3232
<scope>provided</scope>
3333
</dependency>
3434
<dependency>

src/main/java/de/ungefroren/rpgmenu/ItemDescription.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* Contains the description of a item in a menu. Variables are parsed and color codes are replaced.
26-
*
26+
* <p>
2727
* Created on 27.01.2018
2828
*
2929
* @author Jonas Blocher
@@ -43,6 +43,7 @@ public ItemDescription(ConfigPackage pack, Collection<String> content) throws In
4343

4444
/**
4545
* Receive display name of item for specific player
46+
*
4647
* @param playerID id of the player
4748
* @return
4849
*/
@@ -54,12 +55,12 @@ public String getDisplayName(String playerID) {
5455

5556
/**
5657
* Receive lore of the item for specific player
58+
*
5759
* @param playerID id of the player
5860
* @return
5961
*/
6062
public List<String> getLore(String playerID) {
61-
List<Line> lines = this.lines;
62-
lines.remove(0);
63+
List<Line> lines = this.lines.subList(1, this.lines.size());
6364
if (lines.isEmpty()) return new ArrayList<>();
6465
List<String> lore = new ArrayList<>(lines.size());
6566
for (Line line : lines) {
@@ -95,6 +96,7 @@ public Line(String line) throws InstructionParseException {
9596

9697
/**
9798
* Resolves all variables in this line for specified player
99+
*
98100
* @param playerID id of a player
99101
* @return
100102
*/

0 commit comments

Comments
 (0)