Latest Mythiclib 1.0.2

This commit is contained in:
Joshua 2021-02-12 10:37:15 -06:00
parent 4ad5bfb933
commit fcf26df82e
3 changed files with 22 additions and 29 deletions

View File

@ -122,7 +122,7 @@
<dependency> <dependency>
<groupId>io.lumine</groupId> <groupId>io.lumine</groupId>
<artifactId>MythicLib</artifactId> <artifactId>MythicLib</artifactId>
<version>1.0.0</version> <version>1.0.2</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@ -1,14 +1,5 @@
package net.Indyuce.mmocore.command; package net.Indyuce.mmocore.command;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.defaults.BukkitCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.event.MMOCommandEvent; import net.Indyuce.mmocore.api.event.MMOCommandEvent;
import net.Indyuce.mmocore.api.player.OfflinePlayerData; import net.Indyuce.mmocore.api.player.OfflinePlayerData;
@ -16,6 +7,14 @@ import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.social.FriendRequest; import net.Indyuce.mmocore.api.player.social.FriendRequest;
import net.Indyuce.mmocore.api.player.social.Request; import net.Indyuce.mmocore.api.player.social.Request;
import net.Indyuce.mmocore.manager.InventoryManager; import net.Indyuce.mmocore.manager.InventoryManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.defaults.BukkitCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import java.util.UUID;
public class FriendsCommand extends BukkitCommand { public class FriendsCommand extends BukkitCommand {
public FriendsCommand(ConfigurationSection config) { public FriendsCommand(ConfigurationSection config) {

View File

@ -1,35 +1,26 @@
package net.Indyuce.mmocore.listener; package net.Indyuce.mmocore.listener;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.utils.Schedulers; import io.lumine.mythic.utils.Schedulers;
import org.bukkit.Bukkit; import net.Indyuce.mmocore.MMOCore;
import org.bukkit.GameMode; import net.Indyuce.mmocore.api.block.BlockInfo;
import org.bukkit.Location; import net.Indyuce.mmocore.api.block.BlockInfo.BlockInfoOption;
import org.bukkit.Material; import net.Indyuce.mmocore.api.block.VanillaBlockType;
import org.bukkit.Statistic; import net.Indyuce.mmocore.api.event.CustomBlockMineEvent;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import org.bukkit.*;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.*;
import org.bukkit.event.block.BlockFormEvent;
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.FixedMetadataValue;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.block.BlockInfo;
import net.Indyuce.mmocore.api.block.VanillaBlockType;
import net.Indyuce.mmocore.api.block.BlockInfo.BlockInfoOption;
import net.Indyuce.mmocore.api.event.CustomBlockMineEvent;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import io.lumine.mythic.lib.UtilityMethods;
public class BlockListener implements Listener { public class BlockListener implements Listener {
private static final BlockFace[] order = { BlockFace.UP, BlockFace.DOWN, BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH }; private static final BlockFace[] order = { BlockFace.UP, BlockFace.DOWN, BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH };
@ -146,8 +137,11 @@ public class BlockListener implements Listener {
@EventHandler(priority = EventPriority.HIGH) @EventHandler(priority = EventPriority.HIGH)
public void registerPlayerPlacedBlocksTag(BlockPlaceEvent event) { public void registerPlayerPlacedBlocksTag(BlockPlaceEvent event) {
event.getBlock().setMetadata("player_placed", new FixedMetadataValue(MMOCore.plugin, true)); event.getBlock().setMetadata("player_placed", new FixedMetadataValue(MMOCore.plugin, true));
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void blockPistonExtend(BlockPistonExtendEvent event) { public void blockPistonExtend(BlockPistonExtendEvent event) {
Block movedBlock = event.getBlock(); Block movedBlock = event.getBlock();