4 Commits

Author SHA1 Message Date
Ardakaz
8e28ba0b87 Cleaning up 2026-05-19 15:49:03 +03:00
f59c484d6b Upload files to "src/net/ardakaz/griefalert"
added copper block waxing and unwaxing and dusting off logic, (might need a little extra rework because changing its state is considered "replacing" which sorta breaks the logic)

added log stripping detection (same issue as copper blocks)
2026-04-30 09:03:51 +00:00
c3c2113619 Doing some cleaning 2025-11-06 17:37:52 +02:00
da586e55fd Update README.md 2025-08-25 18:54:07 +00:00
4 changed files with 886 additions and 769 deletions

View File

@@ -1,3 +1,34 @@
# GriefAlert
A simple grief alert plugin using CoreProtect API.
GriefAlert a simple plugin that alerts the staff when someone is griefing on the server.
**CoreProtect is required for this plugin to work.** DiscordSRV is recommended.
## Features
* Alerts the staff when players break blocks, steal items or kill mobs in other players' builds.
* Alerts go to the chat of ingame staff and optionally Discord.
* Players and coordinates can be excluded from alerts.
## Permissions
* `griefalert.notify` - Gives an ability to view alerts in the chat.
* `griefalert.exclude` - Completely excludes a player from triggering alerts.
* `griefalert.exclude.<player>` - Excludes a player from triggering alerts when touching the specified player's stuff.
* `griefalert.staff` - Ability to use staff commands.
## Commands
* `/griefalert ignore [world] <x> <y> <z>` - Ignores a location from alerts.
* `/griefalert unignore [world] <x> <y> <z>`
* `/griefalert check [world] <x> <y> <z>` - Tells if a location is ignored.
## Discord support
If you have DiscordSRV installed, you can add this to it's alerts.yml:
```yaml
- Trigger: net.ardakaz.griefalert.GriefAlertEvent
Channel: grief-alerts
Content: "${getAlert()}"
```
You'll also have to specify the grief-alerts channel in config.yml.

View File

@@ -1,6 +1,6 @@
name: GriefAlert
main: net.ardakaz.griefalert.GriefAlert
version: 0.5
version: 0.6
api-version: 1.21
depends: [CoreProtect]
softdepend: [DiscordSRV]

File diff suppressed because it is too large Load Diff

View File

@@ -1,29 +1,28 @@
// "API" for other plugins
package net.ardakaz.griefalert;
import org.bukkit.Bukkit;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class GriefAlertEvent extends Event {
private static final HandlerList HANDLERS = new HandlerList();
private String alert = "";
public GriefAlertEvent(String alert) {
this.alert = alert;
}
public static HandlerList getHandlerList() {
return HANDLERS;
}
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
public String getAlert() {
return this.alert;
}
// "API" for other plugins
package net.ardakaz.griefalert;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class GriefAlertEvent extends Event {
private static final HandlerList HANDLERS = new HandlerList();
private String alert = "";
public GriefAlertEvent(String alert) {
this.alert = alert;
}
public static HandlerList getHandlerList() {
return HANDLERS;
}
@Override
public HandlerList getHandlers() {
return HANDLERS;
}
public String getAlert() {
return this.alert;
}
}