Skip to content

Commit eb58a1a

Browse files
committed
Fix remaining checkstyle warnings.
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
1 parent 06bbc1b commit eb58a1a

File tree

6 files changed

+27
-24
lines changed

6 files changed

+27
-24
lines changed

src/main/java/org/spongepowered/api/event/SpongeEventFactory.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -575,17 +575,14 @@ public static EntityCollisionWithEntityEvent createEntityCollisionWithEntity(Gam
575575
* @param cause The cause of the event, can be null
576576
* @param entity The entity involved in this event
577577
* @param location The location of death
578-
* @param droppedItems The items to drop
579578
* @param exp The experience to give, or take for negative values
580579
* @return A new instance of the event
581580
*/
582-
public static EntityDeathEvent createEntityDeath(Game game, Cause cause, Entity entity, Location location, Collection<ItemStack> droppedItems,
583-
int exp) {
581+
public static EntityDeathEvent createEntityDeath(Game game, Cause cause, Entity entity, Location location, int exp) {
584582
Map<String, Object> values = Maps.newHashMap();
585583
values.put("game", game);
586584
values.put("cause", Optional.fromNullable(cause));
587585
values.put("entity", entity);
588-
values.put("droppedItems", droppedItems);
589586
values.put("location", location);
590587
values.put("exp", exp);
591588
return createEvent(EntityDeathEvent.class, values);
@@ -632,13 +629,15 @@ public static EntityDisplaceEvent createEntityDisplace(Game game, Entity entity,
632629
* Creates a new {@link EntityDropItemEvent}.
633630
*
634631
* @param game The game instance for this {@link GameEvent}
632+
* @param cause The cause of this event
635633
* @param entity The entity involved in this event
636634
* @param droppedItems The items to drop
637635
* @return A new instance of the event
638636
*/
639-
public static EntityDropItemEvent createEntityDropItem(Game game, Entity entity, Collection<ItemStack> droppedItems) {
637+
public static EntityDropItemEvent createEntityDropItem(Game game, Cause cause, Entity entity, Collection<ItemStack> droppedItems) {
640638
Map<String, Object> values = Maps.newHashMap();
641639
values.put("game", game);
640+
values.put("cause", Optional.fromNullable(cause));
642641
values.put("entity", entity);
643642
values.put("droppedItems", droppedItems);
644643
return createEvent(EntityDropItemEvent.class, values);
@@ -1131,7 +1130,6 @@ public static PlayerChatEvent createPlayerChat(Game game, Player player, Command
11311130
* @param player The player involved in this event
11321131
* @param location The location of death
11331132
* @param deathMessage The message to show to the player because they died
1134-
* @param droppedItems The items to drop
11351133
* @param exp The experience to give, or take for negative values
11361134
* @param newExperience The new experience the player will have towards the next level
11371135
* @param newLevel The new level the player will have after death
@@ -1140,7 +1138,7 @@ public static PlayerChatEvent createPlayerChat(Game game, Player player, Command
11401138
* @return A new instance of the event
11411139
*/
11421140
public static PlayerDeathEvent createPlayerDeath(Game game, Cause cause, Player player, Location location, Text deathMessage,
1143-
Collection<ItemStack> droppedItems, int exp, int newExperience, int newLevel, boolean keepsLevel, boolean keepsInventory) {
1141+
int exp, int newExperience, int newLevel, boolean keepsLevel, boolean keepsInventory) {
11441142

11451143
Map<String, Object> values = Maps.newHashMap();
11461144
values.put("game", game);
@@ -1152,7 +1150,6 @@ public static PlayerDeathEvent createPlayerDeath(Game game, Cause cause, Player
11521150
values.put("location", location);
11531151
values.put("human", player);
11541152
values.put("living", player);
1155-
values.put("droppedItems", droppedItems);
11561153
values.put("exp", exp);
11571154
values.put("newExperience", newExperience);
11581155
values.put("newLevel", newLevel);
@@ -1166,12 +1163,14 @@ public static PlayerDeathEvent createPlayerDeath(Game game, Cause cause, Player
11661163
*
11671164
* @param game The game instance for this {@link GameEvent}
11681165
* @param player The player involved in this event
1166+
* @param cause The cause of the event
11691167
* @param droppedItems The items to drop
11701168
* @return A new instance of the event
11711169
*/
1172-
public static PlayerDropItemEvent createPlayerDropItem(Game game, Player player, Collection<ItemStack> droppedItems) {
1170+
public static PlayerDropItemEvent createPlayerDropItem(Game game, Player player, Cause cause, Collection<ItemStack> droppedItems) {
11731171
Map<String, Object> values = Maps.newHashMap();
11741172
values.put("game", game);
1173+
values.put("cause", Optional.fromNullable(cause));
11751174
values.put("entity", player);
11761175
values.put("droppedItems", droppedItems);
11771176
values.put("player", player);

src/main/java/org/spongepowered/api/scoreboard/Scoreboard.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ public interface Scoreboard {
7474
*/
7575
void addObjective(Objective objective, @Nullable DisplaySlot displaySlot) throws IllegalStateException;
7676

77+
/**
78+
* Adds the specified {@link Objective} to this scoreboard.
79+
*
80+
* @param objective The {@link Objective} add
81+
* @throws IllegalArgumentException if an {@link Objective} with the same
82+
* {@link Objective#getName() name} already exists, or if the
83+
* specified {@link Objective} has already been added.
84+
*/
85+
void addObjective(Objective objective) throws IllegalArgumentException;
86+
7787
/**
7888
* Gets all {@link Objective}s of a Criteria on this scoreboard.
7989
*
@@ -89,16 +99,6 @@ public interface Scoreboard {
8999
*/
90100
Set<Objective> getObjectives();
91101

92-
/**
93-
* Adds the specified {@link Objective} to this scoreboard.
94-
*
95-
* @param objective The {@link Objective} add
96-
* @throws IllegalArgumentException if an {@link Objective} with the same
97-
* {@link Objective#getName() name} already exists, or if the
98-
* specified {@link Objective} has already been added.
99-
*/
100-
void addObjective(Objective objective) throws IllegalArgumentException;
101-
102102
/**
103103
* Removes the specified {@link Objective} from this scoreboard.
104104
*

src/main/java/org/spongepowered/api/text/TextFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public interface TextFactory {
8181
* Returns a JSON representation of the {@link Text} as used in commands in the specified language.
8282
*
8383
* @param text The text to convert
84+
* @param locale The language to get the json in
8485
* @return The text converted to JSON
8586
*/
8687
String toJson(Text text, Locale locale);
@@ -137,6 +138,7 @@ public interface TextFactory {
137138
*
138139
* @param text The text to convert
139140
* @param code The legacy char to use for the message
141+
* @param locale The language to translate into
140142
* @return The text converted to the old color codes
141143
*/
142144
String toLegacy(Text text, char code, Locale locale);

src/main/java/org/spongepowered/api/text/translation/ResourceBundleTranslation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333

3434
/**
3535
* A translation class designed to be used for ResourceBundles. For convenience, most users will want to wrap this in a class that keeps track of
36-
* resource bundles. A simple implementaion would look like:
36+
* resource bundles. A simple implementation would look like:
3737
* <pre>
3838
* public class TranslationHelper {
39-
* private static final Function<Locale, ResourceBundle> LOOKUP_FUNC = new Function<Locale, ResourceBundle>() {
39+
* private static final Function&lt;Locale, ResourceBundle&gt; LOOKUP_FUNC = new Function&lt;Locale, ResourceBundle&gt;() {
4040
* &at;Nullable
4141
* &at;Override
4242
* public ResourceBundle apply(Locale input) {

src/main/java/org/spongepowered/api/util/SpongeApiTranslationHelper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
import javax.annotation.Nullable;
3636

3737
/**
38-
* This class provides translations for strings within SpongeAPI. Plugins should consult an implementaion of Translation for help.
38+
* This class provides translations for strings within SpongeAPI. Plugins
39+
* should consult an implementaion of Translation for help.
3940
*
40-
* THIS IS AN API-INTERNAL CLASS -- DO NOT USE OUTSIDE OF API OR YOU WILL LIVE A SAD AND LONELY LIFE
41+
* <p>THIS IS AN API-INTERNAL CLASS -- DO NOT USE OUTSIDE OF API OR YOU WILL
42+
* LIVE A SAD AND LONELY LIFE</p>
4143
*/
4244
public class SpongeApiTranslationHelper {
4345

src/main/java/org/spongepowered/api/util/command/args/ChildCommandElementExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
*/
2525
package org.spongepowered.api.util.command.args;
2626

27-
import static org.spongepowered.api.util.command.CommandMessageFormatting.error;
2827
import static org.spongepowered.api.util.SpongeApiTranslationHelper.t;
28+
import static org.spongepowered.api.util.command.CommandMessageFormatting.error;
2929

3030
import com.google.common.base.Optional;
3131
import com.google.common.base.Predicate;

0 commit comments

Comments
 (0)