当前位置: 首页>>代码示例>>Java>>正文


Java PlayerEvent.PlayerLoggedInEvent方法代码示例

本文整理汇总了Java中cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerEvent.PlayerLoggedInEvent方法的具体用法?Java PlayerEvent.PlayerLoggedInEvent怎么用?Java PlayerEvent.PlayerLoggedInEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cpw.mods.fml.common.gameevent.PlayerEvent的用法示例。


在下文中一共展示了PlayerEvent.PlayerLoggedInEvent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPlayerLogin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {

	event.player.addChatComponentMessage(new ChatComponentText("�b�lHello" + " " + "�e�l" + event.player.getDisplayName() + "�b�l!"));
	event.player.addChatComponentMessage(new ChatComponentText(/*/event.player.getDisplayName() + /*/"�a�l" + EpicProportionsMod.MODNAME + " " + "�2�lMade By:jtrent238"));
	event.player.addChatComponentMessage(new ChatComponentText(/*/event.player.getDisplayName() + /*/"�6�lYou are running" + "�b�l" + " " + EpicProportionsMod.MODVERSION + " " + "�6�lof" + "�6�l" + " " + EpicProportionsMod.MODNAME + "!"));
	//event.player.addChatComponentMessage(new ChatComponentText("�e�lLearn more at: �b�lhttp://bit.ly/FoodModWiki"));
	event.player.triggerAchievement(Achievements.achievementinstall);
	//event.player.addEntityCrashInfo(EpicProportionsMod.CRASHINFO);
	//event.player.clonePlayer(playerclone, true);
	event.player.extinguish();
	event.player.getDisplayName();
	//event.player.writeToNBT(EpicProportionsMod.NBTJOIN);
	event.player.getBedLocation();
	event.player.shouldHeal();
	event.getListenerList();
	event.hashCode();
	Minecraft.getSystemTime();
	Minecraft.isAmbientOcclusionEnabled();
	Minecraft.isGuiEnabled();
	Minecraft.getMinecraft();
	Minecraft.getGLMaximumTextureSize();
	Minecraft.isFancyGraphicsEnabled();
	//Log.getLog(arg0, arg1, arg2);
	//event.notifyAll();

	
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:29,代码来源:OnJoinEvent.java

示例2: playerLoginEvent

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void playerLoginEvent(PlayerEvent.PlayerLoggedInEvent event) {
    //event.player.addChatComponentMessage(new ChatComponentText("Hallo " + event.player.getDisplayName()));
    if (event.player == null) {
        return;
    }

    // DEBUG
    //event.player.addChatComponentMessage(new ChatComponentText("Your Player-Interfaces are: "));

    for (InterfaceRegistry.InterfaceDataContainer dataContainer : InterfaceRegistry.getInterfacesOfPlayer(event.player.getUniqueID())) {
        // DEBUG
        //event.player.addChatComponentMessage(new ChatComponentText(String.format("x: %d, y: %d, z: %d", dataContainer.x, dataContainer.y, dataContainer.z)));
        TileEntityPlayerInterface te = ((TileEntityPlayerInterface) DimensionManager.getWorld(dataContainer.dimensionID).getTileEntity(dataContainer.x, dataContainer.y, dataContainer.z));

        if (te != null) {
            te.bindPlayer(event.player.getUniqueID());
        }
    }
}
 
开发者ID:Dragon9815,项目名称:PlayerInterfaceMod,代码行数:21,代码来源:PlimEventHandler.java

示例3: onPlayerLogin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event)
{
	File file = new File(ConfigHandler.messageFile);

	if (file.lastModified() > lastModifiedTimestamp)
	{
		loginMessage = FileHelper.readFile(ConfigHandler.messageFile);
		lastModifiedTimestamp = file.lastModified();
	}

	if (loginMessage == null)
	{
		return;
	}

	new Timer().schedule(new MessageTask(loginMessage, event.player), ConfigHandler.messageDelay);
}
 
开发者ID:szernex,项目名称:YetAnotherLoginMessageMod,代码行数:19,代码来源:PlayerLoginHandler.java

示例4: onPlayerLogin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {
    System.out.println("world join ");
    if (!Basemod.vlcLoaded)//Display message in chat with link to vlc for arch
    {
        ChatStyle style = new ChatStyle().setUnderlined(true).setColor(EnumChatFormatting.GOLD);
        IChatComponent text = new ChatComponentText("You need to download VLC here to hear the radio ").setChatStyle(style);
        event.player.addChatComponentMessage(text);

        if (Basemod.is64bit) {//TODO detect platform (mac/linux/windogs)
            text = new ChatComponentText("http://download.videolan.org/pub/videolan/vlc/last/win64/vlc-2.1.3-win64.exe").setChatStyle(style);
        } else {
            text = new ChatComponentText("http://download.videolan.org/pub/videolan/vlc/last/win32/vlc-2.1.3-win32.exe").setChatStyle(style);
        }
        event.player.addChatComponentMessage(text);
    }
}
 
开发者ID:AnDwHaT5,项目名称:PixelUtilities,代码行数:18,代码来源:PUTickHandler.java

示例5: onEnterWorld

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onEnterWorld(PlayerEvent.PlayerLoggedInEvent event) {
	this.event = event;
	new Thread() {
		public void run() {
			try {
				String page = makeRequest("https://mods.io/mods/1089-smartcursor");
				int l = page.indexOf("<td><strong>");
				if (l < 0) throw new Exception("");
				int r = page.indexOf("</strong>", l + 10);
				if (r < 0) throw new Exception("");
				String localVersion = ModInfo.VERSION;
				String globalVersion = page.substring(l + 12, r);
				if (localVersion.compareToIgnoreCase(globalVersion) < 0) {
					UpdateManager.this.event.player.addChatComponentMessage(new ChatComponentText("SmartCursor is out-of-date. Your version - " + localVersion + ", latest version - " + globalVersion));
					UpdateManager.this.event.player.addChatComponentMessage(generateClickableMessage());
				}
			} catch (Exception e) {
				System.out.println("Unable to fetch information about updates!");
			}
		}
	}.start();
}
 
开发者ID:asaskevich,项目名称:SmartCursor,代码行数:24,代码来源:UpdateManager.java

示例6: onPlayerLogin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {
	if(ConfigurationHandler.displayAmount) {
		event.player.addChatMessage(new ChatComponentText("[AllTheThings] "+Reference.BLOCKS_ADDED+" blocks added"));
		event.player.addChatMessage(new ChatComponentText("[AllTheThings] "+Reference.ITEMS_ADDED+" items added"));
	}
	for (int i = 0; i < msgs.size(); i++) {
		event.player.addChatMessage(new ChatComponentText((String) msgs.get(i)));
	}
	/**
	book.setTagInfo("author", new NBTTagString("Shnupbups100"));
	book.setTagInfo("title", new NBTTagString(StatCollector.translateToLocal("book.allthethings:guidebook.title")));
	NBTTagList pages = new NBTTagList();
       pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.allthethings:guidebook.page1")));
       pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.allthethings:guidebook.page2")));
       pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.allthethings:guidebook.page3")));
       pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.allthethings:guidebook.page4")));
       book.setTagInfo("pages", pages);
	event.player.inventory.addItemStackToInventory(book);**/
}
 
开发者ID:OmgImAlexis,项目名称:TheStuffMod,代码行数:21,代码来源:PlayerLogin.java

示例7: playerLogin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void playerLogin(final PlayerEvent.PlayerLoggedInEvent event) {
    for (final String name : MinecraftServer.getServer().getAllUsernames()) {
        if (ItemAngelRing.curFlyingPlayers.containsKey(name)) {
            NetworkHandler.sendPacketToPlayer(new PacketAngelRingNotifier(name, ItemAngelRing.curFlyingPlayers.get(name)), event.player);
        }
        else {
            NetworkHandler.sendPacketToPlayer(new PacketAngelRingNotifier(name, 0), event.player);
        }
    }
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:12,代码来源:ItemAngelRing.java

示例8: onPlayerJoin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
/**
 * SERVERSIDE
 * 
 * @param pEvent
 */
@SubscribeEvent
public void onPlayerJoin( PlayerEvent.PlayerLoggedInEvent pEvent )
{
	if( pEvent.player instanceof EntityPlayerMP )
		sendClientUpdate( (EntityPlayerMP) pEvent.player );
}
 
开发者ID:GTNewHorizons,项目名称:EnhancedLootBags,代码行数:12,代码来源:LootGroupsHandler.java

示例9: onPlayerLog

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
  public void onPlayerLog(PlayerEvent.PlayerLoggedInEvent event)
  {
ServerPlayerBaseMagic player;
PacketLogIn packet;

event.player.triggerAchievement(AchievementList.LOGING);
player = Main.getPlayerServer((EntityPlayerMP) event.player);
packet = new PacketLogIn(player);
Packets.network.sendTo(packet, player.getPlayer());

for (Dungeon d : Main.DUNGEONS) //Install les maps du donjon
	d.install_map(event.player.worldObj.getWorldInfo().getWorldName());
  }
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:15,代码来源:ServerEvent.java

示例10: onJoinWorlds

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onJoinWorlds(PlayerEvent.PlayerLoggedInEvent e) {
     activePlayers.put(new PlayerID(e.player), (EntityPlayerMP)e.player);
     for (Acceptor<EntityPlayerMP> action: onLogin) {
         action.accept((EntityPlayerMP)e.player);
     }
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:8,代码来源:PlayerDetector.java

示例11: onPlayerLogin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent event) {
	if (TweetQuake.instance().isAuthRequired()&&isOp(event.player.getGameProfile())) {
		final ChatStyle style = new ChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/eewreciever auth start"));
		ChatBuilder.create("[EEWReciever2] Twitter認証が完了していません。クリックして開始する(Twitterアカウントが必要です").setStyle(style).sendPlayer(event.player);
	}
}
 
开发者ID:Team-Fruit,项目名称:EEWReciever,代码行数:8,代码来源:AuthNoticeHandler.java

示例12: onServerJoin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onServerJoin(PlayerEvent.PlayerLoggedInEvent event) {
	if (FMLCommonHandler.instance().getSide() == Side.SERVER || FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
		for (ConfigRegistry.ConfigProxy proxy : ConfigRegistry.configs) {
			if (proxy.doesSync)
				NETWORK.sendTo(new ConfigPacket(proxy.fileName, proxy.handler.convertToString(proxy.config), false), (EntityPlayerMP) event.player);
		}
}
 
开发者ID:austinv11,项目名称:CollectiveFramework,代码行数:9,代码来源:CollectiveFramework.java

示例13: onPlayerJoin

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerJoin( PlayerEvent.PlayerLoggedInEvent pEvent )
{
  if( pEvent.player instanceof EntityPlayerMP ) {
    sendClientUpdate(pEvent.player);
  }
}
 
开发者ID:GTNewHorizons,项目名称:NewHorizonsCoreMod,代码行数:8,代码来源:CustomToolTipsHandler.java

示例14: checkUpdate

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void checkUpdate(PlayerEvent.PlayerLoggedInEvent event) {
	if(VendingMachineConfigs.checkUpdate) {
		if(status==Status.OUTDATED) {
			EntityPlayer player = event.player;
			player.addChatComponentMessage(new ChatComponentTranslation("vendingmachine.update"));
			IChatComponent component = IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("vendingmachine.update.download"));
			player.addChatMessage(component);
		}
	}
}
 
开发者ID:aziascreations,项目名称:Minecraft-Vending-Machine-Revamped,代码行数:12,代码来源:VendingMachineVersion.java

示例15: onPlayerLoggedIn

import cpw.mods.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event)
{
    StatsHelper stats = StatsHelper.get(event.player);

    if (Configs.Mod.disableVersionCheck)
        event.player.addChatMessage(new ChatComponentText(UpdateHandler.status));
}
 
开发者ID:Kithio,项目名称:Thallus,代码行数:9,代码来源:PlayerEventHandler.java


注:本文中的cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。