|
1 | | -/* |
2 | | - * This file is a part of project QuickShop, the name is PlotSquaredIntegrationProxy.java |
3 | | - * Copyright (C) PotatoCraft Studio and contributors |
4 | | - * |
5 | | - * This program is free software: you can redistribute it and/or modify it |
6 | | - * under the terms of the GNU General Public License as published by the |
7 | | - * Free Software Foundation, either version 3 of the License, or |
8 | | - * (at your option) any later version. |
9 | | - * |
10 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
13 | | - * for more details. |
14 | | - * |
15 | | - * You should have received a copy of the GNU General Public License |
16 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | | - * |
18 | | - */ |
19 | | - |
20 | | -package org.maxgamer.quickshop.integration.plotsquared; |
21 | | - |
22 | | -import org.bukkit.Location; |
23 | | -import org.bukkit.entity.Player; |
24 | | -import org.jetbrains.annotations.NotNull; |
25 | | -import org.maxgamer.quickshop.QuickShop; |
26 | | -import org.maxgamer.quickshop.api.integration.IntegrateStage; |
27 | | -import org.maxgamer.quickshop.api.integration.IntegrationStage; |
28 | | -import org.maxgamer.quickshop.integration.AbstractQSIntegratedPlugin; |
29 | | -import org.maxgamer.quickshop.util.Util; |
30 | | -import org.maxgamer.quickshop.util.reload.ReloadResult; |
31 | | - |
32 | | -@IntegrationStage(loadStage = IntegrateStage.onEnableAfter) |
33 | | -public class PlotSquaredIntegrationProxy extends AbstractQSIntegratedPlugin { |
34 | | - private final AbstractQSIntegratedPlugin plotSquared; |
35 | | - |
36 | | - public PlotSquaredIntegrationProxy(QuickShop instance) { |
37 | | - super(instance); |
38 | | - if (plugin.getServer().getPluginManager().getPlugin("PlotSquared").getClass().getPackage().getName().contains("intellectualsite")) { |
39 | | - plotSquared = new PlotSquaredIntegrationV4(plugin); |
40 | | - } else if (false && Util.isClassAvailable("com.plotsquared.core.configuration.Caption")) { |
41 | | -// //Write reload logic for it |
42 | | -// plotSquared = new PlotSquaredIntegrationV5(plugin) { |
43 | | -// @Override |
44 | | -// public ReloadResult reloadModule() throws Exception { |
45 | | -// loadConfiguration(); |
46 | | -// return super.reloadModule(); |
47 | | -// } |
48 | | -// }; |
49 | | -// plugin.getReloadManager().register(plotSquared); |
50 | | - } else { |
51 | | - plotSquared = new PlotSquaredIntegrationV6(plugin); |
52 | | - } |
53 | | - } |
54 | | - |
55 | | - @Override |
56 | | - public @NotNull String getName() { |
57 | | - return plotSquared.getName(); |
58 | | - } |
59 | | - |
60 | | - @Override |
61 | | - public boolean canCreateShopHere(@NotNull Player player, @NotNull Location location) { |
62 | | - return plotSquared.canCreateShopHere(player, location); |
63 | | - } |
64 | | - |
65 | | - @Override |
66 | | - public boolean canTradeShopHere(@NotNull Player player, @NotNull Location location) { |
67 | | - return plotSquared.canCreateShopHere(player, location); |
68 | | - } |
69 | | - |
70 | | - @Override |
71 | | - public boolean canDeleteShopHere(@NotNull Player player, @NotNull Location location) { |
72 | | - return plotSquared.canDeleteShopHere(player, location); |
73 | | - } |
74 | | - |
75 | | - @Override |
76 | | - public void load() { |
77 | | - plotSquared.load(); |
78 | | - } |
79 | | - |
80 | | - @Override |
81 | | - public void unload() { |
82 | | - plotSquared.unload(); |
83 | | - } |
84 | | - |
85 | | - @Override |
86 | | - public ReloadResult reloadModule() throws Exception { |
87 | | - return plotSquared.reloadModule(); |
88 | | - } |
89 | | -} |
| 1 | +///* |
| 2 | +// * This file is a part of project QuickShop, the name is PlotSquaredIntegrationProxy.java |
| 3 | +// * Copyright (C) PotatoCraft Studio and contributors |
| 4 | +// * |
| 5 | +// * This program is free software: you can redistribute it and/or modify it |
| 6 | +// * under the terms of the GNU General Public License as published by the |
| 7 | +// * Free Software Foundation, either version 3 of the License, or |
| 8 | +// * (at your option) any later version. |
| 9 | +// * |
| 10 | +// * This program is distributed in the hope that it will be useful, but WITHOUT |
| 11 | +// * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 12 | +// * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 13 | +// * for more details. |
| 14 | +// * |
| 15 | +// * You should have received a copy of the GNU General Public License |
| 16 | +// * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | +// * |
| 18 | +// */ |
| 19 | +// |
| 20 | +//package org.maxgamer.quickshop.integration.plotsquared; |
| 21 | +// |
| 22 | +//import org.bukkit.Location; |
| 23 | +//import org.bukkit.entity.Player; |
| 24 | +//import org.jetbrains.annotations.NotNull; |
| 25 | +//import org.maxgamer.quickshop.QuickShop; |
| 26 | +//import org.maxgamer.quickshop.api.integration.IntegrateStage; |
| 27 | +//import org.maxgamer.quickshop.api.integration.IntegrationStage; |
| 28 | +//import org.maxgamer.quickshop.integration.AbstractQSIntegratedPlugin; |
| 29 | +//import org.maxgamer.quickshop.util.reload.ReloadResult; |
| 30 | +// |
| 31 | +//@IntegrationStage(loadStage = IntegrateStage.onEnableAfter) |
| 32 | +//public class PlotSquaredIntegrationProxy extends AbstractQSIntegratedPlugin { |
| 33 | +// private final AbstractQSIntegratedPlugin plotSquared; |
| 34 | +// |
| 35 | +// public PlotSquaredIntegrationProxy(QuickShop instance) { |
| 36 | +// super(instance); |
| 37 | +// if (plugin.getServer().getPluginManager().getPlugin("PlotSquared").getClass().getPackage().getName().contains("intellectualsite")) { |
| 38 | +// // plotSquared = new PlotSquaredIntegrationV4(plugin); |
| 39 | +// // } else if (false && Util.isClassAvailable("com.plotsquared.core.configuration.Caption")) { |
| 40 | +//// //Write reload logic for it |
| 41 | +//// plotSquared = new PlotSquaredIntegrationV5(plugin) { |
| 42 | +//// @Override |
| 43 | +//// public ReloadResult reloadModule() throws Exception { |
| 44 | +//// loadConfiguration(); |
| 45 | +//// return super.reloadModule(); |
| 46 | +//// } |
| 47 | +//// }; |
| 48 | +//// plugin.getReloadManager().register(plotSquared); |
| 49 | +// //} else { |
| 50 | +// plotSquared = new PlotSquaredIntegrationV6(plugin); |
| 51 | +// } else { |
| 52 | +// plotSquared = null; |
| 53 | +// } |
| 54 | +// //} |
| 55 | +// } |
| 56 | +// |
| 57 | +// @Override |
| 58 | +// public @NotNull String getName() { |
| 59 | +// return plotSquared.getName(); |
| 60 | +// } |
| 61 | +// |
| 62 | +// @Override |
| 63 | +// public boolean canCreateShopHere(@NotNull Player player, @NotNull Location location) { |
| 64 | +// return plotSquared.canCreateShopHere(player, location); |
| 65 | +// } |
| 66 | +// |
| 67 | +// @Override |
| 68 | +// public boolean canTradeShopHere(@NotNull Player player, @NotNull Location location) { |
| 69 | +// return plotSquared.canCreateShopHere(player, location); |
| 70 | +// } |
| 71 | +// |
| 72 | +// @Override |
| 73 | +// public boolean canDeleteShopHere(@NotNull Player player, @NotNull Location location) { |
| 74 | +// return plotSquared.canDeleteShopHere(player, location); |
| 75 | +// } |
| 76 | +// |
| 77 | +// @Override |
| 78 | +// public void load() { |
| 79 | +// plotSquared.load(); |
| 80 | +// } |
| 81 | +// |
| 82 | +// @Override |
| 83 | +// public void unload() { |
| 84 | +// plotSquared.unload(); |
| 85 | +// } |
| 86 | +// |
| 87 | +// @Override |
| 88 | +// public ReloadResult reloadModule() throws Exception { |
| 89 | +// return plotSquared.reloadModule(); |
| 90 | +// } |
| 91 | +//} |
0 commit comments