Skip to content

Commit

Permalink
and the rest
Browse files Browse the repository at this point in the history
  • Loading branch information
dags- committed May 1, 2018
1 parent 1e0c814 commit 01a42b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'java'

group 'me.dags'
version '1.0'
version '0.2'
def spongeAPI = '7.1.0'
def spongeChannel = 'SNAPSHOT'

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/me/dags/textmu/MUParser.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package me.dags.textmu;

import com.sun.istack.internal.Nullable;
import org.spongepowered.api.text.Text;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -128,7 +127,6 @@ private Text.Builder nextText(boolean root) {
* Ends on the close brace ')'
* returns null if syntax is incorrect/incomplete
*/
@Nullable
private Text.Builder nextStatement() {
// parse params `[..]`
List<MUParam> params = nextParams();
Expand Down Expand Up @@ -236,7 +234,7 @@ private Text.Builder appendPlainText(Text.Builder builder) {
/**
* Adds the 'other' Builder to the main one, lazily creating the main Builder if null
*/
private Text.Builder append(@Nullable Text.Builder builder, @Nonnull Text.Builder other) {
private Text.Builder append(Text.Builder builder, @Nonnull Text.Builder other) {
if (builder == null) {
// lazy create builder
builder = Text.builder();
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/me/dags/textmu/MarkupPerms.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.google.common.base.Preconditions;
import com.google.common.reflect.TypeToken;
import java.util.HashMap;
import java.util.Map;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
Expand All @@ -14,9 +16,6 @@
import org.spongepowered.api.text.format.TextColor;
import org.spongepowered.api.text.format.TextStyle;

import java.util.HashMap;
import java.util.Map;

/**
* @author dags <dags@dags.me>
*/
Expand Down Expand Up @@ -137,7 +136,8 @@ public void registerActionPermissions(Object plugin, TextTemplate template) {

private void registerPermission(PermissionService service, Object plugin, String node, Text description) {
if (!service.getDescription(node).isPresent()) {
service.newDescriptionBuilder(plugin).ifPresent(builder -> builder.id(node).description(description).register());
service.newDescriptionBuilder(plugin)
.id(node).description(description).register();
}
}

Expand Down

0 comments on commit 01a42b6

Please sign in to comment.