Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: sovdee <[email protected]>
  • Loading branch information
TheLimeGlass and sovdeeth authored Oct 3, 2024
1 parent 20f2191 commit 87c4407
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
6 changes: 2 additions & 4 deletions src/main/java/ch/njol/skript/effects/EffOpenInventory.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ private static enum OpenableInventorySyntax {
"Opening a stone cutter inventory requires PaperSpigot."),
WORKBENCH("(crafting [table]|workbench)");

@Nullable
private String methodError;
private @Nullable String methodError;

@Nullable
private Version version;
Expand Down Expand Up @@ -174,8 +173,7 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
/**
* Method because SecOpenInventory also uses this code block.
*/
@Nullable
public static Inventory createInventory(InventoryType type) {
public static @Nullable Inventory createInventory(InventoryType type) {
if (!type.isCreatable())
return null;
try {
Expand Down
23 changes: 2 additions & 21 deletions src/main/java/ch/njol/skript/sections/SecOpenInventory.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
/**
* This file is part of Skript.
*
* Skript is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Skript is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Skript. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright Peter Güttinger, SkriptLang team and contributors
*/
package ch.njol.skript.sections;

import java.util.List;
Expand Down Expand Up @@ -52,7 +34,7 @@
@Examples({
"show chest inventory to player:",
"\tset slot 1 of event-inventory to stone named \"example\"",
"open event-inventory to all players"
"\topen event-inventory to all players"
})
@Since("INSERT VERSION")
public class SecOpenInventory extends Section {
Expand All @@ -69,8 +51,7 @@ public Inventory getInventory() {
}

@Override
@NotNull
public HandlerList getHandlers() {
public @NotNull HandlerList getHandlers() {
throw new IllegalStateException();
}
}
Expand Down

0 comments on commit 87c4407

Please sign in to comment.