Skip to content

Commit

Permalink
Added Important Information to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Shweit committed Sep 3, 2024
1 parent dd08795 commit 1d6a099
Show file tree
Hide file tree
Showing 8 changed files with 379 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: Shweit
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: shweit
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: shweit
custom: https://www.paypal.com/donate/?hosted_button_id=TBG3UZALFT2T6
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: Bug
assignees: Shweit

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Minecraft Version:** [e.g. 1.21.1]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request]"
labels: Feature Request
assignees: Shweit

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
76 changes: 76 additions & 0 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Runtime Test

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- name: Maven Build
run: mvn clean package

- name: Upload the artifact
uses: actions/upload-artifact@v3
with:
name: artifact-${{ github.event.number }}
path: 'target/Poll*.jar'

runtime-test:
name: Plugin Runtime Test
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- mcVersion: '1.9.4'
javaVersion: '9'
- mcVersion: '1.10.2'
javaVersion: '10'
- mcVersion: '1.11.2'
javaVersion: '11'
- mcVersion: '1.12.2'
javaVersion: '12'
- mcVersion: '1.13.2'
javaVersion: '13'
- mcVersion: '1.14.4'
javaVersion: '14'
- mcVersion: '1.15.2'
javaVersion: '15'
- mcVersion: '1.16.5'
javaVersion: '16'
- mcVersion: '1.17.1'
javaVersion: '17'
- mcVersion: '1.18.2'
javaVersion: '18'
- mcVersion: '1.19.4'
javaVersion: '19'
- mcVersion: '1.20.1'
javaVersion: '20'
- mcVersion: '1.20.6'
javaVersion: '20'
- mcVersion: '1.21'
javaVersion: '21'

steps:
- uses: FN-FAL113/[email protected]
with:
server-version: ${{ matrix.mcVersion }}
java-version: ${{ matrix.javaVersion }}
artifact-name: artifact-${{ github.event.number }}
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing
> You can add yourself to the contributors in `src/main/resources/plugin.yml` when you make your first contribution.
If you contribute to this project, you agree to abide by the [code of conduct](CODE_OF_CONDUCT.md). Please read the guidelines below before contributing.
## Best Practice
1. **Fork the Repository:** Fork the repository to your GitHub account.
2. **Create a New Branch:** Create a new branch for your feature or bug fix.
```bash
git checkout -b feature/my-feature
```
3. **Write Clean Code:** Ensure your code follows the project's coding standards and conventions.
4. **Write Tests:** Write tests for your code. We use JUnit for unit testing, and the plugin can be tested against a real Minecraft server.
5. **Commit Changes:** Commit your changes and write meaningful commit messages.
```bash
git commit -m "Add feature: My new feature"
```
6. **Push Changes:** Push your changes to your forked repository.
```bash
git push origin feature/my-feature
```
7. **Create a Pull Request:** Create a pull request from your branch to the main repository. Describe the changes you have made and why they are beneficial.

## Best Practices
- **Code Style:** Follow the project's code style and conventions.
- **Testing:** Write tests for your code to ensure it works as expected.
- **Documentation:** Document your code and any changes you make.

## License
This project is licensed under the MIT License - see the [LICENSE](https://opensource.org/license/mit) file for details.

## Contact
If you have any questions or suggestions, feel free to contact me at [[email protected]](mailto:[email protected])
21 changes: 21 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Dennis van den Brock

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Poll Plugin
<img src="https://img.shields.io/github/actions/workflow/status/Shweit/Poll/runtime.yml" /> <img src="https://img.shields.io/github/v/release/Poll/MinecraftServerAPI" /> <img src="https://img.shields.io/github/license/Shweit/Poll" />

## Overview
The Poll Plugin is a versatile and easy-to-use tool for Minecraft servers, allowing administrators to create and manage polls directly in-game. With this plugin, server owners can engage their players by gathering feedback, making decisions, and encouraging participation in server activities.

## Features
- **Create Polls:** Users with the appropriate permissions can create polls with custom questions and options.
- **Vote:** Players can vote on polls using the in-game chat or GUI interface.
- **Poll Management:** Polls can be easily managed and viewed, with options for pagination and filtering of open polls.
- **Detailed Poll View:** Players can view detailed information about each poll, including the number of votes for each option and their own selected answers.
- **Real-time Updates**: Poll results are updated in real-time, allowing players to see the outcome as votes are cast.

## Commands
`/createpoll "<question>" "<anwser1>" "<answer2> ... [--multi]"`
- **Description:** Creates a new poll with the specified question and answers. The --multi flag allows multiple answers to be selected.
- **Permission:** poll.create
- **Example:** `/createpoll "What is your favorite color?" "Red" "Blue" "Green"`

`/polls [page]`
- **Description:** Opens the polls GUI, showing a list of all active polls. Use the optional page argument to navigate through multiple pages of polls.
- **Permission:** poll.view
- **Example:** `/polls 2`

`/vote <poll_id> <answer>`
- **Description:** Votes for the specified answer in the given poll.
- **Permission:** poll.vote
- **Example:** `/vote 1 "Red"`

## Installation
### Prerequisites
- **Java:** JDK 20 or higher is required to build and run the project.
- **Maven:** Make sure Maven is installed on your system.
You can download it [here](https://maven.apache.org/download.cgi).

### Cloning the Repository
1. Clone the repository to your local machine.
```shell
git clone [email protected]:Shweit/Poll.git
cd POll
```
### Building the Project
2. Build the project using Maven.
```shell
mvn clean install
```
### Setting up the Minecraft Server
3. Copy the generated JAR file to the `plugins` directory of your Minecraft server.
```shell
cp target/Poll-*.jar /path/to/your/minecraft/server/plugins
```
4. Start or restart your Minecraft server.
```shell
java -Xmx1024M -Xms1024M -jar paper-1.21.jar nogui
```
5. Once the server is running, the plugin will be loaded automatically. You can verify it by running:
```shell
/plugins
```

## Contributing
Contributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) to get started.

0 comments on commit 1d6a099

Please sign in to comment.