Skip to content

Commit

Permalink
Updates for custom properties
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Nov 20, 2021
1 parent 46828f2 commit 3d09581
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.countercraft.movecraft.warfare</groupId>
<artifactId>Movecraft-Warfare</artifactId>
<version>1.a.7</version>
<version>1.a.8</version>
<packaging>jar</packaging>

<name>Movecraft-Warfare</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.countercraft.movecraft.Movecraft;
import net.countercraft.movecraft.craft.Craft;
import net.countercraft.movecraft.craft.CraftManager;
import net.countercraft.movecraft.craft.type.CraftType;
import net.countercraft.movecraft.repair.MovecraftRepair;
import net.countercraft.movecraft.warfare.config.Config;
import net.countercraft.movecraft.warfare.events.SiegeBroadcastEvent;
Expand Down Expand Up @@ -220,7 +221,7 @@ private boolean beginCommand(CommandSender commandSender){
player.sendMessage(MOVECRAFT_COMMAND_PREFIX + I18nSupport.getInternationalisedString("You must be piloting a craft!"));
return true;
}
if(!siege.getCraftsToWin().contains(siegeCraft.getType().getCraftName())) {
if(!siege.getCraftsToWin().contains(siegeCraft.getType().getStringProperty(CraftType.NAME))) {
player.sendMessage(MOVECRAFT_COMMAND_PREFIX + I18nSupport.getInternationalisedString("You must be piloting a craft that can siege!"));
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.countercraft.movecraft.MovecraftLocation;
import net.countercraft.movecraft.craft.Craft;
import net.countercraft.movecraft.craft.CraftManager;
import net.countercraft.movecraft.craft.type.CraftType;
import net.countercraft.movecraft.warfare.events.SiegeBroadcastEvent;
import net.countercraft.movecraft.warfare.localisation.I18nSupport;
import net.countercraft.movecraft.warfare.config.Config;
Expand Down Expand Up @@ -40,7 +41,7 @@ public void run() {
String broadcast = String.format(
I18nSupport.getInternationalisedString("Siege - Flagship In Box"),
siege.getName(),
siegeCraft.getType().getCraftName(),
siegeCraft.getType().getStringProperty(CraftType.NAME),
siegeCraft.getOrigBlockCount(),
siegeLeader.getDisplayName(), mid.getX(), mid.getY(), mid.getZ())
+ SiegeUtils.formatMinutes(timeLeft);
Expand Down Expand Up @@ -123,7 +124,7 @@ private boolean leaderPilotingShip(@Nullable Craft siegeCraft) {
if (siegeCraft == null)
return false;
else
return siege.getCraftsToWin().contains(siegeCraft.getType().getCraftName());
return siege.getCraftsToWin().contains(siegeCraft.getType().getStringProperty(CraftType.NAME));
}

@NotNull
Expand Down

0 comments on commit 3d09581

Please sign in to comment.