mirror of
https://github.com/JEFF-Media-GbR/BetterTridents.git
synced 2024-12-28 03:17:45 +01:00
2.0.1 release
This commit is contained in:
parent
bb813d746b
commit
a778b0bbde
@ -1,3 +1,6 @@
|
||||
## 2.0.1
|
||||
- Fixed tridents getting lost on return when throwing many of them from the offhand while having "return-to-offhand" set to "true"
|
||||
|
||||
## 2.0.0
|
||||
- Renamed plugin to "BetterTridents"
|
||||
- Added new mechanics and config options:
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
<groupId>de.jeff_media</groupId>
|
||||
<name>BetterTridents</name>
|
||||
<artifactId>BetterTridents</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<version>2.0.1</version>
|
||||
|
||||
<properties>
|
||||
<spigot.prefix>${project.name}</spigot.prefix>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.jeff_media.bettertridents.tasks;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
@ -17,8 +18,11 @@ public class MoveToOffhand extends BukkitRunnable {
|
||||
public void run() {
|
||||
for (ItemStack item : player.getInventory()) {
|
||||
if (item != null && item.equals(tridentItem)) {
|
||||
player.getInventory().remove(item);
|
||||
player.getInventory().setItemInOffHand(item.clone());
|
||||
ItemStack offhand = player.getInventory().getItemInOffHand();
|
||||
if(offhand == null || offhand.getType() == Material.AIR) {
|
||||
player.getInventory().remove(item);
|
||||
player.getInventory().setItemInOffHand(item.clone());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user