mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-28 16:16:47 +01:00
Update src/main/java/com/gmail/nossr50/listeners/PlayerListener.java
Attempted to fix the Depreciation on the Player Listener. Some one line on this file says its depreciated.
This commit is contained in:
parent
b30002948c
commit
832aa8f264
@ -10,7 +10,7 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
import org.bukkit.event.player.PlayerFishEvent;
|
import org.bukkit.event.player.PlayerFishEvent;
|
||||||
import org.bukkit.event.player.PlayerFishEvent.State;
|
import org.bukkit.event.player.PlayerFishEvent.State;
|
||||||
@ -241,7 +241,7 @@ public class PlayerListener implements Listener {
|
|||||||
if (mcMMO.repairManager.isRepairable(inHand)) {
|
if (mcMMO.repairManager.isRepairable(inHand)) {
|
||||||
mcMMO.repairManager.handleRepair(player, inHand);
|
mcMMO.repairManager.handleRepair(player, inHand);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.updateInventory();
|
player.updateInventory(); //says The method updateInventory() from the type Player is deprecated
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ public class PlayerListener implements Listener {
|
|||||||
* @param event The event to watch
|
* @param event The event to watch
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||||
public void onPlayerChat(PlayerChatEvent event) {
|
public void onPlayerChat(AsyncPlayerChatEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
PlayerProfile profile = Users.getProfile(player);
|
PlayerProfile profile = Users.getProfile(player);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user