Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	pom.xml
#	src/main/java/me/ryanhamshire/GriefPrevention/Claim.java
#	src/main/java/me/ryanhamshire/GriefPrevention/DataStore.java
#	src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java
#	src/main/resources/plugin.yml
  • Loading branch information
NahuLD committed Feb 2, 2024
2 parents 22a41dd + 05e1b56 commit fa823ea
Show file tree
Hide file tree
Showing 16 changed files with 261 additions and 344 deletions.
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contributing Guidelines

Thank you for considering contributing to GriefPrevention! This document outlines the guidelines for contributing to this repository.

## Branches
- **legacy/v16** branch: This branch will only accept bugfixes for the legacy version 16 of GriefPrevention. Small features may also be considered, but it's recommended you help implement those into master.
- **master** branch: This branch follows the roadmap. Please refer to the [roadmap](https://github.com/orgs/TechFortress/projects/6) for more information. You may propose additional features, but the roadmap takes precedence. Discussion of the roadmap can be found in this [discussion thread.](https://github.com/TechFortress/GriefPrevention/discussions/2065)

## Pull Requests
<!--- Please ensure that your pull request adheres to the [pull request template](https://github.com/TechFortress/GriefPrevention/blob/master/.github/PULL_REQUEST_TEMPLATE.md).-->
- Please ensure that your pull request has a descriptive title and summary.
- Please ensure that your pull request is tested and does not break any existing functionality.

Thank you for your contribution!
45 changes: 30 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
# GriefPrevention - The self-service anti-griefing Bukkit plugin for Minecraft servers since 2011.
<p align="center">
<img alt="GriefPrevention" width=100% height=auto src="https://repository-images.githubusercontent.com/68339667/9b3f7c00-ce61-11ea-82d1-208eaa0606e8">
</p>

Stop responding to grief and prevent it instead. GriefPrevention stops grief
before it starts automatically without any effort from administrators,
and with very little (self service) effort from players.
Because GriefPrevention teaches players for you, you won't have to publish a
training manual or tutorial for players, or add explanatory signs to your world.
<h1 align="center">The self-service anti-griefing plugin for Minecraft servers since 2011</h1>

- [Download GriefPrevention.jar](https://github.com/TechFortress/GriefPrevention/releases/latest)
<p align="center">
<a href="https://github.com/TechFortress/GriefPrevention/releases/"><img alt="Downloads" src="https://img.shields.io/badge/Downloads-green" height="70px"></a>
<a href="https://docs.griefprevention.com/"><img alt="Docs" src="https://img.shields.io/badge/Docs-gray?logo=readthedocs&logoColor=white" height="70px"></a>
<a href="#support"><img alt="Get Help" src="https://img.shields.io/badge/Get%20Help-yellow?logo=amazoncloudwatch&logoColor=white" height="70px"></a>

If you need help or have questions, first check the **[Documentation](https://docs.griefprevention.com).**
</p>

Stop _responding_ to grief and prevent it instead. GriefPrevention stops grief before it starts automatically without any effort from administrators, and with very little (self service) effort from players.

- **[Documentation](https://docs.griefprevention.com)**
- [Discussion Forum](https://github.com/TechFortress/GriefPrevention/discussions)
- [Bug tracker](https://github.com/TechFortress/GriefPrevention/issues)
- [Chat](https://griefprevention.com/chat/)
- [Discord](https://r.griefprevention.com/dumcord)
- [Download older versions](https://dev.bukkit.org/projects/grief-prevention/files)

##### [Watch this video](https://www.youtube.com/watch?v=hKrA6NXn7Sc) to learn more how GriefPrevention works in-game.
[![GriefPrevention Youtube Tutorial](https://img.youtube.com/vi/hKrA6NXn7Sc/0.jpg)](https://www.youtube.com/watch?v=hKrA6NXn7Sc)

GriefPrevention is compatible with Purpur, Spigot, Paper, and any other implemention of the Bukkit API.
---

#### Supported Platforms: Spigot, Paper, Purpur, and any other server implementing the Bukkit API.
###### GriefPrevention is targeted to support the latest available version of these platforms. Older versions of GriefPrevention can be found on [BukkitDev](https://dev.bukkit.org/projects/grief-prevention/files). Note that these older versions are not supported.

---

## Support
#### [Issue Tracker](https://github.com/TechFortress/GriefPrevention/issues) - Got a problem or bug you can reliably reproduce? Report it on the issue tracker.
###### Be sure to check if your issue already exists before posting
#### [GitHub Discussions](https://github.com/TechFortress/GriefPrevention/discussions) - New ideas, feature requests, or other general discussions.
#### [IRC Chat](https://griefprevention.com/chat/) or [Discord](https://r.griefprevention.com/dumcord/)

---

## Addons
#### Addons provide additional features to GriefPrevention. Some of these addons are listed in [GitHub Discussions](https://github.com/TechFortress/GriefPrevention/discussions/categories/addons)

---

Expand Down
38 changes: 0 additions & 38 deletions chat/index.html

This file was deleted.

Binary file added gp logo 170x170.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 1 addition & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.griefprevention</groupId>
<artifactId>GriefPrevention</artifactId>
<version>16.18.4-SNAPSHOT</version>
<version>17.0.0-SNAPSHOT</version>

<name>GriefPrevention</name>
<description>The official self-service anti-griefing Bukkit plugin for Minecraft servers since 2011.</description>
Expand Down Expand Up @@ -42,10 +42,6 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>worldedit-worldguard-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<repository>
<id>essx-repo</id>
<url>https://ci.ender.zone/plugin/repository/everything/</url>
Expand Down Expand Up @@ -165,27 +161,6 @@
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- Worldguard dependency -->
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.4-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
</exclusion>
<exclusion>
<groupId>com.sk89q</groupId>
<artifactId>commandbook</artifactId>
</exclusion>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Vault dependency -->
<dependency>
<groupId>net.milkbowl.vault</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.function.BiPredicate;
import java.util.function.Supplier;
Expand All @@ -85,15 +85,15 @@ public class BlockEventHandler implements Listener
//convenience reference to singleton datastore
private final DataStore dataStore;

private final EnumSet<Material> trashBlocks;
private final Set<Material> trashBlocks;

//constructor
public BlockEventHandler(DataStore dataStore)
{
this.dataStore = dataStore;

//create the list of blocks which will not trigger a warning when they're placed outside of land claims
this.trashBlocks = EnumSet.noneOf(Material.class);
this.trashBlocks = new HashSet<>();
this.trashBlocks.add(Material.COBBLESTONE);
this.trashBlocks.add(Material.TORCH);
this.trashBlocks.add(Material.DIRT);
Expand Down Expand Up @@ -985,7 +985,7 @@ private void chorusFlower(ProjectileHitEvent event)
Block block = event.getHitBlock();

// Ensure projectile affects block.
if (block == null || block.getType() != Material.CHORUS_FLOWER)
if (block == null || (block.getType() != Material.CHORUS_FLOWER && block.getType() != Material.DECORATED_POT))
return;

Claim claim = dataStore.getClaimAt(block.getLocation(), false, null);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/ryanhamshire/GriefPrevention/Claim.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.papermc.lib.PaperLib;
import me.ryanhamshire.GriefPrevention.util.BoundingBox;
import me.ryanhamshire.GriefPrevention.events.ClaimPermissionCheckEvent;
import me.ryanhamshire.GriefPrevention.util.BoundingBox;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Location;
Expand All @@ -46,7 +47,6 @@
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -336,7 +336,7 @@ public boolean isNear(Location location, int howNear)
return supplier != null ? supplier.get() : null;
}

private static final Set<Material> PLACEABLE_FARMING_BLOCKS = EnumSet.of(
private static final Set<Material> PLACEABLE_FARMING_BLOCKS = Set.of(
Material.PUMPKIN_STEM,
Material.WHEAT,
Material.MELON_STEM,
Expand Down
Loading

0 comments on commit fa823ea

Please sign in to comment.