Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Commit

Permalink
1.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcl committed Jan 11, 2017
1 parent 9ef2fdb commit c2f624c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ group= "com.bebehp.mc.eewreciever" // http://maven.apache.org/guides/mini/guide-
archivesBaseName = "EEWReciever"

minecraft {
version = "1.10.2-12.18.1.2011"
version = "1.11.2-13.20.0.2206"
runDir = "eclipse"
mappings = "snapshot_20160518"
mappings = "snapshot_20161220"
}

jar {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/bebehp/mc/eewreciever/ChatUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
public abstract class ChatUtil {
public static void sendPlayerChat(final ICommandSender target, final ITextComponent... components) {
for (final ITextComponent line : components) {
target.addChatMessage(line);
target.sendMessage(line);
}
}

public static void sendServerChat(final ITextComponent... components) {
final PlayerList player = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList();

for (final ITextComponent line : components) {
player.sendChatMsg(line);
player.sendMessage(line);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public class ClientAuthChecker {
@SubscribeEvent
public void onTick(final ClientTickEvent event) {
final Minecraft mc = Minecraft.getMinecraft();
if (EEWRecieverMod.accessToken == null && notification && mc.isSingleplayer() && event.phase == Phase.END && mc.thePlayer != null) {
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
player.addChatComponentMessage(ChatUtil.byText("[EEWReciever]Twitter連携認証(緊急地震速報)がされていません!"));
player.addChatComponentMessage(ChatUtil.byText("/eew setup でセットアップを開始します"));
player.addChatComponentMessage(ChatUtil.byText("Twitter連携を無効にするには、configを変更し再起動して下さい"));
if (EEWRecieverMod.accessToken==null&&notification&&mc.isSingleplayer()&&event.phase==Phase.END&&mc.player!=null) {
final EntityPlayer player = Minecraft.getMinecraft().player;
player.sendMessage(ChatUtil.byText("[EEWReciever]Twitter連携認証(緊急地震速報)がされていません!"));
player.sendMessage(ChatUtil.byText("/eew setup でセットアップを開始します"));
player.sendMessage(ChatUtil.byText("Twitter連携を無効にするには、configを変更し再起動して下さい"));
notification = false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ public EEWCommandBase(final TweetQuakeSetup tweetQuakeSetup) {
}

@Override
public String getCommandName() {
public String getName() {
return "eewreciever";
}

@Override
public List<String> getCommandAliases() {
public List<String> getAliases() {
return Arrays.asList("eew");
}

@Override
public abstract int getRequiredPermissionLevel();

@Override
public String getCommandUsage(final ICommandSender icommandsender) {
public String getUsage(final ICommandSender icommandsender) {
return "/eewreciever Tipe <Text>";
}

Expand Down Expand Up @@ -208,7 +208,7 @@ public void execute(final MinecraftServer server, final ICommandSender icommands
}

@Override
public List<String> getTabCompletionOptions(final MinecraftServer server, final ICommandSender sender, final String[] astring, @Nullable final BlockPos pos) {
public List<String> getTabCompletions(final MinecraftServer server, final ICommandSender sender, final String[] astring, @Nullable final BlockPos pos) {
if (astring.length<=1&&(ConfigurationHandler.debugMode||!limitInDebugMode())) {
return getListOfStringsMatchingLastWord(astring, "p2p", "twitter", "setup", "deletesettings", "enable", "disable");
} else if (astring.length==1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ public class ServerAuthChecker {
@SideOnly(Side.SERVER)
@SubscribeEvent
public void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent event) {
final String name = event.player.getGameProfile().getName();
final String name = event.player.getGameProfile().getName();
if (notification) {
if (isOP(name)) {
event.player.addChatComponentMessage(ChatUtil.byText("[EEWReciever]Twitter連携認証(緊急地震速報)がされていません!"));
event.player.addChatComponentMessage(ChatUtil.byText("/eew setup でセットアップを開始します"));
event.player.addChatComponentMessage(ChatUtil.byText("Twitter連携を無効にするには、configを変更し再起動して下さい"));
event.player.sendMessage(ChatUtil.byText("[EEWReciever]Twitter連携認証(緊急地震速報)がされていません!"));
event.player.sendMessage(ChatUtil.byText("/eew setup でセットアップを開始します"));
event.player.sendMessage(ChatUtil.byText("Twitter連携を無効にするには、configを変更し再起動して下さい"));
} else {
event.player.addChatComponentMessage(ChatUtil.byText("[EEWReciever]Setupされていません。OPに連絡して下さい。"));
event.player.sendMessage(ChatUtil.byText("[EEWReciever]Setupされていません。OPに連絡して下さい。"));
}
}
}

private boolean isOP(final String name) {
final String[] opPlayers = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getOppedPlayerNames();
for (final String line : opPlayers) {
if (line == name)
if (line==name)
return true;
}
return false;
Expand Down

0 comments on commit c2f624c

Please sign in to comment.