本文整理汇总了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();
}
示例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());
}
}
}
示例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);
}
示例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);
}
}
示例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();
}
示例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);**/
}
示例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);
}
}
}
示例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 );
}
示例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());
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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));
}