mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
Fixes
This commit is contained in:
parent
986250543e
commit
43562580d6
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>bytecode.ninja</groupId>
|
||||
<artifactId>Iris</artifactId>
|
||||
<version>1.0.22</version>
|
||||
<version>1.0.23</version>
|
||||
<name>Iris</name>
|
||||
<properties>
|
||||
<skip.copy>false</skip.copy>
|
||||
|
@ -10,37 +10,37 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class CitizensLink
|
||||
{
|
||||
public CitizensLink()
|
||||
{
|
||||
public CitizensLink()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public boolean supported()
|
||||
{
|
||||
return getCitizens() != null;
|
||||
}
|
||||
public boolean supported()
|
||||
{
|
||||
return getCitizens() != null;
|
||||
}
|
||||
|
||||
public Entity spawn(EntityType name, Location a)
|
||||
{
|
||||
if(!supported())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public Entity spawn(EntityType type, String npcType, Location a)
|
||||
{
|
||||
if(!supported())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
NPC npc = CitizensAPI.getNPCRegistry().createNPC(name, "");
|
||||
npc.spawn(a);
|
||||
return npc.getEntity();
|
||||
}
|
||||
NPC npc = CitizensAPI.getNPCRegistry().createNPC(type, "");
|
||||
npc.spawn(a);
|
||||
return npc.getEntity();
|
||||
}
|
||||
|
||||
public Plugin getCitizens()
|
||||
{
|
||||
Plugin p = Bukkit.getPluginManager().getPlugin("Citizens");
|
||||
public Plugin getCitizens()
|
||||
{
|
||||
Plugin p = Bukkit.getPluginManager().getPlugin("Citizens");
|
||||
|
||||
if(p == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(p == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ public class IrisEntity extends IrisRegistrant
|
||||
|
||||
if(isCitizens())
|
||||
{
|
||||
return Iris.linkCitizens.spawn(getType(), at);
|
||||
// TODO: return Iris.linkCitizens.spawn(getType(), at); SPAWN SOME TYPE TOO
|
||||
}
|
||||
|
||||
return at.getWorld().spawnEntity(at, getType());
|
||||
@ -308,6 +308,8 @@ public class IrisEntity extends IrisRegistrant
|
||||
|
||||
public boolean isCitizens()
|
||||
{
|
||||
return Iris.linkCitizens.supported(); // TODO Need to determine how to tell if entity needs to be Citizen NPC (eg. getCitizensType())
|
||||
return false;
|
||||
|
||||
// TODO: return Iris.linkCitizens.supported() && someType is not empty;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user