Skip to content

Commit 5b75b2e

Browse files
committed
v0.2 Update added rank expiration placeholder
1 parent 3ccb1b2 commit 5b75b2e

21 files changed

+343
-6
lines changed
26.6 KB
Binary file not shown.
0 Bytes
Binary file not shown.
100 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
68 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

.gradle/file-system.probe

0 Bytes
Binary file not shown.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.MD

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ A powerful PlaceholderAPI expansion that provides custom placeholders for [Bolt]
2020
- **Match Management**: Real-time match winner/loser tracking for solo, team, and FFA matches
2121
- **Kit Information**: Dynamic kit rule checking for any Bolt kit
2222
- **Staff Tools**: Vanish and mod-mode status indicators
23+
- **Rank Expiration**: Configurable rank expiration time display with cascading time units
2324
- **Performance**: Optimized code with minimal overhead
2425
- **Flexible**: Works with or without optional dependencies
2526

@@ -77,6 +78,15 @@ A powerful PlaceholderAPI expansion that provides custom placeholders for [Bolt]
7778
| Placeholder | Example Result | Description |
7879
|------------|----------------|-------------|
7980
| `%extraplaceholders_phoenix_status%` | `[⚗] [⚙]` | Shows staff status (vanish/mod mode) |
81+
| `%extraplaceholders_phoenix_expiration%` | `1 Year 5 Days 3 Hours` | Shows rank expiration time with configurable units |
82+
83+
#### Rank Expiration Features
84+
- **Cascading Time Units**: Disabled units automatically convert to the next available unit
85+
- Example: With `YEAR: false` and `MONTH: false`, "1 year 5 days" becomes "370 Days"
86+
- **Fully Configurable**: Enable/disable any time unit (Years, Months, Days, Hours, Minutes, Seconds)
87+
- **Custom Labels**: Customize singular and plural forms for each time unit
88+
- **Smart Display**: Only shows non-zero values for cleaner output
89+
- **Permanent Rank Support**: Configurable message for permanent ranks
8090

8191
## 🎨 Configuration
8292

@@ -118,6 +128,38 @@ PHOENIX:
118128
DEFAULT_STATUS: '&f'
119129
VANISHED_PREFIX: '<#9e9e9e>[⚗] '
120130
MOD_MODE_PREFIX: '<#ffc430>[⚙] '
131+
132+
# Rank Expiration Messages
133+
PERMANENT_RANK: '&aPermanent'
134+
NO_TIME_REMAINING: '&c0s'
135+
136+
RANK_EXPIRY:
137+
# Time Unit Configuration
138+
# Set to false to cascade that unit into the next available unit
139+
# Example: If YEAR and MONTH are false, a '1 year 5 days' rank becomes '370 days'
140+
# Cascading order: Years -> Months -> Days -> Hours -> Minutes -> Seconds
141+
YEAR: true
142+
MONTH: true
143+
DAY: true
144+
HOUR: true
145+
MINUTES: true
146+
SECONDS: true
147+
148+
# Singular Time Unit Labels
149+
YEAR_SINGULAR: ' Year'
150+
MONTH_SINGULAR: ' Month'
151+
DAY_SINGULAR: ' Day'
152+
HOUR_SINGULAR: ' Hour'
153+
MINUTE_SINGULAR: ' Minute'
154+
SECOND_SINGULAR: ' Second'
155+
156+
# Plural Time Unit Labels
157+
YEAR_PLURAL: ' Years'
158+
MONTH_PLURAL: ' Months'
159+
DAY_PLURAL: ' Days'
160+
HOUR_PLURAL: ' Hours'
161+
MINUTE_PLURAL: ' Minutes'
162+
SECOND_PLURAL: ' Seconds'
121163

122164
LOGGER:
123165
# Logger Format Settings
@@ -127,6 +169,58 @@ LOGGER:
127169
ERROR_COLOR: '&c'
128170
```
129171
172+
### Rank Expiration Configuration Examples
173+
174+
#### Example 1: Full Time Display (Default)
175+
```yaml
176+
RANK_EXPIRY:
177+
YEAR: true
178+
MONTH: true
179+
DAY: true
180+
HOUR: true
181+
MINUTES: true
182+
SECONDS: true
183+
```
184+
**Result**: `1 Year 2 Months 5 Days 3 Hours 30 Minutes 15 Seconds`
185+
186+
#### Example 2: Days and Hours Only
187+
```yaml
188+
RANK_EXPIRY:
189+
YEAR: false
190+
MONTH: false
191+
DAY: true
192+
HOUR: true
193+
MINUTES: false
194+
SECONDS: false
195+
```
196+
**For "1 year 2 months 5 days 3 hours"**
197+
**Result**: `430 Days 3 Hours` (365 + 60 + 5 = 430 days)
198+
199+
#### Example 3: Total Hours Display
200+
```yaml
201+
RANK_EXPIRY:
202+
YEAR: false
203+
MONTH: false
204+
DAY: false
205+
HOUR: true
206+
MINUTES: true
207+
SECONDS: false
208+
```
209+
**For "5 days 3 hours 30 minutes"**
210+
**Result**: `123 Hours 30 Minutes` (5×24 + 3 = 123 hours)
211+
212+
#### Example 4: Compact Display
213+
```yaml
214+
RANK_EXPIRY:
215+
YEAR: true
216+
MONTH: true
217+
DAY: true
218+
HOUR: false
219+
MINUTES: false
220+
SECONDS: false
221+
```
222+
**Result**: `1 Year 2 Months 5 Days`
223+
130224
### Color Support
131225

132226
The plugin supports both legacy color codes (`&a`, `&c`) and modern hex colors:
@@ -150,6 +244,7 @@ scoreboard:
150244
- "&eDate: &f%extraplaceholders_server_date%"
151245
- "&eRanked: &f%extraplaceholders_bolt_kit_rule_ranked%"
152246
- "&eMatch Winner: &f%extraplaceholders_bolt_match_winner%"
247+
- "&eRank Expires: &f%extraplaceholders_phoenix_expiration%"
153248
- "&8&m--------------------"
154249
```
155250

@@ -160,6 +255,7 @@ header:
160255
- "&7%extraplaceholders_server_date%"
161256
- ""
162257
- "&eStatus: %extraplaceholders_phoenix_status%"
258+
- "&eRank: &f%extraplaceholders_phoenix_expiration%"
163259
```
164260

165261
### Chat Reaction Plugin
@@ -170,6 +266,14 @@ placeholders:
170266
reaction: "This is a sumo kit!"
171267
```
172268

269+
### Rank Expiration Display
270+
```yaml
271+
# In TAB, scoreboard, or any placeholder-supported plugin
272+
player_info:
273+
- "&eYour rank expires in:"
274+
- "&f%extraplaceholders_phoenix_expiration%"
275+
```
276+
173277
## 🔧 Commands
174278

175279
| Command | Permission | Description |
@@ -180,7 +284,7 @@ placeholders:
180284

181285
**Aliases**: `/ep`
182286

183-
## 🏗️ Building from Source
287+
## 🗃️ Building from Source
184288

185289
### Prerequisites
186290
- Java Development Kit (JDK) 21+
@@ -227,4 +331,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
227331
- [RefineDevelopment](https://refinedev.xyz/) - For Bolt and Phoenix plugins
228332
- [PlaceholderAPI Team](https://github.com/PlaceholderAPI) - For the excellent placeholder system
229333
- [j4c0b3y](https://github.com/j4c0b3y) - For CommandAPI and ConfigAPI libraries
334+
230335
---

build/reports/problems/problems-report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@
650650
<script type="text/javascript">
651651
function configurationCacheProblems() { return (
652652
// begin-report-data
653-
{"diagnostics":[{"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/9.0.0/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('filteringCharset = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"ExtraPlaceholders","requestedTasks":"shadowJar","documentationLink":"https://docs.gradle.org/9.0.0/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
653+
{"diagnostics":[{"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/9.0.0/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('filteringCharset = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"ExtraPlaceholders","requestedTasks":"","documentationLink":"https://docs.gradle.org/9.0.0/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
654654
// end-report-data
655655
);}
656656
</script>

0 commit comments

Comments
 (0)