diff --git a/.metadata/.log b/.metadata/.log index 77b9229..2983703 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -880,3 +880,78 @@ user global configuration and to define the default location to store repositori 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. +!SESSION 2015-08-14 12:09:07.199 ----------------------------------------------- +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.core.resources 2 10035 2015-08-14 12:09:27.930 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY org.eclipse.osgi 4 0 2015-08-14 12:10:15.826 +!MESSAGE Application error +!STACK 1 +org.eclipse.swt.SWTError: No more handles + at org.eclipse.swt.SWT.error(SWT.java:4387) + at org.eclipse.swt.SWT.error(SWT.java:4276) + at org.eclipse.swt.SWT.error(SWT.java:4247) + at org.eclipse.swt.widgets.Widget.error(Widget.java:468) + at org.eclipse.swt.widgets.Control.createHandle(Control.java:704) + at org.eclipse.swt.widgets.Composite.createHandle(Composite.java:305) + at org.eclipse.swt.widgets.Control.createWidget(Control.java:744) + at org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:134) + at org.eclipse.swt.widgets.Control.(Control.java:112) + at org.eclipse.swt.widgets.Scrollable.(Scrollable.java:75) + at org.eclipse.swt.widgets.Composite.(Composite.java:95) + at org.eclipse.ui.splash.BasicSplashHandler.getBundleProgressMonitor(BasicSplashHandler.java:159) + at org.eclipse.ui.splash.BasicSplashHandler.getContent(BasicSplashHandler.java:265) + at org.eclipse.ui.internal.splash.EclipseSplashHandler.init(EclipseSplashHandler.java:91) + at org.eclipse.ui.internal.Workbench$6.run(Workbench.java:751) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench.createSplashWrapper(Workbench.java:772) + at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:690) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:568) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) + at java.lang.reflect.Method.invoke(Unknown Source) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) + at org.eclipse.equinox.launcher.Main.run(Main.java:1438) +!SESSION 2015-08-14 12:09:07.186 ----------------------------------------------- +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.core.resources 2 10035 2015-08-14 12:15:27.853 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY org.eclipse.egit.ui 2 0 2015-08-14 12:16:14.774 +!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-08-14 12:16:14.774 +!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 d1b52ca..53491a1 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 2f9368f..c5b5f2c 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 2219627..26eb4b3 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/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index 29f7e9c..298f0c4 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.jdt.core/1508644233.index b/.metadata/.plugins/org.eclipse.jdt.core/1508644233.index index 48b2dd1..511102e 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 68afc21..00892b2 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 ae1d598..08ab0e4 100644 --- a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -1,18 +1,18 @@ 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 -1934142626.index 3716007315.index +1934142626.index 1045485630.index 605290374.index 533208796.index 1337478678.index 1528680760.index -1467104569.index 1737447423.index +1467104569.index 4187470955.index 2535676096.index 1787405673.index @@ -23,4 +23,4 @@ INDEX VERSION 1.126+D:\Z - Norbi cucca\0 Projektek\TheButtonMCAutoFlairProto\Spi 994834796.index 3604769962.index 3045053200.index -1508644233.index +3656756579.index diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml index b6411a6..1f2052e 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -14,4 +14,5 @@ + \ No newline at end of file diff --git a/TheButtonAutoFlair.jar b/TheButtonAutoFlair.jar index f138aa4..bd927bc 100644 Binary files a/TheButtonAutoFlair.jar and b/TheButtonAutoFlair.jar differ diff --git a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PlayerListener.class b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PlayerListener.class index e1d8dbe..4abb928 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/bin/tk/sznp/thebuttonautoflair/PluginMain$1.class b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain$1.class index 0245746..9b7351b 100644 Binary files a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain$1.class and b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain$1.class differ diff --git a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain.class b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain.class index b375ecd..2b7e473 100644 Binary files a/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain.class and b/TheButtonAutoFlair/bin/tk/sznp/thebuttonautoflair/PluginMain.class differ diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java index e93fc19..5eac697 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PlayerListener.java @@ -31,7 +31,9 @@ public class PlayerListener implements Listener public void onPlayerLeave(PlayerQuitEvent event) { } - + + public static String NotificationSound; //2015.08.14. + public static float NotificationPitch; //2015.08.14. @EventHandler public void onPlayerChat(AsyncPlayerChatEvent event) { @@ -43,7 +45,12 @@ public class PlayerListener implements Listener for(Player p : PluginMain.GetPlayers()) { //2015.08.12. if(message.contains(p.getName())) - p.playSound(p.getLocation(), Sound.ORB_PICKUP, 1.0f, 0.5f); //2015.08.12. + { + if(NotificationSound==null) + p.playSound(p.getLocation(), Sound.ORB_PICKUP, 1.0f, 0.5f); //2015.08.12. + else + p.playSound(p.getLocation(), NotificationSound, 1.0f, NotificationPitch); //2015.08.14. + } message = message.replaceAll(p.getName(), "§6"+p.getName()+"§r"); } event.setFormat(event.getFormat().substring(0, event.getFormat().indexOf(">"))+flair+"> "+message); //2015.08.08. diff --git a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java index 14087ca..7675781 100644 --- a/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java +++ b/TheButtonAutoFlair/src/tk/sznp/thebuttonautoflair/PluginMain.java @@ -10,7 +10,6 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -367,6 +366,16 @@ public class PluginMain extends JavaPlugin } br.close(); } + file=new File("notificationsound.txt"); //2015.08.09. + if(file.exists()) + { + BufferedReader br=new BufferedReader(new FileReader(file)); + String line=br.readLine(); + String[] split=line.split(" "); + PlayerListener.NotificationSound=split[0]; + PlayerListener.NotificationPitch=Float.parseFloat(split[1]); + br.close(); + } //throw new IOException("Test"); //2015.08.09. System.out.println("Auto-flair plugin loaded files!"); } catch (IOException e) { @@ -435,7 +444,7 @@ public class PluginMain extends JavaPlugin if(trimmedLine.contains(lineToRemove)) continue; //2015.08.09. writer.write(currentLine + System.getProperty("line.separator")); } - writer.close(); + writer.close(); reader.close(); if(!tempFile.renameTo(inputFile)) {