mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
Fix job editor chat event
This commit is contained in:
parent
d31d60f4d8
commit
af25281ef2
8
pom.xml
8
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>Jobs</groupId>
|
||||
<artifactId>jobs</artifactId>
|
||||
<version>4.5.1</version>
|
||||
<version>4.6.3</version>
|
||||
<name>Jobs</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.12-R0.1-SNAPSHOT</version>
|
||||
<version>1.13-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- iConomy7 -->
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: Jobs
|
||||
description: Jobs Plugin for the BukkitAPI
|
||||
main: com.gamingmesh.jobs.Jobs
|
||||
version: 4.6.1
|
||||
version: 4.6.3
|
||||
api-version: 1.13
|
||||
website: https://www.spigotmc.org/resources/jobs-reborn.4216/
|
||||
author: phrstbrn
|
||||
|
Loading…
Reference in New Issue
Block a user