mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-22 10:15:54 +01:00
Coop fix
This commit is contained in:
parent
1e3ac82c8d
commit
003196c14d
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
||||
#Wed Jun 05 03:45:54 MDT 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
|
||||
|
@ -52,6 +52,11 @@ public class CoopCommand extends SubCommand {
|
||||
OfflinePlayer offlinePlayer = new OfflinePlayer(args[0]);
|
||||
targetPlayerUUID = offlinePlayer.getUniqueId();
|
||||
targetPlayerName = offlinePlayer.getName();
|
||||
|
||||
if (targetPlayerUUID != null && !Bukkit.getOfflinePlayer(targetPlayerUUID).hasPlayedBefore()) {
|
||||
targetPlayerUUID = null;
|
||||
targetPlayerName = null;
|
||||
}
|
||||
} else {
|
||||
targetPlayerUUID = targetPlayer.getUniqueId();
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
|
@ -49,7 +49,7 @@ public class UltimateStacker implements Listener {
|
||||
materialAmount = level.getMaterialAmount(materials.name());
|
||||
}
|
||||
|
||||
level.setMaterialAmount(materials.name(), materialAmount + event.getAmount());
|
||||
level.setMaterialAmount(materials.name(), materialAmount + event.getAmount() - 1); // Normal place event still goes off
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -31,6 +31,7 @@ import me.goodandevil.skyblock.utils.item.nInventoryUtil.ClickEventHandler;
|
||||
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
|
||||
import me.goodandevil.skyblock.utils.version.Materials;
|
||||
import me.goodandevil.skyblock.utils.version.Sounds;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
public class Coop {
|
||||
|
||||
@ -164,6 +165,7 @@ public class Coop {
|
||||
Island island = islandManager.getIsland(player);
|
||||
|
||||
Set<UUID> coopPlayers = island.getCoopPlayers();
|
||||
coopPlayers.removeIf(x -> !Bukkit.getOfflinePlayer(x).hasPlayedBefore());
|
||||
|
||||
int playerMenuPage = playerData.getPage(), nextEndIndex = coopPlayers.size() - playerMenuPage * 36;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user