Skip to content

Commit

Permalink
🎋 fixed issue#3
Browse files Browse the repository at this point in the history
  • Loading branch information
Arasple committed Feb 27, 2020
1 parent baa4a5a commit 84db3e4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

configurations {
group = 'me.arasple.mc.trhologram'
version = '1.1'
version = '1.11'

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down
4 changes: 4 additions & 0 deletions files/UPDATES_CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# TrMenu Update Logs #

#### VERSION 1.1
- ##### 1.11
- Since: 2020.2.27
- Updates:
- Fixed issue#3
- ##### 1.10
- Since: 2020.2.24
- Updates:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/arasple/mc/trhologram/TrHologram.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void onStopping() {
}

public static double getTrVersion() {
return 1.1;
return 1.11;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ object ContentEditor {
Sounds.ITEM_BOTTLE_FILL.playSound(e.player)
print("Should be updated?")
TLocale.sendTo(e.player, "COMMANDS.EDIT.BOOK-EDIT-SUCCESS")
} else {
print("Fuckto $author, $title")
}
} else {
print("Fuck1")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ class Hologram(var loadedFrom: String?, val id: String, private var loc: Locatio
Sounds.ITEM_BOTTLE_FILL.playSound(loc, 1f, 0f)
}
}
viewers.forEach { player: Player -> refreshLines(player) }
}

fun initFromSection() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ object HologramManager {
val name = file.name.replace("(?i).yml".toRegex(), "")
val data = YamlConfiguration.loadConfiguration(file)
var hologram = TrHologramAPI.getHologramById(name)
if (Locations.from(data.getString("location")) == null) {
continue
}
if (hologram == null) {
hologram = Hologram.createHologram(TrHologram.getPlugin(), name, Locations.from(data.getString("location")), data.getStringList("contents"), TrAction.readActionGroups(data["actions"]), data.getString("viewCondition", "100"), data.getString("viewDistance"))
} else {
hologram.initFromSection(data)
}
hologram.loadedFrom = file.path
}
if (sender != null && !Hologram.getHolograms().isEmpty()) {
if (sender != null && Hologram.getHolograms().isNotEmpty()) {
TLocale.sendTo(sender, "HOLOGRAM.LOADED-SUCCESS", Hologram.getHolograms().size, System.currentTimeMillis() - start)
Hologram.getHolograms().forEach { hologram ->
if (hologram.loadedFrom != null) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/me/arasple/mc/trhologram/utils/Locations.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public static String write(Location location) {

public static Location from(String loc) {
String[] location = loc.replaceAll(", ", ",").split(",");
if (Bukkit.getWorld(location[0]) == null) {
return null;
}
return new Location(Bukkit.getWorld(location[0]), NumberUtils.toDouble(location[1]), NumberUtils.toDouble(location[2]), NumberUtils.toDouble(location[3]));
}

Expand Down

0 comments on commit 84db3e4

Please sign in to comment.