From 649bfd731373c104fd64c2fade7b5b09260cdb94 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sat, 26 Dec 2020 23:02:21 +0100 Subject: [PATCH] MC 1.16 + Java 11 --- .classpath | 4 ++-- .settings/org.eclipse.jdt.core.prefs | 15 +++++++++++++++ resources/plugin.yml | 2 +- src/me/cwang/discosheep/DiscoSheep.java | 1 - src/me/cwang/discosheep/PartyBuilder.java | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 .settings/org.eclipse.jdt.core.prefs diff --git a/.classpath b/.classpath index ac3eea8..0baf28c 100644 --- a/.classpath +++ b/.classpath @@ -1,9 +1,9 @@ - - + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..cd8d089 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,15 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/resources/plugin.yml b/resources/plugin.yml index 88a5136..0bb56d7 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -2,7 +2,7 @@ name: DiscoSheep main: me.cwang.discosheep.DiscoSheep authors: [Gibstick, RangerMauve] version: 2.0 -api-version: 1.14 +api-version: 1.16 commands: ds: description: "Main DiscoSheep command" diff --git a/src/me/cwang/discosheep/DiscoSheep.java b/src/me/cwang/discosheep/DiscoSheep.java index 5e4bd81..dd60857 100644 --- a/src/me/cwang/discosheep/DiscoSheep.java +++ b/src/me/cwang/discosheep/DiscoSheep.java @@ -41,7 +41,6 @@ public final class DiscoSheep extends JavaPlugin { EntityType.MAGMA_CUBE, EntityType.MUSHROOM_COW, EntityType.OCELOT, - EntityType.PIG_ZOMBIE, EntityType.RABBIT, EntityType.SKELETON, EntityType.SLIME, diff --git a/src/me/cwang/discosheep/PartyBuilder.java b/src/me/cwang/discosheep/PartyBuilder.java index e48fb74..c45015d 100644 --- a/src/me/cwang/discosheep/PartyBuilder.java +++ b/src/me/cwang/discosheep/PartyBuilder.java @@ -50,7 +50,7 @@ public class PartyBuilder { } public PartyBuilder period(int period) throws IllegalArgumentException { - if (period < 0 || period > AbstractParty.maxPeriod) { + if (period <= 0 || period > AbstractParty.maxPeriod) { throw new IllegalArgumentException("invalid period"); } this.period = period;