Skip to content

Commit ad08419

Browse files
author
Benjamin
committed
VestriaDice 2.2
[+] Players now only see the rolls inside chat channels they have the corresponding permission for. [*] Minor refactoring and code work.
0 parents  commit ad08419

21 files changed

+1427
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.gradle/
2+
/.idea/
3+
/build/
4+
/libs/

LICENSE.md

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# European Union Public Licence v. 1.2
2+
EUPL © the European Union 2007, 2016
3+
4+
This European Union Public Licence (the *EUPL*) applies to the Work (as defined below) which is provided under the
5+
terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such
6+
use is covered by a right of the copyright holder of the Work).
7+
The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following
8+
notice immediately following the copyright notice for the Work:
9+
Licensed under the EUPL
10+
or has expressed by any other means his willingness to license under the EUPL.
11+
12+
## 1. Definitions
13+
In this Licence, the following terms have the following meaning:
14+
* *The Licence*:this Licence.
15+
* *The Original Work*:the work or software distributed or communicated by the Licensor under this Licence, available
16+
as Source Code and also as Executable Code as the case may be.
17+
* *Derivative Works*:the works or software that could be created by the Licensee, based upon the Original Work or
18+
modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work
19+
required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in
20+
the country mentioned in Article 15.
21+
* *The Work*:the Original Work or its Derivative Works.
22+
* *The Source Code*:the human-readable form of the Work which is the most convenient for people to study and
23+
modify.
24+
* *The Executable Code*:any code which has generally been compiled and which is meant to be interpreted by
25+
a computer as a program.
26+
* *The Licensor*:the natural or legal person that distributes or communicates the Work under the Licence.
27+
* *Contributor(s)*:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to
28+
the creation of a Derivative Work.
29+
* *The Licensee* or *You*:any natural or legal person who makes any usage of the Work under the terms of the
30+
Licence.
31+
* *Distribution* or *Communication*:any act of selling, giving, lending, renting, distributing, communicating,
32+
transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential
33+
functionalities at the disposal of any other natural or legal person.
34+
35+
## 2. Scope of the rights granted by the Licence
36+
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for
37+
the duration of copyright vested in the Original Work:
38+
* use the Work in any circumstance and for all usage,
39+
* reproduce the Work,
40+
* modify the Work, and make Derivative Works based upon the Work,
41+
* communicate to the public, including the right to make available or display the Work or copies thereof to the public
42+
and perform publicly, as the case may be, the Work,
43+
* distribute the Work or copies thereof,
44+
* lend and rent the Work or copies thereof,
45+
* sublicense rights in the Work or copies thereof.
46+
Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the
47+
applicable law permits so.
48+
In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed
49+
by law in order to make effective the licence of the economic rights here above listed.
50+
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the
51+
extent necessary to make use of the rights granted on the Work under this Licence.
52+
53+
## 3. Communication of the Source Code
54+
The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as
55+
Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with
56+
each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to
57+
the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to
58+
distribute or communicate the Work.
59+
60+
## 4. Limitations on copyright
61+
Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the
62+
exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations
63+
thereto.
64+
65+
## 5. Obligations of the Licensee
66+
The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those
67+
obligations are the following:
68+
69+
**Attribution right**: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to
70+
the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the
71+
Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work
72+
to carry prominent notices stating that the Work has been modified and the date of modification.
73+
74+
**Copyleft clause**: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this
75+
Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless
76+
the Original Work is expressly distributed only under this version of the Licence — for example by communicating
77+
*EUPL v. 1.2 only*. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the
78+
Work or Derivative Work that alter or restrict the terms of the Licence.
79+
80+
**Compatibility clause**: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both
81+
the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done
82+
under the terms of this Compatible Licence. For the sake of this clause, *Compatible Licence* refers to the licences listed
83+
in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with
84+
his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail.
85+
86+
**Provision of Source Code**: When distributing or communicating copies of the Work, the Licensee will provide
87+
a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available
88+
for as long as the Licensee continues to distribute or communicate the Work.
89+
Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names
90+
of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
91+
reproducing the content of the copyright notice.
92+
93+
## 6. Chain of Authorship
94+
The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or
95+
licensed to him/her and that he/she has the power and authority to grant the Licence.
96+
Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or
97+
licensed to him/her and that he/she has the power and authority to grant the Licence.
98+
Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions
99+
to the Work, under the terms of this Licence.
100+
101+
## 7. Disclaimer of Warranty
102+
The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work
103+
and may therefore contain defects or *bugs* inherent to this type of development.
104+
For the above reason, the Work is provided under the Licence on an *as is* basis and without warranties of any kind
105+
concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or
106+
errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this
107+
Licence.
108+
This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work.
109+
110+
## 8. Disclaimer of Liability
111+
Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be
112+
liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the
113+
Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss
114+
of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However,
115+
the Licensor will be liable under statutory product liability laws as far such laws apply to the Work.
116+
117+
## 9. Additional agreements
118+
While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services
119+
consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole
120+
responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify,
121+
defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by
122+
the fact You have accepted any warranty or additional liability.
123+
124+
## 10. Acceptance of the Licence
125+
The provisions of this Licence can be accepted by clicking on an icon *I agree* placed under the bottom of a window
126+
displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of
127+
applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms
128+
and conditions.
129+
Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You
130+
by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution
131+
or Communication by You of the Work or copies thereof.
132+
133+
## 11. Information to the public
134+
In case of any Distribution or Communication of the Work by means of electronic communication by You (for example,
135+
by offering to download the Work from a remote location) the distribution channel or media (for example, a website)
136+
must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence
137+
and the way it may be accessible, concluded, stored and reproduced by the Licensee.
138+
139+
## 12. Termination of the Licence
140+
The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms
141+
of the Licence.
142+
Such a termination will not terminate the licences of any person who has received the Work from the Licensee under
143+
the Licence, provided such persons remain in full compliance with the Licence.
144+
145+
## 13. Miscellaneous
146+
Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the
147+
Work.
148+
If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or
149+
enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid
150+
and enforceable.
151+
The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of
152+
the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence.
153+
New versions of the Licence will be published with a unique version number.
154+
All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take
155+
advantage of the linguistic version of their choice.
156+
157+
## 14. Jurisdiction
158+
Without prejudice to specific agreement between parties,
159+
* any litigation resulting from the interpretation of this License, arising between the European Union institutions,
160+
bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice
161+
of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union,
162+
* any litigation arising between other parties and resulting from the interpretation of this License, will be subject to
163+
the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business.
164+
165+
## 15. Applicable Law
166+
Without prejudice to specific agreement between parties,
167+
* this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat,
168+
resides or has his registered office,
169+
* this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside
170+
a European Union Member State.
171+
172+
## Appendix
173+
174+
*Compatible Licences* according to Article 5 EUPL are:
175+
* GNU General Public License (GPL) v. 2, v. 3
176+
* GNU Affero General Public License (AGPL) v. 3
177+
* Open Software License (OSL) v. 2.1, v. 3.0
178+
* Eclipse Public License (EPL) v. 1.0
179+
* CeCILL v. 2.0, v. 2.1
180+
* Mozilla Public Licence (MPL) v. 2
181+
* GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
182+
* Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software
183+
* European Union Public Licence (EUPL) v. 1.1, v. 1.2
184+
* Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+).
185+
The European Commission may update this Appendix to later versions of the above licences without producing
186+
a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the
187+
covered Source Code from exclusive appropriation.
188+
All other changes or additions to this Appendix require the production of a new EUPL version.

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# VestriaDice
2+
3+
![License: EUPL v1.2](https://img.shields.io/github/license/Loapu/VestriaDice?style=flat-square) ![Latest Release](https://img.shields.io/github/v/release/Loapu/VestriaDice?style=flat-square)
4+
5+
## About
6+
7+
A small Pen-and-Paper-like dice rolling plugin for Minecraft.
8+
9+
## Dependencies
10+
- [Paper](https://papermc.io/downloads#Paper-1.17) (or any of its forks) for Minecraft 1.17 or newer
11+
- [CommandAPI](https://commandapi.jorel.dev/) version [6.3.0](https://github.com/JorelAli/CommandAPI/releases/tag/6.3.0) or newer
12+
13+
## Installation
14+
15+
Download the required release from the [Release-Section](https://github.com/Loapu/VestriaDice/releases) and drop it into your plugins folder. Then restart the server.
16+
17+
| :warning: | Reloading the server or the plugin itself will NOT work. |
18+
| ----------|:---------------------------------------------------------|
19+
20+
## Usage
21+
22+
```
23+
/vdice help
24+
```
25+
26+
## Documentation
27+
28+
For a full set of features, commands, permissions, etc. please visit the [wiki](https://github.com/Loapu/VestriaDice/wiki).
29+
30+
## Contributing
31+
32+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
33+
Please follow these steps to set up your development environment:
34+
1. Clone this repository to a folder of your liking.
35+
2. Create a `libs` folder inside the cloned project root.
36+
3. Download version 3.0.4 of [VentureChat](https://www.spigotmc.org/resources/venturechat.771/download?version=413013) and put the corresponding jar inside the newly created `libs` folder.
37+
4. Now the project *should* be ready for development. If you find anything that's missing, just open an issue, and I will look into it.
38+
39+
## License
40+
41+
[EUPL v1.2](https://eupl.eu/1.2/en/)
42+
43+
## Credits
44+
45+
This plugin makes use of the following external libraries:
46+
- [CommandAPI](https://github.com/JorelAli/CommandAPI) by [JorelAli](https://github.com/JorelAli) licensed under the [MIT License](https://opensource.org/licenses/MIT)
47+
- [adventure-text-minimessage](https://github.com/KyoriPowered/adventure-text-minimessage) by [Kyori](https://github.com/KyoriPowered) licensed under the [MIT License](https://opensource.org/licenses/MIT)
48+
49+
This plugin also shades the following external libraries inside its own code:
50+
- [adventure-text-minimessage](https://github.com/KyoriPowered/adventure-text-minimessage) by [Kyori](https://github.com/KyoriPowered) licensed under the [MIT License](https://opensource.org/licenses/MIT)

build.gradle.kts

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import org.apache.tools.ant.filters.ReplaceTokens
2+
3+
plugins {
4+
`java-library`
5+
idea
6+
id("com.github.johnrengelman.shadow") version "7.0.0"
7+
}
8+
group = project.property("pluginGroup") as String
9+
version = project.property("pluginVersion") as String
10+
repositories {
11+
mavenCentral()
12+
maven(uri("https://papermc.io/repo/repository/maven-public/"))
13+
maven(uri("https://jitpack.io"))
14+
maven(uri("https://raw.githubusercontent.com/JorelAli/CommandAPI/mvn-repo/"))
15+
maven(uri("https://repo.codemc.org/repository/maven-public/"))
16+
maven(uri("https://oss.sonatype.org/content/repositories/snapshots/"))
17+
flatDir {
18+
dirs("libs")
19+
}
20+
}
21+
dependencies {
22+
implementation("io.papermc.paper:paper-api:" + project.property("versionPaper") as String)
23+
implementation("dev.jorel.CommandAPI:commandapi-core:" + project.property("versionCommandApi") as String)
24+
implementation("dev.jorel.CommandAPI:commandapi-annotations:" + project.property("versionCommandApi") as String)
25+
implementation("org.jetbrains:annotations:19.0.0")
26+
annotationProcessor("dev.jorel.CommandAPI:commandapi-annotations:" + project.property("versionCommandApi") as String)
27+
implementation("net.kyori:adventure-text-minimessage:" + project.property("versionMiniMessage") as String)
28+
implementation(name, "VentureChat-3.0.4")
29+
}
30+
sourceSets {
31+
main {
32+
java.srcDirs("src/main/java")
33+
resources.srcDirs("src/main/resources")
34+
}
35+
}
36+
tasks {
37+
register("bumpBuild") {
38+
doLast {
39+
val pluginBuildNumber = project.property("pluginBuildNumber") as String
40+
val build = Integer.parseInt(pluginBuildNumber) + 1
41+
val token = "pluginBuildNumber=$pluginBuildNumber"
42+
val value = "pluginBuildNumber=$build"
43+
ant.withGroovyBuilder {
44+
"replace"("file" to "gradle.properties", "token" to token, "value" to value)
45+
}
46+
}
47+
}
48+
compileJava {
49+
options.encoding = project.property("projectEncoding") as String
50+
options.release.set(Integer.parseInt(project.property("versionJava") as String))
51+
}
52+
shadowJar {
53+
dependencies {
54+
include(dependency("net.kyori:adventure-text-minimessage:" + project.property("versionMiniMessage") as String))
55+
}
56+
archiveBaseName.set(project.property("pluginName") as String)
57+
if (project.property("pluginVersion").toString().contains('-'))
58+
{
59+
archiveVersion.set("${project.version}+B" + project.property("pluginBuildNumber") as String)
60+
}
61+
archiveClassifier.set("")
62+
}
63+
processResources {
64+
outputs.upToDateWhen { false }
65+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
66+
val tokens = mapOf(
67+
"group" to project.property("pluginGroup") as String,
68+
"name" to project.property("pluginName") as String,
69+
"prefix" to project.property("pluginPrefix") as String,
70+
"ver" to project.property("pluginVersion") as String,
71+
"apiVer" to project.property("pluginApiVersion") as String,
72+
"author" to project.property("pluginAuthor") as String,
73+
"description" to project.property("pluginDescription") as String,
74+
"homepage" to project.property("pluginHomepage") as String
75+
)
76+
inputs.properties(tokens)
77+
from(sourceSets.main.get().resources.srcDirs) {
78+
filter<ReplaceTokens>("tokens" to tokens)
79+
}
80+
}
81+
}

0 commit comments

Comments
 (0)