mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-28 20:17:50 +01:00
Add powermock as a testing dependency
This commit is contained in:
parent
5ce050ec86
commit
18d9853f00
35
pom.xml
35
pom.xml
@ -14,6 +14,7 @@
|
|||||||
<craftbukkit.version>LATEST</craftbukkit.version>
|
<craftbukkit.version>LATEST</craftbukkit.version>
|
||||||
<citizensapi.version>2.0.4-SNAPSHOT</citizensapi.version>
|
<citizensapi.version>2.0.4-SNAPSHOT</citizensapi.version>
|
||||||
<vault.version>1.2.18-SNAPSHOT</vault.version>
|
<vault.version>1.2.18-SNAPSHOT</vault.version>
|
||||||
|
<powermock.version>1.4.12</powermock.version>
|
||||||
<build.number>Unknown</build.number>
|
<build.number>Unknown</build.number>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@ -26,20 +27,20 @@
|
|||||||
<id>everything</id>
|
<id>everything</id>
|
||||||
<url>http://repo.citizensnpcs.com</url>
|
<url>http://repo.citizensnpcs.com</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>vault-repo</id>
|
<id>vault-repo</id>
|
||||||
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.milkbowl.vault</groupId>
|
<groupId>net.milkbowl.vault</groupId>
|
||||||
<artifactId>Vault</artifactId>
|
<artifactId>Vault</artifactId>
|
||||||
<version>${vault.version}</version>
|
<version>${vault.version}</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
@ -54,6 +55,18 @@
|
|||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.powermock</groupId>
|
||||||
|
<artifactId>powermock-module-junit4</artifactId>
|
||||||
|
<version>${powermock.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.powermock</groupId>
|
||||||
|
<artifactId>powermock-api-mockito</artifactId>
|
||||||
|
<version>${powermock.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<url>http://www.citizensnpcs.com</url>
|
<url>http://www.citizensnpcs.com</url>
|
||||||
|
@ -33,7 +33,6 @@ import org.bukkit.util.Vector;
|
|||||||
|
|
||||||
public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||||
private final CitizensNPC npc;
|
private final CitizensNPC npc;
|
||||||
|
|
||||||
private net.minecraft.server.ItemStack[] previousEquipment = { null, null, null, null, null };
|
private net.minecraft.server.ItemStack[] previousEquipment = { null, null, null, null, null };
|
||||||
|
|
||||||
public EntityHumanNPC(MinecraftServer minecraftServer, World world, String string,
|
public EntityHumanNPC(MinecraftServer minecraftServer, World world, String string,
|
||||||
@ -46,11 +45,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
initialise(minecraftServer);
|
initialise(minecraftServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void bf() {
|
|
||||||
super.bf();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float by() {
|
public float by() {
|
||||||
return super.by() * npc.getNavigator().getDefaultParameters().speed();
|
return super.by() * npc.getNavigator().getDefaultParameters().speed();
|
||||||
@ -131,11 +125,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
updateEquipment();
|
updateEquipment();
|
||||||
Navigation navigation = getNavigation();
|
|
||||||
if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON)
|
if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON)
|
||||||
motX = motY = motZ = 0;
|
motX = motY = motZ = 0;
|
||||||
|
|
||||||
NMS.updateSenses(this);
|
NMS.updateSenses(this);
|
||||||
|
Navigation navigation = getNavigation();
|
||||||
if (!navigation.f()) {
|
if (!navigation.f()) {
|
||||||
navigation.e();
|
navigation.e();
|
||||||
moveOnCurrentHeading();
|
moveOnCurrentHeading();
|
||||||
|
Loading…
Reference in New Issue
Block a user