Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
适配新 nbtlib
  • Loading branch information
alex3236 committed Nov 8, 2021
1 parent 6d21eff commit 4330e76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/daycount_nbt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def getday():
try:
if config.nbt_mode:
import nbtlib
return floor(nbtlib.load(config.nbt_file)['']['Data']['Time'] / 1728000)
return floor(nbtlib.load(config.nbt_file)['Data']['Time'] / 1728000)
return (datetime.now() - datetime.strptime(config.start_date, '%Y-%m-%d')).days
except Exception:
print_exc()
Expand Down
2 changes: 1 addition & 1 deletion src/mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "daycount_nbt",
"version": "2.1.0",
"version": "2.1.1",
"name": "DayCount NBT",
"description": {
"en_us": ":calendar: Get and export server opening times.",
Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nbtlib
nbtlib>=2.0.0

0 comments on commit 4330e76

Please sign in to comment.