-
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
0 parents
commit 1cbce9f
Showing
13 changed files
with
1,025 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,130 @@ | ||
# Created by the zLib plugin bootstrap generator | ||
# Inspired by https://www.gitignore.io/api/java,maven,intellij,eclipse,netbeans | ||
|
||
|
||
### Maven ### | ||
|
||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
|
||
|
||
### Intellij ### | ||
|
||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
## Folder-based project format | ||
.idea/ | ||
|
||
## File-based project format | ||
*.iws | ||
*.iml | ||
|
||
## 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 | ||
fabric.properties | ||
|
||
### Intellij Patch ### | ||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 | ||
|
||
# *.iml | ||
# modules.xml | ||
|
||
|
||
### Eclipse ### | ||
|
||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
.recommenders | ||
|
||
# Eclipse Core | ||
.project | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# PyDev specific (Python IDE for Eclipse) | ||
*.pydevproject | ||
|
||
# CDT-specific (C/C++ Development Tooling) | ||
.cproject | ||
|
||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# Java annotation processor (APT) | ||
.factorypath | ||
|
||
# PDT-specific (PHP Development Tools) | ||
.buildpath | ||
|
||
# sbteclipse plugin | ||
.target | ||
|
||
# Tern plugin | ||
.tern-project | ||
|
||
# TeXlipse plugin | ||
.texlipse | ||
|
||
# STS (Spring Tool Suite) | ||
.springBeans | ||
|
||
# Code Recommenders | ||
.recommenders/ | ||
|
||
|
||
### NetBeans ### | ||
nbproject/private/ | ||
build/ | ||
nbbuild/ | ||
dist/ | ||
nbdist/ | ||
nbactions.xml | ||
.nb-gradle/ | ||
|
||
|
||
### 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* |
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,74 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>fr.zcraft.VoteBan</groupId> | ||
<artifactId>VoteBanRevamped</artifactId> | ||
<version>1.0</version> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>1.7</maven.compiler.source> | ||
<maven.compiler.target>1.7</maven.compiler.target> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>2.3</version> | ||
<configuration> | ||
<minimizeJar>true</minimizeJar> | ||
<artifactSet> | ||
<includes> | ||
<include>fr.zcraft:zlib</include> | ||
</includes> | ||
</artifactSet> | ||
<relocations> | ||
<relocation> | ||
<pattern>fr.zcraft.zlib</pattern> | ||
<shadedPattern>fr.zcraft.VoteBan.zlib</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<repositories> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url> | ||
</repository> | ||
<repository> | ||
<id>zDevelopers</id> | ||
<url>http://maven.carrade.eu/artifactory/snapshots</url> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>bukkit</artifactId> | ||
<version>1.9-R0.1-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>fr.zcraft</groupId> | ||
<artifactId>zlib</artifactId> | ||
<version>0.99-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
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,32 @@ | ||
package fr.zcraft.VoteBan; | ||
|
||
import fr.zcraft.zlib.components.configuration.Configuration; | ||
import fr.zcraft.zlib.components.configuration.ConfigurationItem; | ||
import fr.zcraft.zlib.components.configuration.ConfigurationList; | ||
import fr.zcraft.zlib.components.configuration.ConfigurationSection; | ||
|
||
import java.util.Locale; | ||
|
||
import static fr.zcraft.zlib.components.configuration.ConfigurationItem.item; | ||
import static fr.zcraft.zlib.components.configuration.ConfigurationItem.list; | ||
import static fr.zcraft.zlib.components.configuration.ConfigurationItem.section; | ||
|
||
|
||
/** | ||
* Configuration. | ||
*/ | ||
public class Config extends Configuration | ||
{ | ||
static public final ConfigurationItem<Locale> LOCALE = item("locale", Locale.class); | ||
|
||
static public final VotesSection VOTES = section("votes", VotesSection.class); | ||
static public class VotesSection extends ConfigurationSection | ||
{ | ||
public final ConfigurationItem<Integer> DELAY = item("delay", 40); | ||
public final ConfigurationItem<Integer> COOLDOWN = item("cooldown", 120); | ||
public final ConfigurationItem<Integer> MINIMAL_VOTES = item("minimal_votes", 3); | ||
public final ConfigurationItem<Integer> POSITIVE_PERCENTAGE_REQUIRED = item("positive_percentage_required", 50); | ||
} | ||
|
||
static public final ConfigurationList<String> BAN_COMMANDS = list("ban_commands", String.class); | ||
} |
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,60 @@ | ||
/* | ||
* Copyright or © or Copr. AmauryCarrade (2015) | ||
* | ||
* http://amaury.carrade.eu | ||
* | ||
* This software is governed by the CeCILL-B license under French law and | ||
* abiding by the rules of distribution of free software. You can use, | ||
* modify and/ or redistribute the software under the terms of the CeCILL-B | ||
* license as circulated by CEA, CNRS and INRIA at the following URL | ||
* "http://www.cecill.info". | ||
* | ||
* As a counterpart to the access to the source code and rights to copy, | ||
* modify and redistribute granted by the license, users are provided only | ||
* with a limited warranty and the software's author, the holder of the | ||
* economic rights, and the successive licensors have only limited | ||
* liability. | ||
* | ||
* In this respect, the user's attention is drawn to the risks associated | ||
* with loading, using, modifying and/or developing or reproducing the | ||
* software by the user in light of its specific status of free software, | ||
* that may mean that it is complicated to manipulate, and that also | ||
* therefore means that it is reserved for developers and experienced | ||
* professionals having in-depth computer knowledge. Users are therefore | ||
* encouraged to load and test the software's suitability as regards their | ||
* requirements in conditions enabling the security of their systems and/or | ||
* data to be ensured and, more generally, to use and operate it in the | ||
* same conditions as regards security. | ||
* | ||
* The fact that you are presently reading this means that you have had | ||
* knowledge of the CeCILL-B license and that you accept its terms. | ||
*/ | ||
package fr.zcraft.VoteBan; | ||
|
||
import org.bukkit.permissions.Permissible; | ||
|
||
|
||
public enum Permissions | ||
{ | ||
START_VOTE("voteban.start"), | ||
VOTE("voteban.vote"), | ||
EXEMPTED("voteban.exempt"); | ||
|
||
|
||
private String permission; | ||
|
||
Permissions(String permission) | ||
{ | ||
this.permission = permission; | ||
} | ||
|
||
public String getPermission() | ||
{ | ||
return permission; | ||
} | ||
|
||
public boolean grantedTo(Permissible permissible) | ||
{ | ||
return permissible.hasPermission(permission); | ||
} | ||
} |
Oops, something went wrong.