ru.cwcode.commands.paperplatform.argument.location.LocationPart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of PaperCommands Show documentation
Show all versions of PaperCommands Show documentation
Commands library for Paper (Minecraft)
The newest version!
package ru.cwcode.commands.paperplatform.argument.location;
import org.bukkit.Location;
import java.util.Collections;
import java.util.List;
public enum LocationPart {
X {
@Override
List getSuggestion(Location loc) {
return Collections.singletonList(String.valueOf(loc.getX()));
}
},
Y {
@Override
List getSuggestion(Location loc) {
return Collections.singletonList(String.valueOf(loc.getY()));
}
},
Z {
@Override
List getSuggestion(Location loc) {
return Collections.singletonList(String.valueOf(loc.getZ()));
}
},
PITCH {
@Override
List getSuggestion(Location loc) {
return Collections.singletonList(String.valueOf(loc.getPitch()));
}
},
YAW {
@Override
List getSuggestion(Location loc) {
return Collections.singletonList(String.valueOf(loc.getYaw()));
}
},
WORLD {
@Override
List getSuggestion(Location loc) {
return Collections.singletonList(loc.getWorld().getName());
}
};
List getSuggestion(Location loc) {
return Collections.emptyList();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy