diff --git a/.metadata/.log b/.metadata/.log index c2fa4a4..61b1a9f 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -10935,3 +10935,25 @@ java.lang.StringIndexOutOfBoundsException: String index out of range: -10 at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:129) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166) +!SESSION 2015-11-16 20:42:47.680 ----------------------------------------------- +eclipse.buildId=M20130204-1200 +java.version=1.8.0_45 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=hu_HU +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2015-11-16 20:43:27.091 +!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level +Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory. +The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in +this system level configuration. The Git installation location can be configured on the +Team > Git > Configuration preference page's 'System Settings' tab. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.egit.ui 2 0 2015-11-16 20:43:27.766 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\Norbi'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. diff --git a/.metadata/.mylyn/.tasks.xml.zip b/.metadata/.mylyn/.tasks.xml.zip index f2af9e1..6fee973 100644 Binary files a/.metadata/.mylyn/.tasks.xml.zip and b/.metadata/.mylyn/.tasks.xml.zip differ diff --git a/.metadata/.mylyn/tasks.xml.zip b/.metadata/.mylyn/tasks.xml.zip index 4df978e..7497b68 100644 Binary files a/.metadata/.mylyn/tasks.xml.zip and b/.metadata/.mylyn/tasks.xml.zip differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/TheButtonAutoFlair/.indexes/e4/77/69/e/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/TheButtonAutoFlair/.indexes/e4/77/69/e/history.index index b3730c3..d18a891 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/TheButtonAutoFlair/.indexes/e4/77/69/e/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/TheButtonAutoFlair/.indexes/e4/77/69/e/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version index f76dd23..25cb955 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index c71f01b..3398742 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version index f76dd23..6b2aaa7 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index 4de6ebd..f0ef506 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index d4b2b01..a5bef47 100644 --- a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -236,7 +236,7 @@ categoryTag:Help - + newtablook org.eclipse.e4.primaryDataStack EditorStack @@ -265,18 +265,24 @@ removeOnHide - - Editor - org.eclipse.jdt.ui.CompilationUnitEditor - removeOnHide - - - + Editor org.eclipse.jdt.ui.CompilationUnitEditor removeOnHide activeOnClose + + + Editor + org.eclipse.jdt.ui.CompilationUnitEditor + removeOnHide + + + + Editor + org.eclipse.jdt.ui.CompilationUnitEditor + removeOnHide + @@ -445,18 +451,18 @@ Draggable - - - - - - - - - - - - + + + + + + + + + + + + toolbarSeparator @@ -464,38 +470,38 @@ Draggable - - - + + + Draggable - - + + Draggable - - + + Draggable - - + + Draggable - - - - + + + + Draggable - - - - + + + + Draggable @@ -505,20 +511,20 @@ Draggable - - - - + + + + Draggable - - - - - - - + + + + + + + Draggable @@ -536,15 +542,15 @@ Draggable - - - - - - - - - + + + + + + + + + toolbarSeparator @@ -556,8 +562,8 @@ Draggable - - + + stretch diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1508644233.index b/.metadata/.plugins/org.eclipse.jdt.core/1508644233.index index 771fc29..6744a3b 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/1508644233.index and b/.metadata/.plugins/org.eclipse.jdt.core/1508644233.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps index 54a36b7..16410e6 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps and b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt index c98f0c4..1d11738 100644 --- a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -1,11 +1,11 @@ INDEX VERSION 1.126+D:\Z - Norbi cucca\0 Projektek\TheButtonMCAutoFlairProto\Spigot plugin\.metadata\.plugins\org.eclipse.jdt.core -3656756579.index +1508644233.index 3089967703.index 2674037006.index 323251068.index 355369697.index -3716007315.index 1934142626.index +3716007315.index 678131303.index 1045485630.index 605290374.index @@ -24,4 +24,4 @@ INDEX VERSION 1.126+D:\Z - Norbi cucca\0 Projektek\TheButtonMCAutoFlairProto\Spi 994834796.index 3954291735.index 3045053200.index -1508644233.index +3656756579.index diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml index d338053..a4ee3cb 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml and b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml index fad35dc..287b3e0 100644 --- a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml +++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -1,7 +1,5 @@ - - @@ -33,7 +31,6 @@ - @@ -45,7 +42,6 @@ - @@ -60,4 +56,8 @@ + + + + diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml index d583793..25ae4e8 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -76,4 +76,5 @@ + \ No newline at end of file diff --git a/TheButtonAutoFlair.jar b/TheButtonAutoFlair.jar index eda4202..e954825 100644 Binary files a/TheButtonAutoFlair.jar and b/TheButtonAutoFlair.jar differ diff --git a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/Commands.class b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/Commands.class index 132f518..d6bb98f 100644 Binary files a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/Commands.class and b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/Commands.class differ diff --git a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PlayerListener.class b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PlayerListener.class index 8e1259c..441e545 100644 Binary files a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PlayerListener.class and b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PlayerListener.class differ diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java index d85614f..f3bde9a 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/Commands.java @@ -28,8 +28,8 @@ public class Commands implements CommandExecutor { case "u": { if (args.length < 1) return false; - MaybeOfflinePlayer p = MaybeOfflinePlayer.GetFromName(player - .getName()); // 2015.08.08. + MaybeOfflinePlayer p = MaybeOfflinePlayer.AllPlayers.get(player + .getUniqueId()); // 2015.08.08. if (!p.CommentedOnReddit && !args[0].toLowerCase().equals("admin") && !args[0].toLowerCase().equals("ignore")) { diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java index 443f012..e7a59ca 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Random; import java.util.Timer; +import java.util.TimerTask; import java.util.UUID; public class PlayerListener implements Listener { // 2015.07.16. @@ -116,8 +117,8 @@ public class PlayerListener implements Listener { // 2015.07.16. @EventHandler public void onPlayerChat(AsyncPlayerChatEvent event) { - MaybeOfflinePlayer player = MaybeOfflinePlayer.GetFromName(event - .getPlayer().getName()); + MaybeOfflinePlayer player = MaybeOfflinePlayer.AllPlayers.get(event + .getPlayer().getUniqueId()); String flair = player.Flair; // 2015.08.08. if (player.IgnoredFlair) flair = ""; @@ -221,23 +222,12 @@ public class PlayerListener implements Listener { // 2015.07.16. private boolean ActiveF = false; private int FCount = 0; - private long FTime; @EventHandler public void onPlayerMessage(AsyncPlayerChatEvent e) { - if (ActiveF) { - if (System.currentTimeMillis() - FTime > 10000) { - ActiveF = false; - for (Player p : PluginMain.GetPlayers()) { - p.sendMessage("§b" + FCount + " " - + (FCount == 1 ? "person" : "people") - + " paid their respects.§r"); - } - } - } if (e.getMessage().equalsIgnoreCase("F")) { - MaybeOfflinePlayer mp = MaybeOfflinePlayer.GetFromName(e - .getPlayer().getName()); + MaybeOfflinePlayer mp = MaybeOfflinePlayer.AllPlayers.get(e + .getPlayer().getUniqueId()); if (!mp.PressedF && ActiveF) { FCount++; mp.PressedF = true; @@ -302,19 +292,37 @@ public class PlayerListener implements Listener { // 2015.07.16. } } + private Timer Ftimer; + @EventHandler public void onPlayerDeath(PlayerDeathEvent e) { if (!Minigames.plugin.pdata.getMinigamePlayer(e.getEntity()) .isInMinigame() && new Random().nextBoolean()) { + if (Ftimer != null) + Ftimer.cancel(); ActiveF = true; FCount = 0; - FTime = System.currentTimeMillis(); for (Player p : PluginMain.GetPlayers()) { - MaybeOfflinePlayer mp = MaybeOfflinePlayer.GetFromName(p - .getName()); + MaybeOfflinePlayer mp = MaybeOfflinePlayer.AllPlayers.get(p + .getUniqueId()); mp.PressedF = false; p.sendMessage("§bPress F to pay respects.§r"); } + Ftimer = new Timer(); + TimerTask tt = new TimerTask() { + @Override + public void run() { + if (ActiveF) { + ActiveF = false; + for (Player p : PluginMain.GetPlayers()) { + p.sendMessage("§b" + FCount + " " + + (FCount == 1 ? "person" : "people") + + " paid their respects.§r"); + } + } + } + }; + Ftimer.schedule(tt, 15 * 1000); } } }