本文整理汇总了Java中com.elmakers.mine.bukkit.api.magic.Mage.sendDebugMessage方法的典型用法代码示例。如果您正苦于以下问题:Java Mage.sendDebugMessage方法的具体用法?Java Mage.sendDebugMessage怎么用?Java Mage.sendDebugMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.elmakers.mine.bukkit.api.magic.Mage
的用法示例。
在下文中一共展示了Mage.sendDebugMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: finish
import com.elmakers.mine.bukkit.api.magic.Mage; //导入方法依赖的package包/类
@Override
public void finish() {
if (finished) return;
finished = true;
Mage mage = getMage();
if (finishedHandlers != null) {
for (ActionHandlerContext context : finishedHandlers) {
context.finish();
}
finishedHandlers = null;
}
if (undoSpell != null && undoSpell.isUndoable())
{
if (!undoList.isScheduled())
{
getController().update(undoList);
}
mage.registerForUndo(undoList);
}
result = result.max(initialResult);
if (spell != null) {
mage.sendDebugMessage(ChatColor.WHITE + "Finish " + ChatColor.GOLD + spell.getName() + ChatColor.WHITE + ": " + ChatColor.AQUA + result.name().toLowerCase(), 2);
spell.finish(this);
}
String resultName = result.name().toLowerCase();
castMessageKey(resultName + "_finish");
playEffects(resultName + "_finish");
}
示例2: target
import com.elmakers.mine.bukkit.api.magic.Mage; //导入方法依赖的package包/类
public Target target(CastContext context, double range)
{
if (source == null)
{
source = context.getEyeLocation();
}
target = findTarget(context, range);
if (targetLocationOffset != null) {
target.add(targetLocationOffset);
}
if (targetDirectionOverride != null) {
target.setDirection(targetDirectionOverride);
}
if (targetLocationWorldName != null && targetLocationWorldName.length() > 0) {
Location location = target.getLocation();
if (location != null) {
World targetWorld = location.getWorld();
target.setWorld(ConfigurationUtils.overrideWorld(targetLocationWorldName, targetWorld, context.getController().canCreateWorlds()));
}
}
Mage mage = context.getMage();
if (mage != null && mage.getDebugLevel() > 15)
{
Location targetLocation = target.getLocation();
String message = ChatColor.GREEN + "Targeted from " + ChatColor.GRAY + source.getBlockX() +
ChatColor.DARK_GRAY + "," + ChatColor.GRAY + source.getBlockY() +
ChatColor.DARK_GRAY + "," + ChatColor.GRAY + source.getBlockZ() +
ChatColor.DARK_GREEN + " with range of " + ChatColor.GREEN + range + ChatColor.DARK_GREEN + ": " +
ChatColor.GOLD + result;
Entity targetEntity = target.getEntity();
if (targetEntity != null) {
message = message + ChatColor.DARK_GREEN + " (" + ChatColor.YELLOW + targetEntity.getType() + ChatColor.DARK_GREEN + ")";
}
if (targetLocation != null) {
message = message + ChatColor.DARK_GREEN + " (" + ChatColor.LIGHT_PURPLE + targetLocation.getBlock().getType() + ChatColor.DARK_GREEN + ")";
message = message + ChatColor.DARK_GREEN + " at " +
ChatColor.GRAY + targetLocation.getBlockX() +
ChatColor.DARK_GRAY + "," + ChatColor.GRAY + targetLocation.getBlockY() +
ChatColor.DARK_GRAY + "," + ChatColor.GRAY + targetLocation.getBlockZ();
}
mage.sendDebugMessage(message);
}
return target;
}