mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +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>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!--<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<outputDirectory>C:\Users\Arte\Desktop\Server\plugins</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugin>-->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -95,23 +95,28 @@ public class JobsListener implements Listener {
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void AsyncPlayerChatEvent(AsyncPlayerChatEvent event) {
|
||||
public void AsyncPlayerChatEvent(final AsyncPlayerChatEvent event) {
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (Util.getJobsEditorMap().isEmpty())
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
final Player player = event.getPlayer();
|
||||
if (!Util.getJobsEditorMap().containsKey(player.getUniqueId()))
|
||||
return;
|
||||
|
||||
String msg = Util.getJobsEditorMap().remove(player.getUniqueId());
|
||||
final String msg = Util.getJobsEditorMap().remove(player.getUniqueId());
|
||||
|
||||
if (msg == null)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -190,4 +190,4 @@ permissions:
|
||||
default: true
|
||||
jobs.command.edititembonus:
|
||||
description: Grants access to the edititembonus command
|
||||
default: op
|
||||
default: op
|
||||
|
Loading…
Reference in New Issue
Block a user