mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-29 12:37:37 +01:00
Add setRange(...) and setRealisticLooking(...) to LookClose. Add getPose(...) to Pose.
This commit is contained in:
parent
330565340a
commit
3ceb5d884e
17
Citizens2.iml
Normal file
17
Citizens2.iml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -114,6 +114,14 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
|
||||
key.setBoolean("realisticlooking", realisticLooking);
|
||||
}
|
||||
|
||||
public void setRange(int range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public void setRealisticLooking(boolean realistic) {
|
||||
this.realisticLooking = realistic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean toggle() {
|
||||
enabled = !enabled;
|
||||
|
@ -63,6 +63,15 @@ public class Poses extends Trait {
|
||||
throw new CommandException(Messages.COMMAND_PAGE_MISSING);
|
||||
}
|
||||
|
||||
|
||||
public Pose getAnchor(String name) {
|
||||
for (Pose pose : poses.values())
|
||||
if (pose.getName().equalsIgnoreCase(name))
|
||||
return pose;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasPose(String pose) {
|
||||
return poses.containsKey(pose.toLowerCase());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user