mirror of
https://github.com/TotalFreedomMC/VulnerabilityPatcher.git
synced 2024-10-07 09:05:03 +00:00
Commit v1.6-Hotfix
As attributes are changed (as pointed out by A Person#2716) here is a hotfix that solves the issue hopefully...
This commit is contained in:
parent
a6aead4c31
commit
058c89ecbb
|
@ -2,32 +2,12 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="4038a6e9-7d52-4dd0-91ef-d9a12aa1c1b2" name="Default Changelist" comment="">
|
<list default="true" id="4038a6e9-7d52-4dd0-91ef-d9a12aa1c1b2" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/libs/Spigot-1.16.jar" afterDir="false" />
|
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_16.java" afterDir="false" />
|
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Chests.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_0.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_0.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_guava_guava_21_0.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_guava_guava_21_0.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__net_md_5_bungeecord_chat_1_13_SNAPSHOT.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__net_md_5_bungeecord_chat_1_13_SNAPSHOT.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/modules/VulnerabilityPatcher.main.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules/VulnerabilityPatcher.main.iml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/modules/VulnerabilityPatcher.test.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules/VulnerabilityPatcher.test.iml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/modules/me.cooljwb.vulnerabilitypatcher.VulnerabilityPatcher.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules/me.cooljwb.vulnerabilitypatcher.VulnerabilityPatcher.iml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/Variables.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/Variables.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/gradle.properties" beforeDir="false" afterPath="$PROJECT_DIR$/gradle.properties" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/VulnerabilityPatcher.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/VulnerabilityPatcher.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/commands/CommandGetLag.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/commands/CommandGetLag.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/events/DisconnectionAid.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/events/DisconnectionAid.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_13_2.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_13_2.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_13_2.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_13_2.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_14.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_14.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_14.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_14.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_15.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_15.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_15.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_15.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Chunks.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Chunks.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_16.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/modifiers/NBTModifier_1_16.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Disconnect_Items.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Disconnect_Items.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Handswitch.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Handswitch.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Patches.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Patches.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Spawner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/cooljwb/vulnerabilitypatcher/patches/Spawner.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/config.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/config.yml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/plugin.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/plugin.yml" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|
|
@ -24,10 +24,15 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public enum Variables {
|
public enum Variables {
|
||||||
Attributes(Arrays.asList("generic.maxhealth", "generic.followrange", "generic.knockbackresistance",
|
LeagacyAttributes(Arrays.asList("generic.maxhealth", "generic.followrange", "generic.knockbackresistance",
|
||||||
"generic.movementspeed", "generic.attackdamage", "generic.armor", "generic.armortoughness",
|
"generic.movementspeed", "generic.attackdamage", "generic.armor", "generic.armortoughness",
|
||||||
"generic.attackspeed", "generic.luck", "horse.jumpstrength", "generic.attackknockback", "generic.flyingspeed",
|
"generic.attackspeed", "generic.luck", "horse.jumpstrength", "generic.attackknockback", "generic.flyingspeed",
|
||||||
"zombie.spawnreinforcements"));
|
"zombie.spawnreinforcements")),
|
||||||
|
|
||||||
|
Attributes(Arrays.asList("generic.max_health", "generic.follow_range", "generic.knockback_resistance",
|
||||||
|
"generic.movement_speed", "generic.attack_damage", "generic.armor", "generic.armor_toughness",
|
||||||
|
"generic.attack_speed", "generic.luck", "horse.jump_strength", "generic.attack_knockback", "generic.flying_speed",
|
||||||
|
"zombie.spawn_reinforcements"));
|
||||||
|
|
||||||
public List<String> liststr;
|
public List<String> liststr;
|
||||||
Variables(List<String> strings) {
|
Variables(List<String> strings) {
|
||||||
|
|
|
@ -195,7 +195,7 @@ public class NBTModifier_1_13_2 {
|
||||||
if(attrlist != null) {
|
if(attrlist != null) {
|
||||||
for(int i = 0; i < attrlist.size(); i++) {
|
for(int i = 0; i < attrlist.size(); i++) {
|
||||||
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
||||||
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxHealth")) && compound.getDouble("Amount") <= 0) {
|
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxhealth")) && compound.getDouble("Amount") <= 0) {
|
||||||
fired_countermeasure("isDeathItem");
|
fired_countermeasure("isDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class NBTModifier_1_13_2 {
|
||||||
String name = attrlist.getCompound(b).getString("Name");
|
String name = attrlist.getCompound(b).getString("Name");
|
||||||
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
||||||
|
|
||||||
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxHealth")) && amount <= 0) {
|
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxhealth")) && amount <= 0) {
|
||||||
fired_countermeasure("containsDeathItem");
|
fired_countermeasure("containsDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -328,7 +328,7 @@ public class NBTModifier_1_13_2 {
|
||||||
NBTTagCompound attribute = attrlist.getCompound(a);
|
NBTTagCompound attribute = attrlist.getCompound(a);
|
||||||
|
|
||||||
if(attribute != null && attribute.getString("AttributeName").toLowerCase() != "") {
|
if(attribute != null && attribute.getString("AttributeName").toLowerCase() != "") {
|
||||||
if(!Variables.Attributes.liststr.contains(attribute.getString("AttributeName").toLowerCase())) {
|
if(!Variables.LeagacyAttributes.liststr.contains(attribute.getString("AttributeName").toLowerCase())) {
|
||||||
fired_countermeasure("isInvalidAttributeNameDisconnectItem");
|
fired_countermeasure("isInvalidAttributeNameDisconnectItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class NBTModifier_1_14 {
|
||||||
if(attrlist != null) {
|
if(attrlist != null) {
|
||||||
for(int i = 0; i < attrlist.size(); i++) {
|
for(int i = 0; i < attrlist.size(); i++) {
|
||||||
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
||||||
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxHealth")) && compound.getDouble("Amount") <= 0) {
|
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxhealth")) && compound.getDouble("Amount") <= 0) {
|
||||||
fired_countermeasure("isDeathItem");
|
fired_countermeasure("isDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ public class NBTModifier_1_14 {
|
||||||
String name = attrlist.getCompound(b).getString("Name");
|
String name = attrlist.getCompound(b).getString("Name");
|
||||||
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
||||||
|
|
||||||
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxHealth")) && amount <= 0) {
|
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxhealth")) && amount <= 0) {
|
||||||
fired_countermeasure("containsDeathItem");
|
fired_countermeasure("containsDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ public class NBTModifier_1_14 {
|
||||||
NBTTagCompound attribute = attrlist.getCompound(a);
|
NBTTagCompound attribute = attrlist.getCompound(a);
|
||||||
|
|
||||||
if(attribute != null && attribute.getString("AttributeName").toLowerCase() != "") {
|
if(attribute != null && attribute.getString("AttributeName").toLowerCase() != "") {
|
||||||
if(!Variables.Attributes.liststr.contains(attribute.getString("AttributeName").toLowerCase())) {
|
if(!Variables.LeagacyAttributes.liststr.contains(attribute.getString("AttributeName").toLowerCase())) {
|
||||||
fired_countermeasure("isInvalidAttributeNameDisconnectItem");
|
fired_countermeasure("isInvalidAttributeNameDisconnectItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,7 +216,7 @@ public class NBTModifier_1_15 {
|
||||||
if(attrlist != null) {
|
if(attrlist != null) {
|
||||||
for(int i = 0; i < attrlist.size(); i++) {
|
for(int i = 0; i < attrlist.size(); i++) {
|
||||||
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
||||||
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxHealth")) && compound.getDouble("Amount") <= 0) {
|
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxhealth")) && compound.getDouble("Amount") <= 0) {
|
||||||
fired_countermeasure("isDeathItem");
|
fired_countermeasure("isDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ public class NBTModifier_1_15 {
|
||||||
String name = attrlist.getCompound(b).getString("Name");
|
String name = attrlist.getCompound(b).getString("Name");
|
||||||
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
||||||
|
|
||||||
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxHealth")) && amount <= 0) {
|
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxhealth")) && amount <= 0) {
|
||||||
fired_countermeasure("containsDeathItem");
|
fired_countermeasure("containsDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -349,7 +349,7 @@ public class NBTModifier_1_15 {
|
||||||
NBTTagCompound attribute = attrlist.getCompound(a);
|
NBTTagCompound attribute = attrlist.getCompound(a);
|
||||||
|
|
||||||
if(attribute != null && attribute.getString("AttributeName").toLowerCase() != "") {
|
if(attribute != null && attribute.getString("AttributeName").toLowerCase() != "") {
|
||||||
if(!Variables.Attributes.liststr.contains(attribute.getString("AttributeName").toLowerCase())) {
|
if(!Variables.LeagacyAttributes.liststr.contains(attribute.getString("AttributeName").toLowerCase())) {
|
||||||
fired_countermeasure("isInvalidAttributeNameDisconnectItem");
|
fired_countermeasure("isInvalidAttributeNameDisconnectItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class NBTModifier_1_16 {
|
||||||
if(attrlist != null) {
|
if(attrlist != null) {
|
||||||
for(int i = 0; i < attrlist.size(); i++) {
|
for(int i = 0; i < attrlist.size(); i++) {
|
||||||
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
NBTTagCompound compound = (NBTTagCompound)attrlist.get(i);
|
||||||
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.maxHealth")) && compound.getDouble("Amount") <= 0) {
|
if((compound.getString("Name").equalsIgnoreCase("MAX_HEALTH") || compound.getString("AttributeName").equalsIgnoreCase("generic.max_health")) && compound.getDouble("Amount") <= 0) {
|
||||||
fired_countermeasure("isDeathItem");
|
fired_countermeasure("isDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ public class NBTModifier_1_16 {
|
||||||
String name = attrlist.getCompound(b).getString("Name");
|
String name = attrlist.getCompound(b).getString("Name");
|
||||||
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
Double amount = attrlist.getCompound(b).getDouble("Amount");
|
||||||
|
|
||||||
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.maxHealth")) && amount <= 0) {
|
if((name.equalsIgnoreCase("MAX_HEALTH") || attribute_name.equalsIgnoreCase("generic.max_health")) && amount <= 0) {
|
||||||
fired_countermeasure("containsDeathItem");
|
fired_countermeasure("containsDeathItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ public class NBTModifier_1_16 {
|
||||||
for(int a = 0; a <= attrlist.size(); a++) {
|
for(int a = 0; a <= attrlist.size(); a++) {
|
||||||
NBTTagCompound attribute = attrlist.getCompound(a);
|
NBTTagCompound attribute = attrlist.getCompound(a);
|
||||||
|
|
||||||
if(attribute.getString("AttributeName").equalsIgnoreCase("generic.movementspeed") && attributes.containsKey(attribute.getString("AttributeName").toLowerCase()) && !Float.isFinite(attribute.getFloat("Amount"))) {
|
if(attribute.getString("AttributeName").equalsIgnoreCase("generic.movement_speed") && attributes.containsKey(attribute.getString("AttributeName").toLowerCase()) && !Float.isFinite(attribute.getFloat("Amount"))) {
|
||||||
fired_countermeasure("isMovementDisconnectItem");
|
fired_countermeasure("isMovementDisconnectItem");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue