Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #209 from rettichlp/hotfix-1-3-2
Browse files Browse the repository at this point in the history
hotfix-1-3-2
  • Loading branch information
rettichlp committed Aug 19, 2022
2 parents 1dcb4af + 660362b commit ec7cc30
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'idea'
apply plugin: 'maven-publish'

version = '1.3.1'
version = '1.3.2'
group = 'com.rettichlp' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'UnicacityAddon'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@Mod(name = "UnicacityAddon", modid = "unicacityaddon", version = UnicacityAddon.VERSION, clientSideOnly = true, acceptedMinecraftVersions = "[1.12,1.12.2]")
public class UnicacityAddon extends LabyModAddon {

public static final String VERSION = "1.3.1";
public static final String VERSION = "1.3.2";
public static final Minecraft MINECRAFT = Minecraft.getMinecraft();
public static UnicacityAddon ADDON;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static boolean getNameTagFactionSpecific() {

// Delay
public static String getRefreshDisplayNamesInterval() {
return UnicacityAddon.ADDON.getConfig().has("NAMETAG_DELAY_SETTINGS") && !UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY_SETTINGS").getAsString().isEmpty() && !UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY").getAsString().equals("0") && !UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY").getAsString().startsWith("-")
return UnicacityAddon.ADDON.getConfig().has("NAMETAG_DELAY_SETTINGS") && !UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY_SETTINGS").getAsString().isEmpty() && !UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY_SETTINGS").getAsString().equals("0") && !UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY_SETTINGS").getAsString().startsWith("-")
? UnicacityAddon.ADDON.getConfig().get("NAMETAG_DELAY_SETTINGS").getAsString()
: "5";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ARezeptAnnehmenCommand extends CommandBase {
}

if (!MathUtils.isInteger(args[0])) return;
amount = Integer.parseInt(args[2]);
amount = Integer.parseInt(args[0]);
MedicationEventHandler.acceptRecipe();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
@UCCommand
public class ADropMoneyCommand extends CommandBase {

public static boolean execute = false;
private int step = 0;

@Override
Expand Down Expand Up @@ -48,11 +47,8 @@ public boolean checkPermission(@Nonnull MinecraftServer server, @Nonnull IComman
@Override
public void execute(@Nonnull MinecraftServer server, @Nonnull ICommandSender sender, @Nonnull String[] args) {
UPlayer p = AbstractionLayer.getPlayer();
Timer t = new Timer();

execute = true;

t.scheduleAtFixedRate(new TimerTask() {
new Timer().scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
switch (step++) {
Expand All @@ -64,11 +60,8 @@ public void run() {
break;
case 3:
p.sendChatMessage("/bank einzahlen 15000");
break;
case 4:
execute = false;
step = 0;
t.cancel();
this.cancel();
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.rettichlp.UnicacityAddon.base.text.PatternHandler;
import com.rettichlp.UnicacityAddon.base.utils.ImageUploadUtils;
import net.labymod.main.LabyMod;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.shader.Framebuffer;
import net.minecraft.util.ScreenShotHelper;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
Expand Down Expand Up @@ -64,10 +65,15 @@ private void handleHotkey() {
try {
File file = FileManager.getNewImageFile();
handleScreenshot(file);
return;
} catch (IOException e) {
throw new RuntimeException(e);
}
} else if (Keyboard.isKeyDown(KeyBindRegistry.adFreigeben.getKeyCode())) {
}

if (UnicacityAddon.MINECRAFT.currentScreen instanceof GuiChat) return;

if (Keyboard.isKeyDown(KeyBindRegistry.adFreigeben.getKeyCode())) {
handleAd("freigeben");
} else if (Keyboard.isKeyDown(KeyBindRegistry.adBlockieren.getKeyCode())) {
handleAd("blockieren");
Expand Down

0 comments on commit ec7cc30

Please sign in to comment.