Compare commits

...

35 Commits

Author SHA1 Message Date
Zeshan 6d0dfff1f8
Merge pull request #65 from YellaGoya/master
translations: Updating Korean translation for 1.20.1
2024-03-03 20:08:24 -05:00
yellagoya a817bef7e7 translations: Updating Korean translation for 1.20.1 2024-03-01 03:27:46 +09:00
zeshanaslam 210ae03593 Updated to support 1.20 MC version 2023-06-22 21:39:36 -04:00
Zeshan Aslam aacbf3af3d
Merge pull request #60 from worklab-in-servers/master
translations: Updating Russian translation for 1.19.3
2023-03-25 14:02:26 -04:00
WolfAURman 5e676ee355 translations: Updating Russian translation for 1.19.3 2023-03-21 14:19:46 +06:00
Zeshan Aslam c173525983
Merge pull request #58 from CMSMortal-chen/patch-1
update chinese translations for 1.19
2022-06-18 12:30:13 -04:00
Mortal_chen c2e845fdd0
update chinese translations for 1.19 2022-06-18 12:28:13 +08:00
Zeshan Aslam 4f24701b79 Merge branch 'master' of https://github.com/zeshan321/ActionHealth 2022-06-12 14:51:38 -04:00
Zeshan Aslam b58356e84d Added 1.19 support 2022-06-12 14:51:36 -04:00
Zeshan Aslam 99f411f0b3
Merge pull request #55 from SkyGhostK/patch-1
Fix translation Spanish and added more mobs
2022-04-27 20:02:12 -04:00
SkyGhostK 4cbc75e50c
Update Spanish.yml
Todos los mobs añadidos, y corregidos algunos.
All mobs added, and someones corrected.
2022-04-27 20:19:53 -03:00
Zeshan Aslam 6184f8ff0a
Update README.md 2022-03-26 11:35:58 -04:00
Zeshan Aslam 52fba93322 Merge remote-tracking branch 'origin/master' 2022-03-26 11:33:38 -04:00
Zeshan Aslam 794135b02e Updated to support MythicMobs 5.0.2. Temp using files directly for MVdWPlaceholderAPI and MythicMobs 2022-03-26 11:33:22 -04:00
Zeshan Aslam ecfda68d2c
Update README.md 2022-03-26 11:32:11 -04:00
Zeshan Aslam fc693d29a3
Merge pull request #50 from Kikisito/master
Switch to Gradle
2021-12-05 17:03:30 -05:00
Kikisito d1812f0c6a oops 2021-12-01 02:31:31 +01:00
Kikisito dfde78a5e4 Get plugin version from Gradle 2021-12-01 02:31:01 +01:00
Kikisito 95d8f4a693 Implement only necessary dependencies 2021-12-01 02:17:13 +01:00
Kikisito 993442286e delete more files 2021-12-01 02:07:30 +01:00
Kikisito d720d763ab Update .gitignore 2021-12-01 02:05:33 +01:00
Kikisito 9c791b494f Clear temp files 2021-12-01 02:04:34 +01:00
Kikisito 6ae7244f08 Switch to Gradle 2021-12-01 02:03:11 +01:00
Zeshan Aslam 62fc50877a
Merge pull request #49 from Kikisito/master
Add support for MC 1.18+
2021-11-30 19:03:56 -05:00
Kikisito 0fee3f6601 Bump to 3.5.6 2021-12-01 00:09:29 +01:00
Kikisito 8ffbd2b074 1.18+ support 2021-12-01 00:03:18 +01:00
Zeshan Aslam fd46f6c70d
Merge pull request #47 from PoulpY2K/master
Adding French translation for 1.17
2021-10-06 20:52:07 -04:00
PoulpY2K f9e67354fb Adding French translation for 1.17 2021-10-05 19:43:06 +02:00
Zeshan Aslam 09c02c1edf
Merge pull request #40 from nctisz/patch-1
More accurate translation
2021-06-22 17:09:28 -04:00
Miguel Angelo 40e0dbaab6
More accurate translation
Not criticizing but the guy who translated this wasnt paying attention in what he was doing, these are more than accurate translations! Keep doing you good job, nice plugin!
2021-06-22 14:36:08 -03:00
Zeshan Aslam d02518a1c4
Merge pull request #39 from ybw0014/master
simplifed chinese translation: add new mobs in 1.17 and professions of villagers
2021-06-22 09:30:37 -04:00
ybw0014 e946d6e0c3 add new mobs in 1.17 and professions of villagers 2021-06-22 18:12:16 +08:00
Zeshan Aslam ea6cf922f8 Update plugin.yml 2021-06-21 18:09:21 -04:00
Zeshan Aslam 85d2a0dd21
Merge pull request #38 from syldium/fix/api-version
Remove the use of legacy materials to specify the api version
2021-06-21 18:08:24 -04:00
syldium 00d80cfbd6
Remove the use of legacy materials to specify the api version
Fixes #34
2021-06-20 10:25:37 +02:00
40 changed files with 793 additions and 110 deletions

122
.gitignore vendored
View File

@ -1,4 +1,118 @@
ActionHealth.iml
.idea/*
libs/*
out/*
# User-specific stuff
.idea/
*.iml
*.ipr
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
.gradle
build/
# Ignore Gradle GUI config
gradle-app.setting
# Cache of project
.gradletasknamecache
**/build/
# Common working directory
run/
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

View File

@ -5,7 +5,10 @@ Spigot page: [Click Here](https://www.spigotmc.org/resources/action-bar-health.2
# Dependencies
**Required**
- Java 8 or greater
- Version v3.5.7 or greater
- Java 16 or greater
- Versions below v3.5.7
- Java 8 or greater
**Optional**
- For region disable option:
@ -28,6 +31,9 @@ Default config: [Click Here](https://github.com/zeshan321/ActionHealth/blob/mast
A list of the community made translations: [Click Here](https://github.com/zeshan321/ActionHealth/wiki/Community-Translations)
# Compiling
To compile ActionHealth, you need at least **Java 16** and an internet connection. Then, clone this repo, run `./gradlew clean shadowJar` and get your jar from `build/libs/ActionHealh-VERSION-all.jar`.
# More info
Custom styles, screenshots, command information and more can be found on the spigot page.

83
build.gradle Normal file
View File

@ -0,0 +1,83 @@
plugins {
id 'java'
id "com.github.johnrengelman.shadow" version "7.1.0"
}
group = 'com.zeshanaslam'
version = '3.5.9'
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype-repo'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name = 'codemc-repo'
url = 'https://repo.codemc.org/repository/maven-public/'
}
maven {
name = 'langutils-repo'
url = 'https://raw.github.com/MascusJeoraly/LanguageUtils/mvn-repo/'
}
maven {
name = 'Lumine Releases'
url = 'https://mvn.lumine.io/repository/maven-public/'
}
maven {
name = 'papi-repo'
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}
maven {
name = 'IntellectualSites'
url = 'https://mvn.intellectualsites.com/content/repositories/releases/'
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.10.10'
compileOnly 'org.apache.commons:commons-lang3:3.12.0'
compileOnly 'com.meowj:LangUtils:1.9'
compileOnly files('temp_libs/MVdWPlaceholderAPI.jar')
compileOnly files('temp_libs/MythicMobs-5.0.2.jar')
implementation 'org.codemc.worldguardwrapper:worldguardwrapper:1.2.0-SNAPSHOT'
}
def targetJavaVersion = 16
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
shadowJar {
minimize()
dependencies {
include(dependency('org.codemc.worldguardwrapper:worldguardwrapper:1.2.0-SNAPSHOT'))
}
}
tasks.build.dependsOn tasks.shadowJar

0
gradle.properties Normal file
View File

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

185
gradlew vendored Normal file
View File

@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

89
gradlew.bat vendored Normal file
View File

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

1
settings.gradle Normal file
View File

@ -0,0 +1 @@
rootProject.name = 'ActionHealth'

View File

@ -1,14 +0,0 @@
package com.zeshanaslam.actionhealth.support;
import io.lumine.xikage.mythicmobs.MythicMobs;
import org.bukkit.entity.Entity;
public class MythicMobsSupport {
public String getMythicName(Entity entity) {
if (MythicMobs.inst().getAPIHelper().isMythicMob(entity)) {
return MythicMobs.inst().getAPIHelper().getMythicMobInstance(entity).getType().getInternalName();
}
return null;
}
}

View File

@ -7,27 +7,15 @@ import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
public class LookThread extends BukkitRunnable {
private Main plugin;
private Set<Byte> transparentTypeIds;
private TargetHelper targetHelper;
public LookThread(Main plugin) {
this.plugin = plugin;
this.targetHelper = new TargetHelper(plugin);
this.transparentTypeIds = new TreeSet<>();
transparentTypeIds.add((byte) 0);
transparentTypeIds.add((byte) 20);
transparentTypeIds.add((byte) 95);
transparentTypeIds.add((byte) 102);
transparentTypeIds.add((byte) 160);
transparentTypeIds.add((byte) 8);
transparentTypeIds.add((byte) 9);
}
@Override
@ -47,7 +35,7 @@ public class LookThread extends BukkitRunnable {
String name = plugin.healthUtil.getName(livingEntity, player);
if (targetHelper.canSee(player, livingEntity.getLocation(), transparentTypeIds) && !plugin.healthUtil.isBlacklisted(livingEntity, name)) {
if (targetHelper.canSee(player, livingEntity.getLocation()) && !plugin.healthUtil.isBlacklisted(livingEntity, name)) {
if (plugin.configStore.isUsingWhiteList()) {
if (!plugin.healthUtil.isWhiteListed(livingEntity, name)) {
continue;

View File

@ -0,0 +1,22 @@
package com.zeshanaslam.actionhealth.support;
import io.lumine.mythic.bukkit.BukkitAPIHelper;
import io.lumine.mythic.bukkit.MythicBukkit;
import org.bukkit.Bukkit;
import org.bukkit.entity.Entity;
public class MythicMobsSupport {
private static final MythicBukkit plugin = (MythicBukkit) Bukkit.getServer().getPluginManager().getPlugin("MythicMobs");
public String getMythicName(Entity entity) {
if (plugin == null) {
return null;
}
BukkitAPIHelper bucketApiHelper = plugin.getAPIHelper();
if (bucketApiHelper.isMythicMob(entity)) {
return bucketApiHelper.getMythicMobInstance(entity).getType().getInternalName();
}
return null;
}
}

View File

@ -3,7 +3,7 @@ package com.zeshanaslam.actionhealth.utils;
import com.zeshanaslam.actionhealth.Main;
import com.zeshanaslam.actionhealth.api.HealthSendEvent;
import com.zeshanaslam.actionhealth.support.*;
import org.apache.commons.lang.WordUtils;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -268,13 +268,13 @@ public class HealthUtil {
message = ChatColor.translateAlternateColorCodes('&', message);
try {
if (plugin.configStore.mcVersion.equals("v1_17_R1")) {
if (plugin.configStore.mcVersion.contains("v1_17") || plugin.configStore.mcVersion.contains("v1_18") || plugin.configStore.mcVersion.contains("v1_19") || plugin.configStore.mcVersion.contains("v1_20")) {
new NewAction(player, message);
} else if (plugin.configStore.mcVersion.equals("v1_16_R1") || plugin.configStore.mcVersion.equals("v1_16_R2") || plugin.configStore.mcVersion.equals("v1_16_R3")) {
} else if (plugin.configStore.mcVersion.contains("v1_16")) {
new PreAction(player, message);
} else if (plugin.configStore.mcVersion.equals("v1_12_R1") || plugin.configStore.mcVersion.startsWith("v1_13") || plugin.configStore.mcVersion.startsWith("v1_14_") || plugin.configStore.mcVersion.startsWith("v1_15_")) {
new LegacyPreAction(player, message);
} else if (!(plugin.configStore.mcVersion.equalsIgnoreCase("v1_8_R1") || (plugin.configStore.mcVersion.contains("v1_7_")))) {
} else if (!(plugin.configStore.mcVersion.equalsIgnoreCase("v1_8_R1") || plugin.configStore.mcVersion.contains("v1_7_"))) {
Class<?> c1 = Class.forName("org.bukkit.craftbukkit." + plugin.configStore.mcVersion + ".entity.CraftPlayer");
Object p = c1.cast(player);
Object ppoc;

View File

@ -9,9 +9,7 @@ import org.bukkit.util.BlockIterator;
import org.bukkit.util.Vector;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* <p>Helper class for getting targets using various methods</p>
@ -302,24 +300,11 @@ public class TargetHelper {
}
}
public Block getTarget(Location from, int distance, byte... transparentTypeIds) {
if (transparentTypeIds.length == 0) {
return getTarget(from, distance, (Set<Byte>) null);
} else {
Set<Byte> types = new HashSet<>(transparentTypeIds.length);
for (byte b : transparentTypeIds) types.add(b);
return getTarget(from, distance, types);
}
}
public Block getTarget(Location from, int distance, Set<Byte> transparentTypeIds) {
public Block getTarget(Location from, int distance) {
BlockIterator itr = new BlockIterator(from, 0, distance);
while (itr.hasNext()) {
Block block = itr.next();
int id = block.getType().getId();
if (transparentTypeIds == null) {
if (id == 0) continue;
} else if (transparentTypeIds.contains((byte) id)) {
if (!block.getType().isOccluding()) {
continue;
}
return block;
@ -327,19 +312,7 @@ public class TargetHelper {
return null;
}
public Block getTarget(LivingEntity from, int distance, Set<Byte> transparentTypeIds) {
return getTarget(from.getEyeLocation(), distance, transparentTypeIds);
}
public Block getTarget(LivingEntity from, int distance, byte... transparentTypeIds) {
return getTarget(from.getEyeLocation(), distance, transparentTypeIds);
}
public boolean canSee(LivingEntity from, Location to, Set<Byte> transparentTypeIds) {
return getTarget(from, (int) Math.ceil(from.getLocation().distance(to)), transparentTypeIds) == null;
}
public boolean canSee(LivingEntity from, Location to, byte... transparentTypeIds) {
return getTarget(from, (int) Math.ceil(from.getLocation().distance(to)), transparentTypeIds) == null;
public boolean canSee(LivingEntity from, Location to) {
return getTarget(from.getEyeLocation(), (int) Math.ceil(from.getLocation().distance(to))) == null;
}
}

View File

@ -108,9 +108,12 @@ Invisible Potion: true
# Hide if entity is in spectator mode.
Spectator Mode: true
# If to show MiniaturePets health or not
# If true show MiniaturePets health or not
ShowMiniaturePets: true
# If true show Armor Stand health or not
ShowArmorStand: true
# Translate names. Case sensitive!
# Check ActionHealth page if translations already exist for the language you plan on using.
#

View File

@ -1,7 +1,8 @@
name: ActionHealth
main: com.zeshanaslam.actionhealth.Main
version: 3.5.4
version: "${version}"
softdepend: [PlaceholderAPI, MVdWPlaceholderAPI, WorldGuard, mcMMO, MythicMobs, LangUtils]
api-version: 1.13
commands:
Actionhealth:
description: Actionhealth main commands.

View File

@ -1,6 +1,6 @@
Name Change: true
Name:
- Snow Golem = Golem de Gelo
- Snow Golem = Golem de Neve
- Bat = Morcego
- Cat = Gato
- Cave Spider = Aranha da Caverna
@ -9,12 +9,12 @@ Name:
- Cow = Vaca
- Dolphin = Golfinho
- Donkey = Burro
- Drowned = Zumbi do Mar
- Drowned = Afogado
- Elder Guardian = Guardião Ancião
- Ender Dragon = Dragão do End
- Enderman = Enderman
- Endermite = Rato do End
- Evoker = Evocador
- Endermite = Endermite
- Evoker = Invocador
- Fox = Raposa
- Giant = Gigante
- Guardian = Guardião
@ -23,16 +23,16 @@ Name:
- Illusioner = Ilusionista
- Iron Golem = Golem de Ferro
- Llama = Lhama
- Magma Cube = Slime de Magma
- Magma Cube = Cubo de Magma
- Mooshroom = Coguvaca
- Mule = Mula
- Parrot = Papagaio
- Phantom = Espectro
- Pig = Porco
- Pillager = Saqueador
- Pillager = Pillager
- Polar Bear = Urso Polar
- Puffer Fish = Baiacu
- Ocelot = Gato
- Ocelot = Onça
- Rabbit = Coelho
- Ravager = Destruidor
- Salmon = Salmão
@ -40,19 +40,19 @@ Name:
- Skeleton = Esqueleto
- Skeleton Horse = Cavalo Esqueleto
- Slime = Slime
- Snow Golem = Golem de Gelo
- Snow Golem = Golem de Neve
- Spider = Aranha
- Squid = Lula
- Stray = Esqueleto de Gelo
- Stray = Esqueleto Errante
- Trader Llama = Lhama Trader
- Tropical Fish = Peixe Tropical
- Turtle = Tartaruga
- Vindicator = Vindicador
- Wandering Trader = Trader Ambulante
- Wandering Trader = Mercador Ambulante
- Witch = Bruxa
- Wither Skeleton = Esqueleto Wither
- Wolf = Lobo
- Zombie = Zumbi
- Zombie Horse = Zumbi Cavalo
- Zombie Horse = Cavalo Zumbi
- Zombified Piglin = Piglin Zumbi
- Zombie Villager = Villager Zumbi

87
translations/French.yml Normal file
View File

@ -0,0 +1,87 @@
#French translation for "Action bar Health" made with ♥baguette♥ by PoulpY2K
Name Change: true
Name:
- Armorer = Armurier
- Axolotl = Axolotl
- Bat = Chauve-Souris
- Bee = Abeille
- Blaze = Blaze
- Butcher = Boucher
- Cartographer = Cartographe
- Cat = Chat
- Cave Spider = Araignée venimeuse
- Chicken = Poulet
- Cleric = Prêtre
- Cod = Morue
- Cow = Vache
- Creeper = Creeper
- Dolphin = Dauphin
- Donkey = Âne
- Drowned = Noyé
- Elder Guardian = Gardien Ancestral
- Ender Dragon = Ender Dragon
- Enderman = Enderman
- Endermite = Endermite
- Evoker = Évocateur
- Farmer = Fermier
- Fisherman = Pêcheur
- Fletcher = Fléchier
- Fox = Renard
- Ghast = Ghast
- Glow Squid = Poulpe luisant
- Goat = Chèvre
- Guardian = Gardien
- Hoglin = Hoglin
- Horse = Cheval
- Husk = Zombie momifié
- Iron Golem = Golem de fer
- Llama = Lama
- Leatherworker = Tanneur
- Librarian = Bibliothécaire
- Magma Cube = Cube de magma
- Mason = Maçon
- Mooshroom = Champimeuh
- Mule = Mule
- Nitwit = Idiot du village
- Ocelot = Ocelot
- Panda = Panda
- Parrot = Perroquet
- Phantom = Phantom
- Pig = Cochon
- Piglin Brute = Brute Piglin
- Pillager = Pillard
- Polar Bear = Ours Polaire
- Pufferfish = Poisson-globe
- Rabbit = Lapin
- Ravager = Ravageur
- Salmon = Saumon
- Sheep = Mouton
- Shepherd = Berger
- Shulker = Bernard-l'hermite
- Silverfish = Poisson d'argent
- Skeleton = Squelette
- Skeleton Horse = Cheval-squelette
- Slime = Slime
- Snow Golem = Golem de neige
- Spider = Araignée
- Squid = Poulpe
- Stray = Vagabond
- Strider = Arpenteur
- Toolsmith = Forgeron d'outils
- Trader Llama = Lama de marchand
- Tropical Fish = Poisson tropical
- Turtle = Tortue
- Vex = Vex
- Villager = Villageois
- Vindicator = Vindicateur
- Wandering Trader = Marchand ambulant
- Weaponsmith = Forgeron d'armes
- Witch = Sorcière
- Wither = Wither
- Wither Skeleton = Wither squelette
- Wolf = Loup
- Zoglin = Zoglin
- Zombie = Zombie
- Zombie Horse = Cheval-zombie
- Zombie Villager = Zombie-villageois
- Zombified Piglin = Piglin zombifié

77
translations/Korean.yml Normal file
View File

@ -0,0 +1,77 @@
Name Change: true
Name:
- Allay = 알레이
- Axolotl = 아홀로틀
- Bat = 박쥐
- Bee = 꿀벌
- Blaze = 블레이즈
- Camel = 낙타
- Cat = 고양이
- Cave Spider = 동굴 거미
- Chicken = 닭
- Cod = 대구
- Cow = 소
- Creeper = 크리퍼
- Dolphin = 돌고래
- Donkey = 당나귀
- Drowned = 드라운드
- Elder Guardian = 엘더 가디언
- Enderman = 엔더맨
- Endermite = 엔더마이트
- Evoker = 소환사
- Fox = 여우
- Frog = 개구리
- Ghast = 가스트
- Glow Squid = 발광 오징어
- Goat = 염소
- Guardian = 가디언
- Hoglin = 호글린
- Horse = 말
- Husk = 허스크
- Iron Golem = 철 골렘
- Llama = 라마
- Magma Cube = 마그마 큐브
- Mooshroom = 무시룸
- Mule = 노새
- Ocelot = 오실롯
- Panda = 판다
- Parrot = 앵무새
- Phantom = 팬텀
- Pig = 돼지
- Piglin = 피글린
- Piglin Brute = 난폭한 피글린
- Pillager = 약탈자
- Polar Bear = 북극곰
- Pufferfish = 복어
- Rabbit = 토끼
- Ravager = 파괴수
- Salmon = 연어
- Sheep = 양
- Shulker = 셜커
- Silverfish = 좀벌레
- Skeleton = 스켈레톤
- Skeleton Horse = 스켈레톤 말
- Slime = 슬라임
- Sniffer = 스니퍼
- Snow Golem = 눈사람
- Spider = 거미
- Squid = 오징어
- Stray = 스트레이
- Strider = 스트라이더
- Tadpole = 올챙이
- Trader Llama = 상인 라마
- Tropical Fish = 열대어
- Turtle = 거북
- Vex = 벡스
- Villager = 주민
- Vindicator = 변명자
- Wandering Trader = 떠돌이 상인
- Warden = 워든
- Witch = 마녀
- Wither Skeleton = 위더 스켈레톤
- Wolf = 늑대
- Zoglin = 좀비 호글린
- Zombie = 좀비
- Zombie Horse = 좀비 말
- Zombie Villager = 좀비 주민
- Zombified Piglin = 좀비 피글린

View File

@ -4,7 +4,7 @@ Name:
- Bee = Пчела
- Blaze = Ифрит
- Cat = Кот
- Cave Spider = Ядовитый паук
- Cave Spider = Пещерный паук
- Chicken = Курица
- Cod = Треска
- Cow = Корова
@ -14,7 +14,7 @@ Name:
- Drowned = Утопленник
- Fox = Лиса
- Elder Guardian = Древний страж
- Ender Dragon = Дракон Края
- Ender Dragon = Дракон края
- Enderman = Эндермен
- Endermite = Эндермит
- Evoker = Заклинатель
@ -27,7 +27,7 @@ Name:
- Iron Golem = Железный голем
- Llama = Лама
- Magma Cube = Магмовый куб
- Mooshroom = Корова
- Mooshroom = Грибная корова
- Ocelot = Оцелот
- Mule = Мул
- Panda = Панда
@ -37,7 +37,7 @@ Name:
- Piglin = Пиглин
- Pillager = Разбойник
- Polar Bear = Белый медведь
- Pufferfish = Рыба Фугу
- Pufferfish = Иглобрюх
- Rabbit = Кролик
- Ravager = Разоритель
- Salmon = Лосось
@ -47,23 +47,43 @@ Name:
- Skeleton = Скелет
- Skeleton Horse = Лошадь скелет
- Snow Golem = Снежный голем
- Slime = Слим
- Slime = Слайм
- Spider = Паук
- Squid = Спрут
- Stray = Бродяга
- Strider = Страйдер
- Tropical Fish = Тропическая Рыба
- Stray = Зимогор
- Strider = Лавомерка
- Tropical Fish = Тропическая рыба
- Turtle = Черепаха
- Vex = Досаждатель
- Villager = Житель
- Vindicator = Поборник
- Wandering Trader = Странствующий Торговец
- Wandering Trader = Странствующий торговец
- Witch = Ведьма
- Wither = Иссушитель
- Wither Skeleton = Скелет Иссушитель
- Wither Skeleton = Скелет иссушитель
- Wolf = Волк
- Zombie = Зомби
- Zombie Horse = Зомби лошадь
- Zombie Villager = Зомби житель
- Zombified Piglin = Зомбифицированный Пиглин
- Zoglin = Зоглин
- Zombified Piglin = Зомбифицированный пиглин
- Zoglin = Зоглин
- Armorer = Бронник
- Librarian = Библиотекарь
- Weaponsmith = Оружейник
- Cleric = Священник
- Toolsmith = Инструментальщик
- Fletcher = Лучник
- Leatherworker = Кожевник
- Farmer = Фермер
- Fisherman = Рыбак
- Mason = Каменщик
- Shepherd = Пастух
- Cartographer = Картограф
- Butcher = Мясник
- Unemployed = Нищий
- Axolotl = Аксолотль
- Piglin Brute = Брутальный пиглин
- Illusioner = Иллюзор
- Goat = Коза
- Trader Llama = Лама торговца
- Glow Squid = Светящийся спрут

View File

@ -1,43 +1,48 @@
Name Change: true
Name:
- Axolotl = 美西螈
- Bat = 蝙蝠
- Cat = 猫
- Chicken = 鸡
- Cod = 鳕鱼
- Cow = 牛
- Donkey = 驴
- Fox = 狐狸
- Horse = 马
- Glow Squid = 发光鱿鱼
- Mooshroom = 哞菇
- Mule = 骡
- Ocelot = 豹猫
- Parrot = 鹦鹉
- Pig = 猪
- Rabbit = 兔子
- Salmon = 鲑鱼
- Snow Golem = 雪傀儡
- Sheep = 羊
- Skeleton Horse = 骷髅马
- Sheep = 绵羊
- Squid = 鱿鱼
- Strider = 炽足兽
- Tropical Fish = 热带鱼
- Turtle = 海龟
- Villager = 村民
- Nitwit = 傻子
- Armorer = 盔甲匠
- Butcher = 屠夫
- Cartographer = 制图师
- Cleric = 牧师
- Farmer = 农民
- Fisherman = 渔夫
- Fletcher = 制箭师
- Leatherworker = 皮匠
- Librarian = 图书管理员
- Mason = 石匠
- Shepherd = 牧羊人
- Toolsmith = 工具匠
- Weaponsmith = 武器匠
- Wandering Trader = 流浪商人
- Zombie Horse = 僵尸马
- Pufferfish = 河豚
- Bee = 蜜蜂
- Cave Spider = 洞穴蜘蛛
- Dolphin = 海豚
- Enderman = 末影人
- Iron Golem = 铁傀儡
- Llama = 羊驼
- Trader Llama = 行商羊驼
- Goat = 山羊
- Panda = 熊猫
- Piglin = 猪灵
- Polar Bear = 北极熊
- Spider = 蜘蛛
- Wolf = 狼
- Zombified Piglin = 僵尸猪灵
- Blaze = 烈焰人
- Creeper = 苦力怕
@ -51,6 +56,7 @@ Name:
- Husk = 尸壳
- Magma Cube = 岩浆怪
- Phantom = 幻翼
- Piglin Brute = 猪灵蛮兵
- Pillager = 掠夺者
- Ravager = 劫掠兽
- Shulker = 潜影贝
@ -63,8 +69,22 @@ Name:
- Witch = 女巫
- Wither Skeleton = 凋零骷髅
- Zoglin = 僵尸疣猪兽
- Zombie = 僵尸
- Zombie Villager = 僵尸村民
- Piglin Brute = 猪灵蛮兵
- Zombie = 僵尸
- Cat = 猫
- Donkey = 驴
- Horse = 马
- Llama = 羊驼
- Trader Llama = 行商羊驼
- Mule = 骡
- Parrot = 鹦鹉
- Skeleton Horse = 骷髅马
- Wolf = 狼
- Iron Golem = 铁傀儡
- Snow Golem = 雪傀儡
- Ender Dragon = 末影龙
- Wither = 凋灵
- Wither = 凋灵
- Allay = 悦灵
- Warden = 监守者
- Frog = 青蛙
- Tadpole = 蝌蚪

View File

@ -16,7 +16,7 @@ Name:
- Giant = Gigante
- Guardian = Guardián
- Horse = Caballo
- Husk = Cáscara
- Husk = Zombi momificado
- Iron Golem = Golem de Hierro
- Llama = Llama
- Magma Cube = Cubo de Magma
@ -42,8 +42,31 @@ Name:
- Vindicator = Vindicador
- Witch = Bruja
- Wither = Wither
- Wither Skeleton = Wither Esqueleto
- Wither Skeleton = Esqueleto Wither
- Wolf = Lobo
- Zombie = Zombi
- Zombie Horse = Caballo Zombi
- Zombie Villager = Aldeano Zombi
- Glow Squid = Calamar Luminoso
- Fox = Zorro
- Zombified Piglin = Piglin Zombificado
- Cod = Bacalao
- Wandering Trader = Vendedor Ambulante
- Trader Llama = Llama Ambulante
- Drowned = Ahogado
- Turtle = Tortuga
- Dolphin = Delfin
- Axolotl = Ajolote
- Bee = Abeja
- Cat = Gato
- Evoker = Invocador
- Goat = Cabra
- Phantom = Fantasma
- Piglin Brute = Piglin Bruto
- Pillager = Saqueador
- Pufferfish = Pez Globo
- Ravager = Devastador
- Stray = Esqueleto Glacial
- Strider = Lavagante
- Tropical Fish = Pez Tropical
- Vex = Ánima