Merge pull request '1.7.2 - Blockhunt Hider Fixes' (#6) from dev into main

Reviewed-on: https://g.tylerm.dev/tylermurphy534/KenshinsHideAndSeek/pulls/6
This commit is contained in:
tylermurphy534 2023-02-11 18:46:14 +00:00
commit 522dbd92d3
5 changed files with 16 additions and 8 deletions

View file

@ -1,7 +1,7 @@
<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>net.tylermurphy</groupId>
<artifactId>KenshinsHideAndSeek</artifactId>
<version>1.7.1</version>
<version>1.7.2</version>
<name>Hide and Seek Plugin</name>
<properties>

View file

@ -51,7 +51,7 @@ public class CommandGroup {
if (data == null) {
player.sendMessage(
String.format("%s%sKenshin's Hide and Seek %s(%s1.7.1%s)\n", ChatColor.AQUA, ChatColor.BOLD, ChatColor.GRAY, ChatColor.WHITE, ChatColor.GRAY) +
String.format("%s%sKenshin's Hide and Seek %s(%s1.7.2%s)\n", ChatColor.AQUA, ChatColor.BOLD, ChatColor.GRAY, ChatColor.WHITE, ChatColor.GRAY) +
String.format("%sAuthor: %s[KenshinEto]\n", ChatColor.GRAY, ChatColor.WHITE) +
String.format("%sHelp Command: %s/hs %shelp", ChatColor.GRAY, ChatColor.AQUA, ChatColor.WHITE)
);

View file

@ -20,7 +20,7 @@ public class Disguise {
final Player hider;
final Material material;
FallingBlock block;
Horse hitBox;
AbstractHorse hitBox;
Location blockLocation;
boolean solid, solidify, solidifying;
static Team hidden;
@ -156,15 +156,24 @@ public class Disguise {
private void respawnFallingBlock(){
block = hider.getLocation().getWorld().spawnFallingBlock(hider.getLocation().add(0, 1000, 0), material, (byte)0);
block.setGravity(false);
if (Main.getInstance().supports(10)) {
block.setGravity(false);
}
block.setDropItem(false);
block.setInvulnerable(true);
}
private void respawnHitbox(){
hitBox = (Horse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.HORSE);
if (Main.getInstance().supports(11)) {
hitBox = (AbstractHorse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.SKELETON_HORSE);
} else {
hitBox = (AbstractHorse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.HORSE);
hitBox.setVariant(Horse.Variant.SKELETON_HORSE);
}
if (Main.getInstance().supports(10)) {
hitBox.setGravity(false);
}
hitBox.setAI(false);
hitBox.setGravity(false);
hitBox.setInvulnerable(true);
hitBox.setCanPickupItems(false);
hitBox.setCollidable(false);

View file

@ -112,7 +112,6 @@ public class WorldLoader {
String[] parts = file.split("\\.");
if (parts.length > 1) {
Main.getInstance().getLogger().info(file);
if ( Integer.parseInt(parts[1]) < minX || Integer.parseInt(parts[1]) > maxX || Integer.parseInt(parts[2]) < minZ || Integer.parseInt(parts[2]) > maxZ )
continue;
}

View file

@ -1,6 +1,6 @@
name: KenshinsHideAndSeek
main: net.tylermurphy.hideAndSeek.Main
version: 1.7.1
version: 1.7.2
author: KenshinEto
load: STARTUP
api-version: 1.13