mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-01 23:13:48 +01:00
Merge branch 'master' of https://github.com/Zrips/Jobs.git
This commit is contained in:
commit
7fc27936ab
4
pom.xml
4
pom.xml
@ -125,14 +125,14 @@
|
|||||||
<target>1.7</target>
|
<target>1.7</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!--<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>C:\Users\Arte\Desktop\Server\plugins</outputDirectory>
|
<outputDirectory>C:\Users\Arte\Desktop\Server\plugins</outputDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>-->
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
@ -95,23 +95,28 @@ public class JobsListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
public void AsyncPlayerChatEvent(AsyncPlayerChatEvent event) {
|
public void AsyncPlayerChatEvent(final AsyncPlayerChatEvent event) {
|
||||||
if (event.isCancelled())
|
if (event.isCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Util.getJobsEditorMap().isEmpty())
|
if (Util.getJobsEditorMap().isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
if (!Util.getJobsEditorMap().containsKey(player.getUniqueId()))
|
if (!Util.getJobsEditorMap().containsKey(player.getUniqueId()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String msg = Util.getJobsEditorMap().remove(player.getUniqueId());
|
final String msg = Util.getJobsEditorMap().remove(player.getUniqueId());
|
||||||
|
|
||||||
if (msg == null)
|
if (msg == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player.performCommand(msg + event.getMessage());
|
Bukkit.getServer().getScheduler().runTask(plugin, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
player.performCommand(msg + event.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user