本文整理汇总了Java中com.massivecraft.factions.Factions类的典型用法代码示例。如果您正苦于以下问题:Java Factions类的具体用法?Java Factions怎么用?Java Factions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Factions类属于com.massivecraft.factions包,在下文中一共展示了Factions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getCmdFactions
import com.massivecraft.factions.Factions; //导入依赖的package包/类
public com.massivecraft.factions.cmd.CmdFactions getCmdFactions() {
if (this.cmdFactionsInstance == null) {
try {
Method getMethod = com.massivecraft.factions.Factions.class.getMethod("get");
Factions factionsInstance = (Factions) getMethod.invoke(null);
Field field = com.massivecraft.factions.Factions.class.getDeclaredField("outerCmdFactions");
field.setAccessible(true);
this.cmdFactionsInstance = (com.massivecraft.factions.cmd.CmdFactions) field.get(factionsInstance);
} catch(Exception e) {
FactionsFramework.get().err(e);
return null;
}
}
return this.cmdFactionsInstance;
}
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:20,代码来源:CommandManager_2_7.java
示例2: getCmdFactions
import com.massivecraft.factions.Factions; //导入依赖的package包/类
public com.massivecraft.factions.cmd.CmdFactions getCmdFactions() {
if (this.cmdFactionsInstance == null) {
try {
Method getMethod = com.massivecraft.factions.Factions.class.getMethod("get");
Factions factionsInstance = (Factions) getMethod.invoke(null);
Field field = com.massivecraft.factions.Factions.class.getDeclaredField("outerCmdFactions");
field.setAccessible(true);
this.cmdFactionsInstance = (com.massivecraft.factions.cmd.CmdFactions) field.get(factionsInstance);
} catch(Exception e) {
FactionsFramework.get().err(e);
return null;
}
}
return this.cmdFactionsInstance;
}
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:20,代码来源:CommandManager_2_8_6.java
示例3: add
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public void add(FactionsCommand command) {
Command_2_8_2 nativeCommand = new Command_2_8_2(command);
this.cmdMap.put(command, nativeCommand);
Factions.get().getOuterCmdFactions().addSubCommand(nativeCommand);
}
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:9,代码来源:CommandManager_2_8_2.java
示例4: onClaim
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onClaim(LandUnclaimAllEvent event) {
Multimap<String, ChunkPos> claims = HashMultimap.create();
flocationIds.entrySet().stream()
.filter(entry -> entry.getValue().getHostFaction() == event.getFaction())
.forEach(entry -> claims.put(event.getFactionId(), getChunkPos(entry.getKey())));
callEvent(new FactionClaimEvent(Factions.i.getNone().getId(), claims));
}
开发者ID:novucs,项目名称:factions-top,代码行数:11,代码来源:Factions0108.java
示例5: onEnable
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public void onEnable() {
getOrRegisterDownloadPerm();
getServer().getPluginManager().registerEvents(this, this);
try {
class StringPlotter extends Plotter {
public StringPlotter(String str) {
super(str);
}
@Override
public int getValue() {
return 1;
}
}
Metrics metrics = new Metrics(this);
Graph factionsVersionGraph = metrics.createGraph("factionsVersion");
String factionsVersion = getProvidingPlugin(Factions.class)
.getDescription().getFullName();
factionsVersionGraph.addPlotter(new StringPlotter(factionsVersion));
Graph massiveCoreVersionGraph = metrics.createGraph("massiveCoreVersion");
String massiveCoreVersion = getProvidingPlugin(MassiveCore.class)
.getDescription().getFullName();
massiveCoreVersionGraph.addPlotter(new StringPlotter(massiveCoreVersion));
Graph wdlcVersionGraph = metrics.createGraph("wdlcompanionVersion");
String wdlcVersion = getProvidingPlugin(IRangeProducer.class)
.getDescription().getFullName();
wdlcVersionGraph.addPlotter(new StringPlotter(wdlcVersion));
metrics.start();
} catch (Exception e) {
getLogger().warning("Failed to start PluginMetrics :(");
}
}
开发者ID:Pokechu22,项目名称:WDLCompanion-Factions,代码行数:41,代码来源:FactionsSupportPlugin.java
示例6: FactionsHandler
import com.massivecraft.factions.Factions; //导入依赖的package包/类
public FactionsHandler(Factions plugin) {
this.plugin = plugin;
if (plugin != null) {
Bukkit.getPluginManager().registerEvents(new FactionsListener(), Gringotts.G);
Gringotts.G.registerAccountHolderProvider("faction", this);
}
}
开发者ID:sakunc,项目名称:Gringotts-,代码行数:9,代码来源:FactionsHandler.java
示例7: checkHook
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public boolean checkHook() {
Plugin plugin = Bukkit.getPluginManager().getPlugin("Factions");
if (plugin != null && plugin instanceof Factions) {
Zephyrus.getPlugin().getLogger().info("[Plugin Hooks] Found and hooked Factions");
return true;
}
return false;
}
开发者ID:mcardy,项目名称:Zephyrus-II,代码行数:10,代码来源:FactionsHook.java
示例8: canLoad
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public boolean canLoad() {
Plugin plugin = Bukkit.getPluginManager().getPlugin("Factions");
if (plugin != null && plugin instanceof Factions) {
return true;
}
return false;
}
开发者ID:mcardy,项目名称:ProtectionsLib,代码行数:9,代码来源:FactionsProtection.java
示例9: setupFactions
import com.massivecraft.factions.Factions; //导入依赖的package包/类
public void setupFactions() {
Factions factions = ( Factions ) Bukkit.getPluginManager().getPlugin( "Factions" );
if ( factions != null ) {
if ( !factions.getDescription().getVersion().startsWith( "1" ) ) {
Bukkit.getConsoleSender().sendMessage( ChatColor.GREEN + "Factions detected, hooking in!" );
factionChat = true;
getCommand( "factionchat" ).setExecutor( new FactionChatCommand() );
getCommand( "factionchatally" ).setExecutor( new FactionChatAllyCommand() );
getCommand( "factionchatfaction" ).setExecutor( new FactionChatFactionCommand() );
}
}
}
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:13,代码来源:BungeeSuiteChat.java
示例10: isInClaimedLand
import com.massivecraft.factions.Factions; //导入依赖的package包/类
public static boolean isInClaimedLand(Location l) {
Faction f = BoardColl.get().getFactionAt(PS.valueOf(l));
if (f == null)
return false;
String id = f.getId();
if (id.equals(Factions.ID_NONE) || id.equals(Factions.ID_SAFEZONE) || id.equals(Factions.ID_WARZONE)) {
return false;
}
return true;
}
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:11,代码来源:FactionUtils.java
示例11: setupFactions
import com.massivecraft.factions.Factions; //导入依赖的package包/类
private void setupFactions() {
if (config.Settings_Factions) {
Plugin fPlugin = getServer().getPluginManager().getPlugin("Factions");
if (fPlugin != null && fPlugin instanceof Factions) {
factions = (Factions)fPlugin;
getLogger().info("Factions detected. Enabling Factions Chat.");
} else {
factions = null;
getLogger().info("Factions not found. Factions Chat disabled.");
}
} else {
factions = null;
}
}
开发者ID:ptoal,项目名称:PwnChat,代码行数:15,代码来源:PwnChat.java
示例12: remove
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public void remove(FactionsCommand command) {
Factions.get().getOuterCmdFactions().removeSubCommand(this.cmdMap.get(command));
this.cmdMap.remove(command);
}
开发者ID:markhughes,项目名称:FactionsFramework,代码行数:6,代码来源:CommandManager_2_8_2.java
示例13: getFactionAt
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public String getFactionAt(String worldName, int chunkX, int chunkZ) {
Faction faction = BoardColl.get().getFactionAt(PS.valueOf(worldName, chunkX, chunkZ));
return faction == null ? Factions.ID_NONE : faction.getId();
}
开发者ID:novucs,项目名称:factions-top,代码行数:6,代码来源:Factions0207.java
示例14: getFactionName
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public String getFactionName(String factionId) {
return Factions.i.get(factionId).getTag();
}
开发者ID:novucs,项目名称:factions-top,代码行数:5,代码来源:Factions0108.java
示例15: isFaction
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public boolean isFaction(String factionId) {
return Factions.i.get(factionId) != null;
}
开发者ID:novucs,项目名称:factions-top,代码行数:5,代码来源:Factions0108.java
示例16: getRelation
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public ChatColor getRelation(Player player, String factionId) {
FPlayer fplayer = FPlayers.i.get(player);
Faction faction = Factions.i.get(factionId);
return fplayer.getFaction().getRelationTo(faction).getColor();
}
开发者ID:novucs,项目名称:factions-top,代码行数:7,代码来源:Factions0108.java
示例17: getOwnerName
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public String getOwnerName(String factionId) {
FPlayer owner = Factions.i.get(factionId).getFPlayerLeader();
return owner == null ? null : owner.getName();
}
开发者ID:novucs,项目名称:factions-top,代码行数:6,代码来源:Factions0108.java
示例18: getMembers
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public List<UUID> getMembers(String factionId) {
return Factions.i.get(factionId).getFPlayers().stream()
.map(fplayer -> UUID.fromString(fplayer.getId()))
.collect(Collectors.toList());
}
开发者ID:novucs,项目名称:factions-top,代码行数:7,代码来源:Factions0108.java
示例19: getFactionIds
import com.massivecraft.factions.Factions; //导入依赖的package包/类
@Override
public Set<String> getFactionIds() {
return Factions.i.getMap().keySet();
}
开发者ID:novucs,项目名称:factions-top,代码行数:5,代码来源:Factions0108.java
示例20: isInFaction
import com.massivecraft.factions.Factions; //导入依赖的package包/类
public boolean isInFaction() {
MPlayer mPlayer = MPlayer.get((Object) player);
Faction faction = mPlayer.getFaction();
String id = faction.getId();
return !(id.equals(Factions.ID_NONE) || id.equals(Factions.ID_SAFEZONE) || id.equals(Factions.ID_WARZONE));
}
开发者ID:bobmandude9889,项目名称:iZenith-PVP,代码行数:7,代码来源:IPlayer.java
注:本文中的com.massivecraft.factions.Factions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论