-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
665 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Created by https://www.gitignore.io | ||
|
||
### Intellij ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm | ||
|
||
*.iml | ||
|
||
## Directory-based project format: | ||
.idea/ | ||
# if you remove the above rule, at least ignore the following: | ||
|
||
# User-specific stuff: | ||
# .idea/workspace.xml | ||
# .idea/tasks.xml | ||
# .idea/dictionaries | ||
|
||
# Sensitive or high-churn files: | ||
# .idea/dataSources.ids | ||
# .idea/dataSources.xml | ||
# .idea/sqlDataSources.xml | ||
# .idea/dynamic.xml | ||
# .idea/uiDesigner.xml | ||
|
||
# Gradle: | ||
# .idea/gradle.xml | ||
# .idea/libraries | ||
|
||
# Mongo Explorer plugin: | ||
# .idea/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.ipr | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
|
||
|
||
### Java ### | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
|
||
### Gradle ### | ||
.gradle | ||
build/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
|
||
### Eclipse ### | ||
*.pydevproject | ||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
.jardesc | ||
|
||
# Eclipse Core | ||
.project | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
# sbteclipse plugin | ||
.target | ||
|
||
# TeXlipse plugin | ||
.texlipse | ||
|
||
|
||
### NetBeans ### | ||
nbproject/private/ | ||
nbbuild/ | ||
dist/ | ||
nbdist/ | ||
nbactions.xml | ||
nb-configuration.xml | ||
.nb-gradle/ | ||
|
||
!/.idea/inspectionProfiles/Project_Default.xml | ||
!/lib/worldedit-bukkit-7.0.0-SNAPSHOT-dist.jar | ||
!/lib/worldguard-legacy-7.0.0-SNAPSHOT-dist.jar | ||
repo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,51 @@ | ||
# Time-Expansion | ||
Time operating expansion for PlaceholderAPI | ||
|
||
# Install | ||
|
||
* Download jar file from [releases](https://github.com/MrXiaoM/Time-Expansion/releases). | ||
* Put the jar file to `/plugins/PlaceholderAPI/expansions/` | ||
* Execute command `/papi register <filename>` or `/papi reload` or restart server. | ||
|
||
# Usage | ||
|
||
``` | ||
// Arguments: <Required> [Optional] | ||
%time_<time>_<format>[_<time override>]% | ||
``` | ||
Type `{placeholder}` or `(placeholder)` if you want to use some placeholders in arguments. | ||
|
||
> I am not a native English speaker. There is maybe some typo error. | ||
## Time | ||
| value | detail | example | | ||
|----------------| --- |------------------------| | ||
| now | now time | `now` | | ||
| timestamp | timestamp (in seconds) | `1675353600` | | ||
| DateTimeFormatter|value | specific format time | yyyy-MM-dd|2023-02-03 | | ||
|
||
## Format | ||
|
||
Use `unix` for returning timestamp (in seconds). | ||
|
||
Or read the [DateTimeFormatter](http://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html) Javadoc page about possible formats. | ||
|
||
## Time Override | ||
| value | detail | example | | ||
| --- | --- | --- | | ||
| +DURATION | plus time, needed number and unit (ignore case), `d` means `day(s)`, `h` means `hour(s)`, `m` means `minute(s)`, `s` means `second(s)` | `+1d2h` | | ||
| -DURATION | minus time, needed number and unit (ignore case), `d` means `day(s)`, `h` means `hour(s)`, `m` means `minute(s)`, `s` means `second(s)` | `-1d2h` | | ||
| unit=value | set specific time | `y=2023` | | ||
|
||
Support multi overrides, connect them with `_`. | ||
|
||
### Specific Time Unit | ||
| value | detail | | ||
| --- | --- | | ||
| `y`, `year` | Year | | ||
| `M`, `month` | Month | | ||
| `d`, `day` | Day | | ||
| `h`, `hour` | Hour | | ||
| `m`, `minute` | Minute | | ||
| `s`, `second` | Second | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
group = 'top.mrxiaom' | ||
version = '1.0.0' | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url = 'https://maven.fastmirror.net/repositories/minecraft' } | ||
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi' } | ||
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots' } | ||
} | ||
|
||
dependencies { | ||
compileOnly 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT' | ||
compileOnly 'me.clip:placeholderapi:2.9.1' | ||
} | ||
|
||
def targetJavaVersion = 8 | ||
java { | ||
def javaVersion = JavaVersion.toVersion(targetJavaVersion) | ||
sourceCompatibility = javaVersion | ||
targetCompatibility = javaVersion | ||
if (JavaVersion.current() < javaVersion) { | ||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = "UTF-8" | ||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { | ||
options.release = targetJavaVersion | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.