|
22 | 22 | import com.plotsquared.core.configuration.caption.TranslatableCaption; |
23 | 23 | import com.plotsquared.core.generator.HybridPlotManager; |
24 | 24 | import com.plotsquared.core.generator.HybridUtils; |
25 | | -import com.plotsquared.core.location.Location; |
26 | 25 | import com.plotsquared.core.player.PlotPlayer; |
27 | 26 | import com.plotsquared.core.plot.Plot; |
28 | 27 | import com.plotsquared.core.plot.PlotArea; |
@@ -57,8 +56,7 @@ public DebugRoadRegen(final @NonNull HybridUtils hybridUtils) { |
57 | 56 |
|
58 | 57 | @Override |
59 | 58 | public boolean onCommand(PlotPlayer<?> player, String[] args) { |
60 | | - Location location = player.getLocation(); |
61 | | - Plot plot = location.getPlotAbs(); |
| 59 | + Plot plot = player.getCurrentPlot(); |
62 | 60 | if (args.length < 1) { |
63 | 61 | player.sendMessage( |
64 | 62 | TranslatableCaption.of("commandconfig.command_syntax"), |
@@ -92,8 +90,7 @@ public boolean onCommand(PlotPlayer<?> player, String[] args) { |
92 | 90 | } |
93 | 91 |
|
94 | 92 | public boolean regenPlot(PlotPlayer<?> player) { |
95 | | - Location location = player.getLocation(); |
96 | | - PlotArea area = location.getPlotArea(); |
| 93 | + PlotArea area = player.getCurrentPlot().getArea(); |
97 | 94 | if (area == null) { |
98 | 95 | player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world")); |
99 | 96 | return false; |
@@ -148,8 +145,7 @@ public boolean regenRegion(PlotPlayer<?> player, String[] args) { |
148 | 145 | return false; |
149 | 146 | } |
150 | 147 |
|
151 | | - Location location = player.getLocation(); |
152 | | - PlotArea area = location.getPlotArea(); |
| 148 | + PlotArea area = player.getCurrentPlot().getArea(); |
153 | 149 | if (area == null) { |
154 | 150 | player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world")); |
155 | 151 | } |
|
0 commit comments