本文整理汇总了Java中com.dsh105.echopet.compat.api.util.menu.PetMenu类的典型用法代码示例。如果您正苦于以下问题:Java PetMenu类的具体用法?Java PetMenu怎么用?Java PetMenu使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PetMenu类属于com.dsh105.echopet.compat.api.util.menu包,在下文中一共展示了PetMenu类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onInteract
import com.dsh105.echopet.compat.api.util.menu.PetMenu; //导入依赖的package包/类
public boolean onInteract(Player p) {
if(p.getUniqueId().equals(getPlayerOwner().getUniqueId())){
// if (IdentUtil.areIdentical(p, getPlayerOwner())) {
if (EchoPet.getConfig().getBoolean("pets." + this.getPet().getPetType().toString().toLowerCase().replace("_", " ") + ".interactMenu", true) && Perm.BASE_MENU.hasPerm(this.getPlayerOwner(), false, false)) {
new PetMenu(getPet()).open(false);
}
return true;
}
return false;
}
示例2: openPetDataMenu
import com.dsh105.echopet.compat.api.util.menu.PetMenu; //导入依赖的package包/类
/**
* Opens the Pet Data GUI Menu
*
* @param player {@link org.bukkit.entity.Player} to view the Menu
* @param sendMessage defines if the plugin sends a message to the target {@link org.bukkit.entity.Player}
*/
public void openPetDataMenu(Player player, boolean sendMessage) {
IPet pet = EchoPet.getManager().getPet(player);
if (pet == null) {
return;
}
new PetMenu(pet).open(sendMessage);
}
示例3: onInteract
import com.dsh105.echopet.compat.api.util.menu.PetMenu; //导入依赖的package包/类
public boolean onInteract(Player p){
if(p.getUniqueId().equals(getPlayerOwner().getUniqueId())){
// if (IdentUtil.areIdentical(p, getPlayerOwner())) {
if(EchoPet.getConfig().getBoolean("pets." + this.getPet().getPetType().toString().toLowerCase().replace("_", " ") + ".interactMenu", true) && Perm.BASE_MENU.hasPerm(this.getPlayerOwner(), false, false)){
new PetMenu(getPet()).open(false);
}
return true;
}
return false;
}
示例4: openPetDataMenu
import com.dsh105.echopet.compat.api.util.menu.PetMenu; //导入依赖的package包/类
/**
* Opens the Pet Data GUI Menu
*
* @param player {@link org.bukkit.entity.Player} to view the Menu
* @param sendMessage defines if the plugin sends a message to the target {@link org.bukkit.entity.Player}
*/
public void openPetDataMenu(Player player, boolean sendMessage) {
IPet pet = EchoPet.getManager().getPet(player);
if (pet == null) {
return;
}
ArrayList<MenuOption> options = MenuUtil.createOptionList(pet.getPetType());
PetMenu menu = new PetMenu(pet, options, pet.getPetType() == PetType.HORSE ? 18 : 9);
menu.open(sendMessage);
}
示例5: onInteract
import com.dsh105.echopet.compat.api.util.menu.PetMenu; //导入依赖的package包/类
@Override
public boolean onInteract(Player p) {
if (p.getUniqueId().equals(getPlayerOwner().getUniqueId())) {
if (EchoPet.getConfig().getBoolean("pets." + this.getPet().getPetType().toString().toLowerCase().replace("_", " ") + ".interactMenu", true) && Perm.BASE_MENU.hasPerm(this.getPlayerOwner(), false, false)) {
ArrayList<MenuOption> options = MenuUtil.createOptionList(getPet().getPetType());
int size = this.getPet().getPetType() == PetType.HORSE ? 18 : 9;
PetMenu menu = new PetMenu(getPet(), options, size);
menu.open(false);
}
return true;
}
return false;
}