mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Merge remote-tracking branch 'origin/v5' into v5
This commit is contained in:
commit
c206de263b
@ -935,11 +935,15 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
PlotPlayer plotPlayer = BukkitUtil.getPlayer(event.getPlayer());
|
PlotPlayer plotPlayer = BukkitUtil.getPlayer(event.getPlayer());
|
||||||
Location location = plotPlayer.getLocation();
|
Location location = plotPlayer.getLocation();
|
||||||
PlotArea area = location.getPlotArea();
|
PlotArea area = location.getPlotArea();
|
||||||
if (area == null || !area.isPlotChat() || !plotPlayer.getAttribute("chat")) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot plot = area.getPlot(location);
|
Plot plot = area.getPlot(location);
|
||||||
if (plot == null || !plot.getFlag(ChatFlag.class)) {
|
if (plot == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!((plot.getFlag(ChatFlag.class) && area.isPlotChat() && plotPlayer.getAttribute("chat"))
|
||||||
|
|| area.isForcingPlotChat())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (plot.isDenied(plotPlayer.getUUID())) {
|
if (plot.isDenied(plotPlayer.getUUID())) {
|
||||||
|
@ -4,7 +4,7 @@ api-version: "1.13"
|
|||||||
version: "${version}"
|
version: "${version}"
|
||||||
load: STARTUP
|
load: STARTUP
|
||||||
description: "Easy, yet powerful Plot World generation and management."
|
description: "Easy, yet powerful Plot World generation and management."
|
||||||
authors: [Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault]
|
authors: [Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault, SirYwell]
|
||||||
website: https://github.com/IntellectualSites/
|
website: https://github.com/IntellectualSites/
|
||||||
softdepend: [Vault, PlaceholderAPI]
|
softdepend: [Vault, PlaceholderAPI]
|
||||||
loadbefore: [MultiWorld, Multiverse-Core]
|
loadbefore: [MultiWorld, Multiverse-Core]
|
||||||
|
@ -46,7 +46,7 @@ import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE;
|
|||||||
|
|
||||||
@CommandDeclaration(command = "caps",
|
@CommandDeclaration(command = "caps",
|
||||||
category = CommandCategory.INFO,
|
category = CommandCategory.INFO,
|
||||||
description = "Show plot mob caps",
|
description = "Show plot entity caps",
|
||||||
usage = "/plot caps")
|
usage = "/plot caps")
|
||||||
public class Caps extends SubCommand {
|
public class Caps extends SubCommand {
|
||||||
|
|
||||||
@ -80,5 +80,4 @@ public class Caps extends SubCommand {
|
|||||||
.replace("%current%", Integer.toString(current))
|
.replace("%current%", Integer.toString(current))
|
||||||
.replace("%limit%", Integer.toString(max)).replace("%percentage%", percentage));
|
.replace("%limit%", Integer.toString(max)).replace("%percentage%", percentage));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,18 +25,24 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.core.command;
|
package com.plotsquared.core.command;
|
||||||
|
|
||||||
|
import com.plotsquared.core.configuration.Captions;
|
||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
|
import com.plotsquared.core.util.MainUtil;
|
||||||
|
|
||||||
@CommandDeclaration(command = "chat",
|
@CommandDeclaration(command = "chat",
|
||||||
description = "Toggle plot chat on or off",
|
description = "Toggles plot chat on or off",
|
||||||
usage = "/plot chat [on|off]",
|
usage = "/plot chat",
|
||||||
permission = "plots.chat",
|
permission = "plots.chat",
|
||||||
category = CommandCategory.CHAT,
|
category = CommandCategory.CHAT,
|
||||||
requiredType = RequiredType.PLAYER)
|
requiredType = RequiredType.PLAYER)
|
||||||
public class Chat extends SubCommand {
|
public class Chat extends SubCommand {
|
||||||
|
|
||||||
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
||||||
MainCommand.getInstance().toggle.chat(this, player, new String[0], null, null);
|
if (player.getPlotAreaAbs().isForcingPlotChat()) {
|
||||||
|
MainUtil.sendMessage(player, Captions.PLOT_CHAT_FORCED);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
MainCommand.getInstance().toggle.chat(this, player, args, null, null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ public class PluginCmd extends SubCommand {
|
|||||||
"$2>> $1&l" + PlotSquared.imp().getPluginName() + " $2($1Version$2: $1%s$2)",
|
"$2>> $1&l" + PlotSquared.imp().getPluginName() + " $2($1Version$2: $1%s$2)",
|
||||||
PlotSquared.get().getVersion()));
|
PlotSquared.get().getVersion()));
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player,
|
||||||
"$2>> $1&lAuthors$2: $1Citymonstret $2& $1Empire92 $2& $1MattBDev $2& $1dordsor21 $2& $1NotMyFault");
|
"$2>> $1&lAuthors$2: $1Citymonstret $2& $1Empire92 $2& $1MattBDev $2& $1dordsor21 $2& $1NotMyFault $2& $1SirYwell");
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player,
|
||||||
"$2>> $1&lWiki$2: $1https://github.com/IntellectualSites/PlotSquared/wiki");
|
"$2>> $1&lWiki$2: $1https://github.com/IntellectualSites/PlotSquared/wiki");
|
||||||
MainUtil.sendMessage(player, "$2>> $1&lPremium$2: $1" + PremiumVerification.isPremium());
|
MainUtil.sendMessage(player, "$2>> $1&lPremium$2: $1" + PremiumVerification.isPremium());
|
||||||
|
@ -100,7 +100,8 @@ public abstract class PlotArea {
|
|||||||
@Getter private boolean mobSpawning = false;
|
@Getter private boolean mobSpawning = false;
|
||||||
@Getter private boolean mobSpawnerSpawning = false;
|
@Getter private boolean mobSpawnerSpawning = false;
|
||||||
@Getter private BiomeType plotBiome = BiomeTypes.FOREST;
|
@Getter private BiomeType plotBiome = BiomeTypes.FOREST;
|
||||||
@Getter private boolean plotChat = false;
|
@Getter private boolean plotChat = true;
|
||||||
|
@Getter private boolean forcingPlotChat = false;
|
||||||
@Getter private boolean schematicClaimSpecify = false;
|
@Getter private boolean schematicClaimSpecify = false;
|
||||||
@Getter private boolean schematicOnClaim = false;
|
@Getter private boolean schematicOnClaim = false;
|
||||||
@Getter private String schematicFile = "null";
|
@Getter private String schematicFile = "null";
|
||||||
@ -276,6 +277,7 @@ public abstract class PlotArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.plotChat = config.getBoolean("chat.enabled");
|
this.plotChat = config.getBoolean("chat.enabled");
|
||||||
|
this.forcingPlotChat = config.getBoolean("chat.forced");
|
||||||
this.worldBorder = config.getBoolean("world.border");
|
this.worldBorder = config.getBoolean("world.border");
|
||||||
this.maxBuildHeight = config.getInt("world.max_height");
|
this.maxBuildHeight = config.getInt("world.max_height");
|
||||||
this.minBuildHeight = config.getInt("world.min_height");
|
this.minBuildHeight = config.getInt("world.min_height");
|
||||||
@ -389,6 +391,7 @@ public abstract class PlotArea {
|
|||||||
options.put("economy.prices.merge", 100);
|
options.put("economy.prices.merge", 100);
|
||||||
options.put("economy.prices.sell", 100);
|
options.put("economy.prices.sell", 100);
|
||||||
options.put("chat.enabled", this.isPlotChat());
|
options.put("chat.enabled", this.isPlotChat());
|
||||||
|
options.put("chat.forced", this.isForcingPlotChat());
|
||||||
options.put("flags.default", null);
|
options.put("flags.default", null);
|
||||||
options.put("event.spawn.egg", this.isSpawnEggs());
|
options.put("event.spawn.egg", this.isSpawnEggs());
|
||||||
options.put("event.spawn.custom", this.isSpawnCustom());
|
options.put("event.spawn.custom", this.isSpawnCustom());
|
||||||
|
Loading…
Reference in New Issue
Block a user