Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
BuildTools committed Apr 2, 2022
2 parents 6e01296 + 9576c0d commit 3c40545
Show file tree
Hide file tree
Showing 31 changed files with 78 additions and 42 deletions.
10 changes: 10 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 1_14_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_14_R1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 1_15_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_15_R1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 1_16_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_16_R1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 1_16_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_16_R2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 1_16_R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_16_R3</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 1_17_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_17_R1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 1_18_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_18_R1</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions 1_18_R1/target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven
#Mon Mar 28 15:34:13 EDT 2022
#Sat Apr 02 16:01:12 EDT 2022
groupId=com.github.dawsonvilamaa
artifactId=1_18_R1
version=1.3.0
version=1.3.1
2 changes: 1 addition & 1 deletion 1_18_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>1_18_R2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion Build/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Build</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion Build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Note: Teleportation between beacons requires the beacon to have no blocks inside
- instant-teleport: Activate teleportation as soon as the destination is chosen without a warmup animation (default: false)
- disable-animations: Disable the particle animations when teleporting through a beacon (default: false)
- launch-player: Launch the player when teleporting through a beacon (default: true)
- launch-player-height: The y-level players will launch into the air before teleporting to the destination. Anti-cheat plugins may not allow players to go above a certain height, so adjust this as needed. The minimum value is the world height.
- disable-group-teleporting: By default, beacons teleport anyone standing on top of them. If you want to limit the teleportation to only the player who chooses the destination, set this to true. (default: false)
- allow-beacon-break-by-owner: If the BeaconWaypoints.breakWaypointBeacons permission is disabled for a player, this will still allow them to break a beacon if all waypoints attached to it are owned by them. The owner of a beacon is the player who placed it. (default: true)
- allow-all-worlds: Allow waypoints to be created in any world (default: true)
Expand All @@ -56,6 +57,12 @@ Note: If WorldEdit is used to delete a beacon, the waypoint will not be deleted.

## Changelog

# 1.3.1

Fixes:
- Added compatibility with NoCheatPlus by adding temporary exemptions when a player is teleporting.
- Added launch-player-height config option to change how high players are launched before teleporting. Anti-cheat plugins might not allow players above a certain height, so this is a way to work around that.

# 1.3.0

Changes:
Expand Down
2 changes: 1 addition & 1 deletion VersionWrapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
20 changes: 3 additions & 17 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
Changes:
- The default waypoint type is now public, so typing out "public" is no longer required when creating a new waypoint
- Changed permissions
- Removed waypoint permission
- Added createWaypoints permission
- Added useWaypoints permission
- Added usePrivateWaypoints permission
- Added breakWaypointBeacons permission
- Added manageAllWaypoints permission
- Changed config.yml
- Added launch-player option
- Added allow-beacon-break-by-owner option
- Added allow-all-worlds option

Bug Fixes:
- The back arrow player texture for the player skull in the waypoint options menu would not load
- A waypoint would be removed if a beacon became obstructed and then unobstructed
Fixes:
- Added compatibility with NoCheatPlus by adding temporary exemptions when a player is teleporting.
- Added launch-player-height config option to change how high players are launched before teleporting. Anti-cheat plugins might not allow players above a certain height, so this is a way to work around that.
8 changes: 7 additions & 1 deletion core/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>core</artifactId>
Expand Down Expand Up @@ -42,6 +42,12 @@
<version>1.14-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus</artifactId>
<version>3.16.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
Expand Down
8 changes: 7 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>BeaconWaypoints</artifactId>
<groupId>com.github.dawsonvilamaa</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>

<artifactId>core</artifactId>
Expand All @@ -16,6 +16,12 @@
<version>1.14-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus</artifactId>
<version>3.16.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.dawsonvilamaa</groupId>
<artifactId>VersionWrapper</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.github.dawsonvilamaa.beaconwaypoint.waypoints.Waypoint;
import com.github.dawsonvilamaa.beaconwaypoint.waypoints.WaypointManager;
import com.github.dawsonvilamaa.beaconwaypoint.waypoints.WaypointPlayer;
import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager;
import org.bukkit.ChatColor;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.player.PlayerAdvancementDoneEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.event.player.PlayerJoinEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.github.dawsonvilamaa.beaconwaypoint.waypoints;

import com.github.dawsonvilamaa.beaconwaypoint.Main;
import fr.neatmonster.nocheatplus.NCPAPIProvider;
import fr.neatmonster.nocheatplus.checks.CheckType;
import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.configuration.file.FileConfiguration;
Expand Down Expand Up @@ -203,11 +206,19 @@ public void run() {
tpLoc.setDirection(entity.getLocation().getDirection());
entity.teleport(tpLoc, PlayerTeleportEvent.TeleportCause.PLUGIN);
} else {
NCPExemptionManager.exemptPermanently(entity.getUniqueId(), CheckType.MOVING_CREATIVEFLY);
waypointPlayer.setTeleporting(true);

((Player) entity).closeInventory();
int startBeamTop = startBeaconStatus == 1 ? entity.getWorld().getMaxHeight() + 256 : startBeaconStatus - 2;
int destinationBeamTop = destinationBeaconStatus == 1 ? entity.getWorld().getMaxHeight() + 256 : destinationBeaconStatus - 2;

if (!config.contains("launch-player-height"))
config.set("launch-player-height", 576);
int launchPlayerHeight = config.getInt("launch-player-height");
int worldHeight = startLoc.getWorld().getMaxHeight();
if (launchPlayerHeight < worldHeight)
launchPlayerHeight = worldHeight;
int startBeamTop = startBeaconStatus == 1 ? launchPlayerHeight : startBeaconStatus - 2;
int destinationBeamTop = destinationBeaconStatus == 1 ? launchPlayerHeight : destinationBeaconStatus - 2;
tpLoc.setY(destinationBeamTop);

//keep players in start beam
Expand Down Expand Up @@ -242,6 +253,7 @@ public void run() {

//teleport player to new beam
tpLoc.setDirection(entity.getLocation().getDirection());
NCPExemptionManager.unexempt(entity.getUniqueId(), CheckType.MOVING_CREATIVEFLY);
entity.teleport(tpLoc, PlayerTeleportEvent.TeleportCause.PLUGIN);
entity.setVelocity(new Vector(0, -2, 0));
((LivingEntity) entity).removePotionEffect(PotionEffectType.LEVITATION);
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ disable-animations: false
# Launch the player into the air when teleporting through a beacon
launch-player: true

# The y-level players will launch into the air before teleporting to the destination. Anti-cheat plugins may not allow
# players to go above a certain height, so adjust this as needed. The minimum value is the world height.
launch-player-height: 576

# By default, beacons teleport anyone standing on top of them. If you want to limit the teleportation to only the
# player who chooses the destination, set this to true.
disable-group-teleporting: false
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions core/target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven
#Mon Mar 28 15:34:06 EDT 2022
#Sat Apr 02 16:01:09 EDT 2022
groupId=com.github.dawsonvilamaa
artifactId=core
version=1.3.0
version=1.3.1
10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.dawsonvilamaa</groupId>
<artifactId>BeaconWaypoints</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<packaging>pom</packaging>

<modules>
Expand Down Expand Up @@ -30,6 +30,14 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>md_5-snapshots</id>
<url>https://repo.md-5.net/content/repositories/snapshots/</url>
</repository>
<repository>
<id>md_5-releases</id>
<url>https://repo.md-5.net/content/repositories/releases/</url>
</repository>
</repositories>

<dependencies>
Expand Down
5 changes: 0 additions & 5 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
- add new permissions (break beacon, create and use private waypoints, teleport, edit any beacon) (done)
- add config options (allow owners to break beacons if they own all waypoints, launch player, allow all worlds) (done)
- fix back arrow not loading for waypoint options menu (done)
- fix bug where if beacon is obstructed and unobstructed, the waypoint gets deleted (done)
- make public the default waypoint type (done)

0 comments on commit 3c40545

Please sign in to comment.