UTD
This commit is contained in:
40
.classpath
Normal file
40
.classpath
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
||||||
23
.project
Normal file
23
.project
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Regions</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
6
.settings/org.eclipse.core.resources.prefs
Normal file
6
.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
|
encoding//src/test/resources=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
||||||
8
.settings/org.eclipse.jdt.core.prefs
Normal file
8
.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=11
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=11
|
||||||
4
.settings/org.eclipse.m2e.core.prefs
Normal file
4
.settings/org.eclipse.m2e.core.prefs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
104
README.md
Normal file
104
README.md
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# 🗺️ Regions – Lightweight Region Library for Bukkit
|
||||||
|
|
||||||
|
**Regions** is a lightweight and simple **Java library** for Bukkit/Spigot plugins. It helps you define 3D rectangular regions and automatically detects when players **enter or leave** them.
|
||||||
|
|
||||||
|
Use it as a dependency in your own plugins to easily add region logic.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
- ✅ Define rectangular cuboid regions with two `Location`s
|
||||||
|
- 🚶 Detect when a player **enters** or **exits** a region
|
||||||
|
- 🧰 Easy API to add, remove, and query regions
|
||||||
|
- 🔄 Registerable event listeners
|
||||||
|
- 🧩 Built for plugin developers – plug and play
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 Getting Started
|
||||||
|
|
||||||
|
### 1. Create a Region
|
||||||
|
|
||||||
|
First, create two `Location` points and then create a region between them:
|
||||||
|
|
||||||
|
```java
|
||||||
|
Location loc1 = new Location(Bukkit.getWorld("<World Name>"), x1, y1, z1);
|
||||||
|
Location loc2 = new Location(Bukkit.getWorld("<World Name>"), x2, y2, z2);
|
||||||
|
|
||||||
|
RegionData region = new RegionData("<Region Name>", loc1, loc2);
|
||||||
|
Regions.addRegion(region);
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Register the Event Listener
|
||||||
|
|
||||||
|
Call this once (e.g. in your plugin's `onEnable`) to enable automatic region tracking:
|
||||||
|
|
||||||
|
```java
|
||||||
|
public void onEnable() {
|
||||||
|
Regions.registerListener(this); // 'this' is your plugin instance
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📡 Region Events
|
||||||
|
|
||||||
|
These are custom events that you can listen for:
|
||||||
|
|
||||||
|
```java
|
||||||
|
@EventHandler
|
||||||
|
public void onRegionEnter(PlayerEnterRegionEvent event) {
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
RegionData region = event.getRegion();
|
||||||
|
player.sendMessage("Entered region: " + region.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onRegionExit(PlayerExitRegionEvent event) {
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
RegionData region = event.getRegion();
|
||||||
|
player.sendMessage("Left region: " + region.getName());
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧪 API Reference
|
||||||
|
|
||||||
|
```java
|
||||||
|
Regions.addRegion(RegionData region); // Add a region
|
||||||
|
Regions.deleteRegion(RegionData region); // Remove a region
|
||||||
|
|
||||||
|
Regions.getRegions(); // Get all regions
|
||||||
|
Regions.getRegionsByName("Spawn"); // Get regions by name
|
||||||
|
|
||||||
|
Regions.getRegionInLocation(Location loc); // First region that contains loc
|
||||||
|
Regions.getRegionsInLocation(Location loc); // All regions that contain loc
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📦 Integration in Your Plugin
|
||||||
|
|
||||||
|
Simply include the compiled `Regions-1.0.jar` as a library in your plugin project. Then:
|
||||||
|
|
||||||
|
1. Register the movement listener:
|
||||||
|
```java
|
||||||
|
Regions.registerListener(this);
|
||||||
|
```
|
||||||
|
2. Add or query regions as needed.
|
||||||
|
3. Listen for `PlayerEnterRegionEvent` and `PlayerExitRegionEvent`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧑💻 Author
|
||||||
|
|
||||||
|
Created by **Jernej T.**
|
||||||
|
Pull requests and contributions are welcome!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
MIT – do whatever you want, just give credit.
|
||||||
64
pom.xml
Normal file
64
pom.xml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>si.jernejtdo</groupId>
|
||||||
|
<artifactId>Regions</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<name>Regions</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>3.2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>spigot-repo</id>
|
||||||
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.spigotmc</groupId>
|
||||||
|
<artifactId>spigot-api</artifactId>
|
||||||
|
<version>1.21.5-R0.1-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
51
src/main/java/si/jernejtdo/regions/RegionData.java
Normal file
51
src/main/java/si/jernejtdo/regions/RegionData.java
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
package si.jernejtdo.regions;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
public class RegionData {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private Location location_0;
|
||||||
|
private Location location_1;
|
||||||
|
|
||||||
|
public RegionData(String regionName, Location location_0, Location location_1) {
|
||||||
|
this.name = regionName;
|
||||||
|
sortLocations(location_0, location_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sortLocations(Location loc1, Location loc2) {
|
||||||
|
location_0 = new Location(loc1.getWorld(), Math.min(loc1.getX(), loc2.getX()), Math.min(loc1.getY(), loc2.getY()), Math.min(loc1.getZ(), loc2.getZ()));
|
||||||
|
location_1 = new Location(loc1.getWorld(), Math.max(loc1.getX(), loc2.getX()), Math.max(loc1.getY(), loc2.getY()), Math.max(loc1.getZ(), loc2.getZ()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location getLocation_0() {
|
||||||
|
return location_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation_0(Location location_0) {
|
||||||
|
sortLocations(location_0, location_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location getLocation_1() {
|
||||||
|
return location_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation_1(Location location_1) {
|
||||||
|
sortLocations(location_0, location_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInRegion(Location location) {
|
||||||
|
boolean isInX = location.getX() >= location_0.getX() && location.getX() <= location_1.getX();
|
||||||
|
boolean isInY = location.getY() >= location_0.getY() && location.getY() <= location_1.getY();
|
||||||
|
boolean isInZ = location.getZ() >= location_0.getZ() && location.getZ() <= location_1.getZ();
|
||||||
|
return isInX && isInY && isInZ;
|
||||||
|
}
|
||||||
|
}
|
||||||
60
src/main/java/si/jernejtdo/regions/Regions.java
Normal file
60
src/main/java/si/jernejtdo/regions/Regions.java
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
package si.jernejtdo.regions;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import si.jernejtdo.regions.bukkitevents.BukkitPlayerMoveEvent;
|
||||||
|
|
||||||
|
public class Regions {
|
||||||
|
|
||||||
|
public static void registerListener(Plugin plugin) {
|
||||||
|
Bukkit.getPluginManager().registerEvents(new BukkitPlayerMoveEvent(), plugin);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<RegionData> regionsList = new ArrayList<>();
|
||||||
|
|
||||||
|
public static void addRegion(RegionData region) {
|
||||||
|
regionsList.add(region);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void deleteRegion(RegionData region) {
|
||||||
|
regionsList.remove(region);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<RegionData> getRegionsByName(String name) {
|
||||||
|
List<RegionData> reg = new ArrayList<>();
|
||||||
|
for(RegionData region : regionsList) {
|
||||||
|
if(region.getName().equals(name)) {
|
||||||
|
reg.add(region);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return reg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<RegionData> getRegions() {
|
||||||
|
return regionsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<RegionData> getRegionsInLocation(Location loc) {
|
||||||
|
List<RegionData> reg = new ArrayList<>();
|
||||||
|
for(RegionData region : regionsList) {
|
||||||
|
if(region.isInRegion(loc)) {
|
||||||
|
reg.add(region);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return reg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RegionData getRegionInLocation(Location loc) {
|
||||||
|
for(RegionData region : regionsList) {
|
||||||
|
if(region.isInRegion(loc)) {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package si.jernejtdo.regions.bukkitevents;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
|
|
||||||
|
import si.jernejtdo.regions.RegionData;
|
||||||
|
import si.jernejtdo.regions.Regions;
|
||||||
|
import si.jernejtdo.regions.event.PlayerEnterRegionEvent;
|
||||||
|
import si.jernejtdo.regions.event.PlayerExitRegionEvent;
|
||||||
|
|
||||||
|
public class BukkitPlayerMoveEvent implements Listener {
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void move(PlayerMoveEvent event) {
|
||||||
|
if(event.getFrom().getBlockX() != event.getTo().getBlockX()
|
||||||
|
|| event.getFrom().getBlockY() != event.getTo().getBlockY()
|
||||||
|
|| event.getFrom().getBlockZ() != event.getTo().getBlockZ()) {
|
||||||
|
|
||||||
|
RegionData to = Regions.getRegionInLocation(event.getTo());
|
||||||
|
RegionData from = Regions.getRegionInLocation(event.getFrom());
|
||||||
|
|
||||||
|
if(to != null) {
|
||||||
|
if(from != null) {
|
||||||
|
if(to != from) {
|
||||||
|
PlayerEnterRegionEvent enterEvent = new PlayerEnterRegionEvent(event.getPlayer(), from, to, event.isCancelled());
|
||||||
|
Bukkit.getPluginManager().callEvent(enterEvent);
|
||||||
|
PlayerExitRegionEvent exitEvent = new PlayerExitRegionEvent(event.getPlayer(), from, to, enterEvent.isCanceled());
|
||||||
|
Bukkit.getPluginManager().callEvent(exitEvent);
|
||||||
|
event.setCancelled(exitEvent.isCanceled());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PlayerEnterRegionEvent enterEvent = new PlayerEnterRegionEvent(event.getPlayer(), from, to, event.isCancelled());
|
||||||
|
Bukkit.getPluginManager().callEvent(enterEvent);
|
||||||
|
event.setCancelled(enterEvent.isCanceled());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(from != null) {
|
||||||
|
PlayerExitRegionEvent exitEvent = new PlayerExitRegionEvent(event.getPlayer(), from, to, event.isCancelled());
|
||||||
|
Bukkit.getPluginManager().callEvent(exitEvent);
|
||||||
|
event.setCancelled(exitEvent.isCanceled());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package si.jernejtdo.regions.event;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
import si.jernejtdo.regions.RegionData;
|
||||||
|
|
||||||
|
public class PlayerEnterRegionEvent extends Event {
|
||||||
|
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
private RegionData from;
|
||||||
|
private RegionData to;
|
||||||
|
private Player player;
|
||||||
|
private boolean isCanceled;
|
||||||
|
|
||||||
|
public PlayerEnterRegionEvent(Player player, RegionData from, RegionData to, boolean isCanceled) {
|
||||||
|
this.from = from;
|
||||||
|
this.to = to;
|
||||||
|
this.player = player;
|
||||||
|
this.isCanceled = isCanceled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RegionData getFrom() {
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RegionData getTo() {
|
||||||
|
return to;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Player getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCanceled() {
|
||||||
|
return isCanceled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanceled(boolean isCanceled) {
|
||||||
|
this.isCanceled = isCanceled;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package si.jernejtdo.regions.event;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
import si.jernejtdo.regions.RegionData;
|
||||||
|
|
||||||
|
public class PlayerExitRegionEvent extends Event {
|
||||||
|
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
private RegionData from;
|
||||||
|
private RegionData to;
|
||||||
|
private Player player;
|
||||||
|
private boolean isCanceled;
|
||||||
|
|
||||||
|
public PlayerExitRegionEvent(Player player, RegionData from, RegionData to, boolean isCanceled) {
|
||||||
|
this.from = from;
|
||||||
|
this.to = to;
|
||||||
|
this.player = player;
|
||||||
|
this.isCanceled = isCanceled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RegionData getFrom() {
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RegionData getTo() {
|
||||||
|
return to;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Player getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCanceled() {
|
||||||
|
return isCanceled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanceled(boolean isCanceled) {
|
||||||
|
this.isCanceled = isCanceled;
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
target/Regions-1.0.jar
Normal file
BIN
target/Regions-1.0.jar
Normal file
Binary file not shown.
4
target/classes/META-INF/MANIFEST.MF
Normal file
4
target/classes/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Build-Jdk-Spec: 23
|
||||||
|
Created-By: Maven Integration for Eclipse
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#Generated by Maven Integration for Eclipse
|
||||||
|
#Sat Jul 12 16:40:40 CEST 2025
|
||||||
|
artifactId=Regions
|
||||||
|
groupId=si.jernejtdo
|
||||||
|
m2e.projectLocation=D\:\\Codespace\\JernejTDO\\Regions
|
||||||
|
m2e.projectName=Regions
|
||||||
|
version=1.0
|
||||||
64
target/classes/META-INF/maven/si.jernejtdo/Regions/pom.xml
Normal file
64
target/classes/META-INF/maven/si.jernejtdo/Regions/pom.xml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>si.jernejtdo</groupId>
|
||||||
|
<artifactId>Regions</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<name>Regions</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>3.2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>spigot-repo</id>
|
||||||
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.spigotmc</groupId>
|
||||||
|
<artifactId>spigot-api</artifactId>
|
||||||
|
<version>1.21.5-R0.1-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
BIN
target/classes/si/jernejtdo/regions/RegionData.class
Normal file
BIN
target/classes/si/jernejtdo/regions/RegionData.class
Normal file
Binary file not shown.
BIN
target/classes/si/jernejtdo/regions/Regions.class
Normal file
BIN
target/classes/si/jernejtdo/regions/Regions.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
target/maven-archiver/pom.properties
Normal file
3
target/maven-archiver/pom.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
artifactId=Regions
|
||||||
|
groupId=si.jernejtdo
|
||||||
|
version=1.0
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
si\jernejtdo\regions\bukkitevents\BukkitPlayerMoveEvent.class
|
||||||
|
si\jernejtdo\regions\event\PlayerEnterRegionEvent.class
|
||||||
|
si\jernejtdo\regions\RegionData.class
|
||||||
|
si\jernejtdo\regions\event\PlayerExitRegionEvent.class
|
||||||
|
si\jernejtdo\regions\Regions.class
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
D:\Codespace\JernejTDO\Regions\src\main\java\si\jernejtdo\regions\event\PlayerExitRegionEvent.java
|
||||||
|
D:\Codespace\JernejTDO\Regions\src\main\java\si\jernejtdo\regions\RegionData.java
|
||||||
|
D:\Codespace\JernejTDO\Regions\src\main\java\si\jernejtdo\regions\Regions.java
|
||||||
|
D:\Codespace\JernejTDO\Regions\src\main\java\si\jernejtdo\regions\bukkitevents\BukkitPlayerMoveEvent.java
|
||||||
|
D:\Codespace\JernejTDO\Regions\src\main\java\si\jernejtdo\regions\event\PlayerEnterRegionEvent.java
|
||||||
BIN
target/original-Regions-1.0.jar
Normal file
BIN
target/original-Regions-1.0.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user