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:
commit
522dbd92d3
5 changed files with 16 additions and 8 deletions
2
pom.xml
2
pom.xml
|
@ -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>
|
<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>
|
<groupId>net.tylermurphy</groupId>
|
||||||
<artifactId>KenshinsHideAndSeek</artifactId>
|
<artifactId>KenshinsHideAndSeek</artifactId>
|
||||||
<version>1.7.1</version>
|
<version>1.7.2</version>
|
||||||
<name>Hide and Seek Plugin</name>
|
<name>Hide and Seek Plugin</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class CommandGroup {
|
||||||
|
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
player.sendMessage(
|
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("%sAuthor: %s[KenshinEto]\n", ChatColor.GRAY, ChatColor.WHITE) +
|
||||||
String.format("%sHelp Command: %s/hs %shelp", ChatColor.GRAY, ChatColor.AQUA, ChatColor.WHITE)
|
String.format("%sHelp Command: %s/hs %shelp", ChatColor.GRAY, ChatColor.AQUA, ChatColor.WHITE)
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class Disguise {
|
||||||
final Player hider;
|
final Player hider;
|
||||||
final Material material;
|
final Material material;
|
||||||
FallingBlock block;
|
FallingBlock block;
|
||||||
Horse hitBox;
|
AbstractHorse hitBox;
|
||||||
Location blockLocation;
|
Location blockLocation;
|
||||||
boolean solid, solidify, solidifying;
|
boolean solid, solidify, solidifying;
|
||||||
static Team hidden;
|
static Team hidden;
|
||||||
|
@ -156,15 +156,24 @@ public class Disguise {
|
||||||
|
|
||||||
private void respawnFallingBlock(){
|
private void respawnFallingBlock(){
|
||||||
block = hider.getLocation().getWorld().spawnFallingBlock(hider.getLocation().add(0, 1000, 0), material, (byte)0);
|
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.setDropItem(false);
|
||||||
block.setInvulnerable(true);
|
block.setInvulnerable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void respawnHitbox(){
|
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.setAI(false);
|
||||||
hitBox.setGravity(false);
|
|
||||||
hitBox.setInvulnerable(true);
|
hitBox.setInvulnerable(true);
|
||||||
hitBox.setCanPickupItems(false);
|
hitBox.setCanPickupItems(false);
|
||||||
hitBox.setCollidable(false);
|
hitBox.setCollidable(false);
|
||||||
|
|
|
@ -112,7 +112,6 @@ public class WorldLoader {
|
||||||
|
|
||||||
String[] parts = file.split("\\.");
|
String[] parts = file.split("\\.");
|
||||||
if (parts.length > 1) {
|
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 )
|
if ( Integer.parseInt(parts[1]) < minX || Integer.parseInt(parts[1]) > maxX || Integer.parseInt(parts[2]) < minZ || Integer.parseInt(parts[2]) > maxZ )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: KenshinsHideAndSeek
|
name: KenshinsHideAndSeek
|
||||||
main: net.tylermurphy.hideAndSeek.Main
|
main: net.tylermurphy.hideAndSeek.Main
|
||||||
version: 1.7.1
|
version: 1.7.2
|
||||||
author: KenshinEto
|
author: KenshinEto
|
||||||
load: STARTUP
|
load: STARTUP
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
|
|
Loading…
Reference in a new issue