-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made the plugin 1.8.8 - 1.15.2 compatible + a million other additions…
… and changes
- Loading branch information
Showing
94 changed files
with
5,542 additions
and
4,148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/1_14_4/target/ | ||
/1_15_2/target/ | ||
/1_13_2/target/ | ||
/1_12_2/target/ | ||
/1_11_2/target/ | ||
/API/target/ | ||
/target/ | ||
/RPGHorsesPlugin/target/ | ||
/RPGHorsesPlugin/Vault.jar | ||
/1_15_2/spigot-1.15.2.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>RPGHorses</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>1_11_2</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<artifactId>API</artifactId> | ||
<version>1.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>craftbukkit</artifactId> | ||
<version>1.11.2-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
31 changes: 31 additions & 0 deletions
31
1_11_2/src/main/java/org/plugins/rpghorses/v1_11_2/NMSHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.plugins.rpghorses.v1_11_2; | ||
|
||
import com.google.common.collect.Sets; | ||
import net.minecraft.server.v1_11_R1.EntityCreature; | ||
import net.minecraft.server.v1_11_R1.PathfinderGoalSelector; | ||
import org.bukkit.craftbukkit.v1_11_R1.entity.CraftEntity; | ||
import org.bukkit.entity.LivingEntity; | ||
import org.plugins.rpghorses.NMS; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
public class NMSHandler implements NMS { | ||
|
||
@Override | ||
public void removeBehaviour(LivingEntity entity) { | ||
EntityCreature creature = (EntityCreature) (((CraftEntity) entity).getHandle()); | ||
try { | ||
Field b = PathfinderGoalSelector.class.getDeclaredField("b"); | ||
b.setAccessible(true); | ||
b.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
b.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
|
||
Field c = PathfinderGoalSelector.class.getDeclaredField("c"); | ||
c.setAccessible(true); | ||
c.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
c.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>RPGHorses</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>1_12_2</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<artifactId>API</artifactId> | ||
<version>1.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>craftbukkit</artifactId> | ||
<version>1.12.2-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
31 changes: 31 additions & 0 deletions
31
1_12_2/src/main/java/org/plugins/rpghorses/v1_12_2/NMSHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.plugins.rpghorses.v1_12_2; | ||
|
||
import com.google.common.collect.Sets; | ||
import net.minecraft.server.v1_12_R1.EntityCreature; | ||
import net.minecraft.server.v1_12_R1.PathfinderGoalSelector; | ||
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity; | ||
import org.bukkit.entity.LivingEntity; | ||
import org.plugins.rpghorses.NMS; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
public class NMSHandler implements NMS { | ||
|
||
@Override | ||
public void removeBehaviour(LivingEntity entity) { | ||
EntityCreature creature = (EntityCreature) (((CraftEntity) entity).getHandle()); | ||
try { | ||
Field b = PathfinderGoalSelector.class.getDeclaredField("b"); | ||
b.setAccessible(true); | ||
b.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
b.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
|
||
Field c = PathfinderGoalSelector.class.getDeclaredField("c"); | ||
c.setAccessible(true); | ||
c.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
c.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>RPGHorses</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>1_13_2</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<artifactId>API</artifactId> | ||
<version>1.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>craftbukkit</artifactId> | ||
<version>1.13.2-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
31 changes: 31 additions & 0 deletions
31
1_13_2/src/main/java/org/plugins/rpghorses/v1_13_2/NMSHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.plugins.rpghorses.v1_13_2; | ||
|
||
|
||
import com.google.common.collect.Sets; | ||
import net.minecraft.server.v1_13_R2.EntityCreature; | ||
import net.minecraft.server.v1_13_R2.PathfinderGoalSelector; | ||
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; | ||
import org.bukkit.entity.LivingEntity; | ||
import org.plugins.rpghorses.NMS; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
public class NMSHandler implements NMS { | ||
@Override | ||
public void removeBehaviour(LivingEntity entity) { | ||
EntityCreature creature = (EntityCreature) (((CraftEntity) entity).getHandle()); | ||
try { | ||
Field b = PathfinderGoalSelector.class.getDeclaredField("b"); | ||
b.setAccessible(true); | ||
b.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
b.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
|
||
Field c = PathfinderGoalSelector.class.getDeclaredField("c"); | ||
c.setAccessible(true); | ||
c.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
c.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>RPGHorses</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>1_14_4</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<artifactId>API</artifactId> | ||
<version>1.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>craftbukkit</artifactId> | ||
<version>1.14.4-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
26 changes: 26 additions & 0 deletions
26
1_14_4/src/main/java/org/plugins/rpghorses/v_1_14_4/NMSHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.plugins.rpghorses.v_1_14_4; | ||
|
||
import com.google.common.collect.Sets; | ||
import net.minecraft.server.v1_14_R1.EntityCreature; | ||
import net.minecraft.server.v1_14_R1.PathfinderGoalSelector; | ||
import org.bukkit.craftbukkit.v1_14_R1.entity.CraftEntity; | ||
import org.bukkit.entity.LivingEntity; | ||
import org.plugins.rpghorses.NMS; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
public class NMSHandler implements NMS { | ||
|
||
@Override | ||
public void removeBehaviour(LivingEntity entity) { | ||
EntityCreature creature = (EntityCreature) (((CraftEntity) entity).getHandle()); | ||
try { | ||
Field d = PathfinderGoalSelector.class.getDeclaredField("d"); | ||
d.setAccessible(true); | ||
d.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
d.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>RPGHorses</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>1_15_2</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<artifactId>API</artifactId> | ||
<version>1.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>local.spigotmc</groupId> | ||
<artifactId>spigot</artifactId> | ||
<version>1.15.2</version> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
26 changes: 26 additions & 0 deletions
26
1_15_2/src/main/java/org/plugins/rpghorses/v1_15_2/NMSHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.plugins.rpghorses.v1_15_2; | ||
|
||
import com.google.common.collect.Sets; | ||
import net.minecraft.server.v1_15_R1.EntityCreature; | ||
import net.minecraft.server.v1_15_R1.PathfinderGoalSelector; | ||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftEntity; | ||
import org.bukkit.entity.LivingEntity; | ||
import org.plugins.rpghorses.NMS; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
public class NMSHandler implements NMS { | ||
|
||
@Override | ||
public void removeBehaviour(LivingEntity entity) { | ||
EntityCreature creature = (EntityCreature) (((CraftEntity) entity).getHandle()); | ||
try { | ||
Field d = PathfinderGoalSelector.class.getDeclaredField("d"); | ||
d.setAccessible(true); | ||
d.set(creature.goalSelector, Sets.newLinkedHashSet()); | ||
d.set(creature.targetSelector, Sets.newLinkedHashSet()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>RPGHorses</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>API</artifactId> | ||
<groupId>org.plugins.rpghorses</groupId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot-api</artifactId> | ||
<version>1.15.2-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency></dependencies> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.plugins.rpghorses; | ||
|
||
import org.bukkit.entity.LivingEntity; | ||
|
||
public interface NMS { | ||
|
||
void removeBehaviour(LivingEntity entity); | ||
|
||
} |
Oops, something went wrong.