mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Various
externalize strings plotme conversion fixes
This commit is contained in:
@ -179,6 +179,11 @@ public class SpongeMain implements IPlotMain {
|
||||
return this.plugin.getVersion().orElse("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "PlotSquared";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getServerVersion() {
|
||||
PS.log("Checking minecraft version: Sponge: ");
|
||||
|
@ -87,23 +87,6 @@ public class MainListener {
|
||||
* - enderman harvest
|
||||
*/
|
||||
|
||||
@Listener
|
||||
public void onCommand(SendCommandEvent event) {
|
||||
switch (event.getCommand().toLowerCase()) {
|
||||
case "plotme":
|
||||
Player source = SpongeUtil.getCause(event.getCause(), Player.class);
|
||||
if (source == null) {
|
||||
return;
|
||||
}
|
||||
if (Settings.PlotMe.ALIAS) {
|
||||
SpongeMain.THIS.getGame().getCommandManager().process(source, ("plots " + event.getArguments()).trim());
|
||||
} else {
|
||||
source.sendMessage(SpongeUtil.getText(C.NOT_USING_PLOTME.s()));
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onChat(MessageEvent event) {
|
||||
// TODO
|
||||
@ -295,7 +278,7 @@ public class MainListener {
|
||||
// return true;
|
||||
// }
|
||||
// org.spongepowered.api.world.Location<World> loc = relatives.get(dir);
|
||||
// com.intellectualcrafters.plot.object.Location plotloc = SpongeUtil.getLocation(loc.getExtent().getName(), loc);
|
||||
// com.intellectualcrafters.plot.object.Location plotloc = SpongeUtil.getLocation(loc.getExtent().getPluginName(), loc);
|
||||
// if (area == null) {
|
||||
// return true;
|
||||
// }
|
||||
@ -310,7 +293,7 @@ public class MainListener {
|
||||
// return true;
|
||||
// }
|
||||
// org.spongepowered.api.world.Location<World> relative = loc.getRelative(dir);
|
||||
// com.intellectualcrafters.plot.object.Location relLoc = SpongeUtil.getLocation(relative.getExtent().getName(), relative);
|
||||
// com.intellectualcrafters.plot.object.Location relLoc = SpongeUtil.getLocation(relative.getExtent().getPluginName(), relative);
|
||||
// if (plot.equals(MainUtil.getPlot(relLoc))) {
|
||||
// return true;
|
||||
// }
|
||||
|
@ -4,11 +4,16 @@ import com.intellectualcrafters.configuration.ConfigurationSection;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.ConfigurationNode;
|
||||
import com.intellectualcrafters.plot.generator.GeneratorWrapper;
|
||||
import com.intellectualcrafters.plot.generator.HybridGen;
|
||||
import com.intellectualcrafters.plot.object.PlotArea;
|
||||
import com.intellectualcrafters.plot.object.SetupObject;
|
||||
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||
import com.plotsquared.sponge.generator.SpongePlotGenerator;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import org.spongepowered.api.Sponge;
|
||||
import org.spongepowered.api.world.DimensionTypes;
|
||||
import org.spongepowered.api.world.GeneratorTypes;
|
||||
@ -18,13 +23,6 @@ import org.spongepowered.api.world.gen.WorldGenerator;
|
||||
import org.spongepowered.api.world.gen.WorldGeneratorModifier;
|
||||
import org.spongepowered.api.world.storage.WorldProperties;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class SpongeSetupUtils extends SetupUtils {
|
||||
|
||||
@Override
|
||||
@ -32,7 +30,7 @@ public class SpongeSetupUtils extends SetupUtils {
|
||||
if (!SetupUtils.generators.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
SetupUtils.generators.put("PlotSquared", new SpongePlotGenerator(PS.get().IMP.getDefaultGenerator()));
|
||||
SetupUtils.generators.put(PS.imp().getPluginName(), new SpongePlotGenerator(PS.get().IMP.getDefaultGenerator()));
|
||||
// TODO get external world generators
|
||||
Collection<WorldGeneratorModifier> wgms = Sponge.getRegistry().getAllOf(WorldGeneratorModifier.class);
|
||||
for (WorldGeneratorModifier wgm : wgms) {
|
||||
|
Reference in New Issue
Block a user