mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 09:59:49 -05:00
[Repo back online] Revert "Remove fabledskyblock support since it repo down"
This reverts commit 0016337e
This commit is contained in:
1 parent
3849558073
commit
35d0572340
3 files changed
+145
-132
No files matched your search
@@ -26,6 +26,7 @@ import org.bukkit.plugin.PluginManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.integration.advancedregionmarket.AdvancedShopRegionMarketIntegration;
|
||||
import org.maxgamer.quickshop.integration.fabledskyblock.FabledIntegration;
|
||||
import org.maxgamer.quickshop.integration.factionsuuid.FactionsUUIDIntegration;
|
||||
import org.maxgamer.quickshop.integration.griefprevention.GriefPreventionIntegration;
|
||||
import org.maxgamer.quickshop.integration.iridiumskyblock.IridiumSkyblockIntegration;
|
||||
@@ -56,7 +57,7 @@ public class IntegrationHelper extends QuickShopInstanceHolder {
|
||||
integratedPluginNameMap.put("Residence", ResidenceIntegration.class);
|
||||
integratedPluginNameMap.put("Towny", TownyIntegration.class);
|
||||
integratedPluginNameMap.put("WorldGuard", WorldGuardIntegration.class);
|
||||
//integratedPluginNameMap.put("FabledSkyblock", FabledIntegration.class);
|
||||
integratedPluginNameMap.put("FabledSkyblock", FabledIntegration.class);
|
||||
integratedPluginNameMap.put("IridiumSkyblock", IridiumSkyblockIntegration.class);
|
||||
integratedPluginNameMap.put("SuperiorSkyblock", SuperiorSkyblock2Integration.class);
|
||||
integratedPluginNameMap.put("AdvancedRegionMarket", AdvancedShopRegionMarketIntegration.class);
|
||||
|
||||
+131
-119
@@ -1,119 +1,131 @@
|
||||
///*
|
||||
// * This file is a part of project QuickShop, the name is FabledIntegration.java
|
||||
// * Copyright (C) PotatoCraft Studio and contributors
|
||||
// *
|
||||
// * This program is free software: you can redistribute it and/or modify it
|
||||
// * under the terms of the GNU General Public License as published by the
|
||||
// * Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// * for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// *
|
||||
// */
|
||||
//
|
||||
//package org.maxgamer.quickshop.integration.fabledskyblock;
|
||||
//
|
||||
//import com.songoda.skyblock.SkyBlock;
|
||||
//import com.songoda.skyblock.island.Island;
|
||||
//import com.songoda.skyblock.island.IslandRole;
|
||||
//import org.bukkit.Location;
|
||||
//import org.bukkit.entity.Player;
|
||||
//import org.jetbrains.annotations.NotNull;
|
||||
//import org.maxgamer.quickshop.QuickShop;
|
||||
//import org.maxgamer.quickshop.integration.IntegrateStage;
|
||||
//import org.maxgamer.quickshop.integration.IntegrationStage;
|
||||
//import org.maxgamer.quickshop.integration.QSIntegratedPlugin;
|
||||
//
|
||||
//@IntegrationStage(loadStage = IntegrateStage.onEnableAfter)
|
||||
//public class FabledIntegration extends QSIntegratedPlugin {
|
||||
//
|
||||
// private final boolean ignoreDisabledWorlds;
|
||||
// private final boolean whitelist;
|
||||
//
|
||||
// public FabledIntegration(QuickShop plugin) {
|
||||
// super(plugin);
|
||||
// ignoreDisabledWorlds = plugin.getConfig().getBoolean("integration.fabledskyblock.ignore-disabled-worlds");
|
||||
// whitelist = plugin.getConfig().getBoolean("integration.fabledskyblock.whitelist-mode");
|
||||
// this.registerListener();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Return the integrated plugin name.
|
||||
// * For example, Residence
|
||||
// *
|
||||
// * @return integrated plugin
|
||||
// */
|
||||
// @Override
|
||||
// public @NotNull String getName() {
|
||||
// return "FabledSkyblock";
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Check if a player can create shop here
|
||||
// *
|
||||
// * @param player the player want to create shop
|
||||
// * @param location shop location
|
||||
// * @return If you can create shop here
|
||||
// */
|
||||
// @Override
|
||||
// public boolean canCreateShopHere(@NotNull Player player, @NotNull Location location) {
|
||||
// Island island = SkyBlock.getInstance().getIslandManager().getIslandAtLocation(location);
|
||||
// if (island == null) return whitelist;
|
||||
// return island.getRole(player).equals(IslandRole.Member) || island.getRole(player).equals(IslandRole.Owner)
|
||||
// || island.getRole(player).equals(IslandRole.Operator);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Check if a player can trade with shop here
|
||||
// *
|
||||
// * @param player the player want to trade with shop
|
||||
// * @param location shop location
|
||||
// * @return If you can trade with shop here
|
||||
// */
|
||||
// @Override
|
||||
// public boolean canTradeShopHere(@NotNull Player player, @NotNull Location location) {
|
||||
// if (SkyBlock.getInstance().getIslandManager().getIslandAtLocation(location) == null) {
|
||||
// return ignoreDisabledWorlds;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Check if a player can delete a shop here
|
||||
// *
|
||||
// * @param player the player want to delete the shop
|
||||
// * @param location shop location
|
||||
// * @return If you can delete the shop here
|
||||
// */
|
||||
// @Override
|
||||
// public boolean canDeleteShopHere(@NotNull Player player, @NotNull Location location) {
|
||||
// Island island = SkyBlock.getInstance().getIslandManager().getIslandAtLocation(location);
|
||||
// if (island == null) return whitelist;
|
||||
// return island.getRole(player).equals(IslandRole.Member) || island.getRole(player).equals(IslandRole.Owner)
|
||||
// || island.getRole(player).equals(IslandRole.Operator);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Loading logic
|
||||
// * Execute Stage defined by IntegrationStage
|
||||
// */
|
||||
// @Override
|
||||
// public void load() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Unloding logic
|
||||
// * Will execute when Quickshop unloading
|
||||
// */
|
||||
// @Override
|
||||
// public void unload() {
|
||||
//
|
||||
// }
|
||||
//}
|
||||
/*
|
||||
* This file is a part of project QuickShop, the name is FabledIntegration.java
|
||||
* Copyright (C) PotatoCraft Studio and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.maxgamer.quickshop.integration.fabledskyblock;
|
||||
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import com.songoda.skyblock.island.IslandRole;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.integration.IntegrateStage;
|
||||
import org.maxgamer.quickshop.integration.IntegrationStage;
|
||||
import org.maxgamer.quickshop.integration.QSIntegratedPlugin;
|
||||
import org.maxgamer.quickshop.util.reload.ReloadResult;
|
||||
import org.maxgamer.quickshop.util.reload.ReloadStatus;
|
||||
|
||||
@IntegrationStage(loadStage = IntegrateStage.onEnableAfter)
|
||||
public class FabledIntegration extends QSIntegratedPlugin {
|
||||
|
||||
private boolean ignoreDisabledWorlds;
|
||||
private boolean whitelist;
|
||||
|
||||
public FabledIntegration(QuickShop plugin) {
|
||||
super(plugin);
|
||||
loadConfiguration();
|
||||
registerListener();
|
||||
}
|
||||
|
||||
private void loadConfiguration() {
|
||||
ignoreDisabledWorlds = plugin.getConfig().getBoolean("integration.fabledskyblock.ignore-disabled-worlds");
|
||||
whitelist = plugin.getConfig().getBoolean("integration.fabledskyblock.whitelist-mode");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the integrated plugin name.
|
||||
* For example, Residence
|
||||
*
|
||||
* @return integrated plugin
|
||||
*/
|
||||
@Override
|
||||
public @NotNull String getName() {
|
||||
return "FabledSkyblock";
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player can create shop here
|
||||
*
|
||||
* @param player the player want to create shop
|
||||
* @param location shop location
|
||||
* @return If you can create shop here
|
||||
*/
|
||||
@Override
|
||||
public boolean canCreateShopHere(@NotNull Player player, @NotNull Location location) {
|
||||
Island island = SkyBlock.getInstance().getIslandManager().getIslandAtLocation(location);
|
||||
if (island == null) return whitelist;
|
||||
return island.getRole(player).equals(IslandRole.Member) || island.getRole(player).equals(IslandRole.Owner)
|
||||
|| island.getRole(player).equals(IslandRole.Operator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player can trade with shop here
|
||||
*
|
||||
* @param player the player want to trade with shop
|
||||
* @param location shop location
|
||||
* @return If you can trade with shop here
|
||||
*/
|
||||
@Override
|
||||
public boolean canTradeShopHere(@NotNull Player player, @NotNull Location location) {
|
||||
if (SkyBlock.getInstance().getIslandManager().getIslandAtLocation(location) == null) {
|
||||
return ignoreDisabledWorlds;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player can delete a shop here
|
||||
*
|
||||
* @param player the player want to delete the shop
|
||||
* @param location shop location
|
||||
* @return If you can delete the shop here
|
||||
*/
|
||||
@Override
|
||||
public boolean canDeleteShopHere(@NotNull Player player, @NotNull Location location) {
|
||||
Island island = SkyBlock.getInstance().getIslandManager().getIslandAtLocation(location);
|
||||
if (island == null) return whitelist;
|
||||
return island.getRole(player).equals(IslandRole.Member) || island.getRole(player).equals(IslandRole.Owner)
|
||||
|| island.getRole(player).equals(IslandRole.Operator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loading logic
|
||||
* Execute Stage defined by IntegrationStage
|
||||
*/
|
||||
@Override
|
||||
public void load() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Unloding logic
|
||||
* Will execute when Quickshop unloading
|
||||
*/
|
||||
@Override
|
||||
public void unload() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReloadResult reloadModule() throws Exception {
|
||||
loadConfiguration();
|
||||
return ReloadResult.builder().status(ReloadStatus.SUCCESS).build();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user